Untitled

Untitled

Untitled

Untitled

Memory Management -First, Next, Best and Worst fit

Untitled

Untitled

Untitled

Page Replacement Algorithms

FIFO

Untitled

Page fault/miss and Page hit and their ratio

Untitled

Belady’s Anomaly - States that there may be instances where upon increasing the number of frames in a system it would instead reduce the hit ratio here’s how:

Untitled

Optimal Page replacement Algorithm

It is same as the FIFO as long as the frames are empty

Once all frames are full, if page hit occurs then we simply copy those pages in the next step as previously

But in case of a page fault after all the frames are full, we remove/replace that page from the memory whose demand is relatively at a later stage as compared to the other pages currently in the frames.

meaning the page whose first recall after removal is at the last compared to the other processes.

the process whose demand in future is occurring at the last

Untitled

Hit and fault ratio:

Untitled

LRU - Least Recently Used

All same when frames are empty but when frames are full and page fault occurs, we remove the page that was first called in the memory compared to the other 4.

Untitled

MRU - Most Recently Used

Same as LRU only difference is that in case a page fault occurs when all frames are full then the page that is replaced is the one that is most recently into the frames. Like just the previous page is removed.

Untitled

Banker’s Algorithm - Deadlock Avoidance - Deadlock Detection

maxresdefault.jpg

Semaphores - numericals

Untitled

Untitled

Untitled

Untitled