Allocation of Frames in Operating Systems
This article discusses the allocation of frames in operating systems. It covers two main algorithms for frame allocation: equal allocation and proportional allocation. It also discusses the concepts of global and local replacement, and thrashing.
Questions
- What is the formula for proportional allocation of frames?
- What is the difference between global and local replacement?
- What is thrashing?
Answers
- The formula for proportional allocation of frames is:
“`
ai = (si / S) * mwhere `ai` is the number of frames allocated to process `i`, `si` is the size of process `i`, `S` is the total size of all processes, and `m` is the number of frames in the system.
- Global replacement means that any process can take a frame from any other process. Local replacement means that each process can only take frames from its own set of allocated frames.
- Thrashing is a situation where a process is constantly swapping pages in and out of memory. This can happen if a process does not have enough frames, or if the page-fault rate is very high.