The number of frames allocated to a process can also dynamically change depending on whether you have used global replacement or local replacement for replacing page in case of page fault.
1. Local replacement :-
when a process needs a page which is not in the memory, it can bring in the new page and allocate it a frame from its own set of allocated frames only.
Advantage :-
The pages in the memory for a particular process and the page fault ratio nis affacted by the paging behaviour of only that process.
Disadvantage :-
In local replacement the number of frames allocated to a process does not change so a low priority process may hender a high priority process by not making available to the high priority process its frames.
2. Global replacement :-
When a process needs a page which is not in the memory, it can bring in the new frame and allocate it a frame from the set of all frames, even if that frame is currently allocated to some other processes. i.e one process can take a frame from other.
Advantage :-
Does not hinder the performance of process and hence results in greater system throughput.
Disadvantage :-
The page fault ratio of a process can not be sololy controlled by the process itself. The page in the memory for a process depends on the paging behaviour of other processes as well.
Comments
Post a Comment
Please comment.