The number of page frames that must be allocated to a running process in a…
20072007
The number of page frames that must be allocated to a running process in a virtual memory environment is determined by-
- A.
the instruction set architecture
- B.
page size
- C.
number of processes in memory
- D.
physical memory size
Attempted by 41 students.
Show answer & explanation
Correct answer: A
Concept
In demand paging a process must keep enough frames in memory for any single machine instruction to complete; if a needed page is missing mid-instruction the instruction faults and must be re-executed from the start. Therefore the lower bound on frames a process can be given is the maximum number of distinct pages a single instruction may reference at once. That maximum is fixed by the computer's instruction set architecture (instruction length plus its addressing modes and levels of indirection), not by how much RAM is installed.
Why the architecture sets the floor
An instruction itself occupies memory, and a long instruction may straddle a page boundary, so it can span more than one page just to be fetched.
Each operand the instruction references needs its page resident; an operand can itself straddle a page boundary, and with indirect addressing the pointer page and the target page are both needed, adding more frames per operand.
Summing the worst case over the instruction word and all its operands gives the minimum frames the process must hold so that no single instruction can fail to make progress.
Concrete examples
A machine whose memory-reference instructions name a single direct address needs only about two frames (one for the instruction, one for the operand).
One level of indirect addressing raises this to three frames (instruction, pointer, target).
The IBM 370 MVC (storage-to-storage move) instruction itself is six bytes and may straddle two pages; its source block may span two pages and its destination block may span two pages, so in the worst case six frames are needed for that one instruction.
Distinguishing the other factors
Page size only changes how memory is sliced; it does not set how many distinct pages one instruction touches.
The count of processes in memory and the total physical memory size bound the maximum frames available to share out and influence the allocation policy, but they do not set the per-process minimum needed for an instruction to complete.
Result
The minimum number of page frames a process must hold is set by the instruction set architecture.
A video solution is available for this question — log in and enroll to watch it.