Page Replacement with Fixed # of Frames

A reference string is the sequence of page numbers referenced by an executing program during a given time interval. Reference strings are used to compare different page replacement algorithms by counting the number of page faults generated. Since page faults are time consuming, the optimal page replacement algorithm selects the page that will not be referenced for the longest…

Segmentation and Paging

With paging, all components of a program, including code, static data, the stack, and other data structures, are combined into one contiguous address space divided into fixed-size pages. Segmentation addresses the problem by providing multiple logical address spaces for each process, where each segment can have a different size. A segment is a variable-size block of a…

Memory Paging

The main disadvantage of dividing memory into variable partitions is external fragmentation, which requires the searching of memory for holes large enough to satisfy each request. As we’ve mentioned previously, swapping or compaction is necessary when no hole large enough is available. A page is a fixed-size contiguous block of a logical address space identified by the…

Requirements for Efficient Memory Management

Logical vs Physical memory A computer’s physical memory (RAM) is a hardware structure consisting of a linear sequence of words that hold a program during execution. A word is a fixed-size unit of data. The size of a word is reflected in many aspects of a computer’s structure and operation. A typical word size is 4 to 8 bytes…

Deadlock Detection

A deadlock in a resource allocation graph can be detected by executing a graph reduction algorithm by repeating this process: Select an unblocked process p. Remove p, including all request and allocation edges connected to p. Anything left is blocked, and risks deadlock. However, it is considered completely reducible if there are no processes left…