Machine-translated by Google. Questions are authored in English.
Top

Memory Management Questions and Answers

202.

The disadvantage of moving all process to one end of memory and all holes to the other direction, producing one large hole of available memory is :

Answer: A

Correct answer: the cost incurred

Compaction works, but every byte of every process must be copied, and nothing else can run while it happens. That expense is its drawback.

Please log in or register to report this question.

204.

When there is a large logical address space, the best way of paging would be :

Answer: B

Correct answer: a two level paging algorithm

A large address space would need a page table too big to hold in memory as one piece, so the table itself is paged: an outer table indexes pages of the inner table. Only the parts actually used need be resident.

Please log in or register to report this question.

205.

When the valid – invalid bit is set to valid, it means that the associated page :

Answer: C

Correct answer: is in the process's logical address space

The valid bit says the page is part of this process's address space; invalid means the page number lies outside it, and a reference to it is trapped.

Please log in or register to report this question.

206.

If the size of logical address space is 2 to the power of m, and a page size is 2 to the power of n addressing units, then the high order _____ bits of a logical address designate the page number, and the ____ low order bits designate the page offset.

Answer: D

Correct answer: m – n, n

If the address is m bits and the page size is \( 2^{n} \), the low n bits are the offset within the page and the remaining m − n bits are the page number.

Please log in or register to report this question.

Answer: D

Correct answer: brings pages into memory before they are referenced

Prepaging brings pages into memory in anticipation of their being needed, rather than waiting for a reference to fault them in. Pure demand paging loads nothing until it is actually referenced. The motivation is the burst of faults a process suffers at start-up or on resuming after being swapped out, when none of its pages are resident. Loading its whole working set at once is cheaper than faulting it in page by page, because a single large transfer costs little more than a small one once the disk seek is paid for. Whether it pays depends on the accuracy of the guess. If a fraction \( \alpha \) of the prepaged pages are actually used, prepaging is worthwhile only when the cost saved on \( \alpha \) faults exceeds the cost of loading the \( 1-\alpha \) that were not needed. Where \( \alpha \) is near zero it is pure waste. Real systems use it selectively - on process resumption, where the working set is already known - and rely on demand paging otherwise.

Please log in or register to report this question.

Answer: D

Correct answer: execute programs larger than the available physical memory

Virtual memory lets a process run without all of it being resident in physical memory. Pages are brought in from disk as they are referenced - demand paging - and pages not currently needed are held on the backing store. A reference to a page that is not resident raises a page fault, a trap the operating system services by finding a free frame, reading the page in, updating the page table and restarting the instruction. Three benefits follow. Programs may be larger than physical memory. More processes fit in memory at once, so CPU utilisation and throughput rise. And less input and output is needed to load a program, since only the parts used are read. The cost is that a page fault takes milliseconds against nanoseconds for a memory access, so the fault rate must stay very low - and if it does not, the system thrashes. It also depends on locality of reference: without it, demand paging would fault constantly.

Please log in or register to report this question.

Loading…
Tags: Memory Management Questions and Answers || Memory Management MCQ Questions and Answers || Memory Management GK Questions and Answers || Memory Management GK MCQ Questions || Memory Management Multiple Choice Questions and Answers || Memory Management GK || GK on Memory Management || Computer Awareness Questions and Answers || Computer Awareness MCQ Questions and Answers || Computer Awareness GK Questions and Answers || GK on Computer Awareness