Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Zygoma::PageFrameSelectionPolicy Class Reference

#include <pageframeselectionpolicy.h>

Inheritance diagram for Zygoma::PageFrameSelectionPolicy:

Inheritance graph
List of all members.

Detailed Description

The Page Frame Selection Policy is used by the PageFrameTable to select an available (or replacement) page frame.

This is a pure virtual base class that can be friends with the PageFrameTable itself to get priviledged access to the page frame table internals. Concrete classes derived from this protocol class can access the page frame internals only through base class calls.

Public Member Functions

virtual ~PageFrameSelectionPolicy ()=0
 The pure virtual destructor.
virtual PageFrameTable::FrameIndex selectUnusedFrame () const =0
 Selects an unused page frame according to policy.
virtual PageFrameTable::FrameIndex selectReplacementFrame () const =0
 Selects a page frame for replacement according to the current policy.

Protected Member Functions

const PageFramegetFrame (PageFrameTable *pageFrameTable, PageFrameTable::FrameIndex frameIndex)
 Pulls up page frame information for an indexed page frame in the page fram table.

Constructor & Destructor Documentation

virtual Zygoma::PageFrameSelectionPolicy::~PageFrameSelectionPolicy  )  [pure virtual]

The pure virtual destructor.

Member Function Documentation

const PageFrame& Zygoma::PageFrameSelectionPolicy::getFrame PageFrameTable pageFrameTable,
PageFrameTable::FrameIndex  frameIndex

Pulls up page frame information for an indexed page frame in the page fram table.

pageFrameTable The page frame table.
frameIndex Index of the page frame to pull.
A const reference to the indexed page frame.

virtual PageFrameTable::FrameIndex Zygoma::PageFrameSelectionPolicy::selectReplacementFrame  )  const [pure virtual]

Selects a page frame for replacement according to the current policy.

A replacement frame may or may not currently be in use. The policy must always be ablw to make a page frame available for replacement, even if there is only one frame in the table. Well, I guess a zero-sized page frame table is the degenerate case, but I doubt things would have got as far as starting virtual memory if there was so little memory in the system.

The index of a page frame to be used as a replacement.

virtual PageFrameTable::FrameIndex Zygoma::PageFrameSelectionPolicy::selectUnusedFrame  )  const [pure virtual]

Selects an unused page frame according to policy.

The index of an unused page frame.
Determine special value for "no frame available".

Implemented in Zygoma::PageFrameLinearPolicy.

The documentation for this class was generated from the following file:
Generated on Fri Sep 2 10:45:09 2005 for zygoma by doxygen 1.4.2