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

Memory Management Questions and Answers

Answer: C

Correct answer: avoid allocating a large contiguous table for the whole address space

A hierarchical or multilevel page table exists to avoid keeping one enormous contiguous table per process. The arithmetic makes the problem plain. A 32-bit address space with 4 KB pages contains a million pages, and at four bytes per entry the table is 4 MB - per process, and required to be contiguous in physical memory. That is unacceptable. Splitting it into two levels means only the outer table and the inner tables covering parts of the address space actually in use need exist; the rest are simply absent. Since most processes use a small and scattered fraction of their address space, the saving is very large. The cost is an extra memory access per translation, so it makes translation slower rather than faster - which is why the second option is wrong and why the TLB is essential rather than dispensable. 64-bit architectures need three or four levels. The alternatives are hashed page tables and inverted page tables, which trade the search cost differently.

Please log in or register to report this question.

132.

Physical memory that is not currently allocated to any process is tracked by the operating system in

Answer: C

Correct answer: a free-frame list

The operating system maintains a free-frame list recording which physical frames are unallocated. When a page must be brought in, a frame is taken from that list; when a process terminates or a page is evicted, its frames are returned to it. If the list is empty, a victim page must be chosen by the replacement algorithm and evicted first - written back if it is dirty, discarded if clean. Real systems keep a reserve rather than letting the list run to zero, because finding a frame at the moment one is needed adds latency to a page fault. A background process reclaims pages when the free count falls below a threshold, so a frame is usually available immediately. The other options are all per-process or hardware structures with different jobs: a page table maps one process’s pages, the TLB caches recent translations, and the process control block holds a process’s saved state. None of them has any view of which physical frames are free system-wide.

Please log in or register to report this question.

134.

Smaller page tables are implemented as a set of _______

Answer: D

Correct answer: registers

A small page table can be held entirely in a set of dedicated registers, which makes translation as fast as possible. Only when the table grows too large for that must it be moved into main memory.

Please log in or register to report this question.

Answer: A

Correct answer: only when it is referenced

Demand paging loads a page only when it is actually referenced. A process begins with none of its pages resident and faults them in as it runs, which is the lazy swapper principle: never bring in a page that may not be needed. The benefits are substantial. Program startup is faster, since only the first few pages are read; less input and output is performed overall, because parts of a program never executed are never loaded; and more processes fit in memory at once, raising CPU utilisation. The alternative, prepaging, brings in a group of pages in anticipation. It reduces the number of faults if the guesses are right and wastes input and output if they are wrong, so it is used selectively - typically when a swapped-out process resumes and its working set is already known. Demand paging works only because of locality of reference: programs concentrate their accesses in small regions, so the fault rate settles low after an initial burst.

Please log in or register to report this question.

Answer: B

Correct answer: mapping the same physical frame into several processes’ page tables

Sharing is achieved by having the page tables of several processes point to the same physical frame. Each process sees the page at whatever virtual address suits it, and only one copy exists in memory. This is how shared libraries work: the code of a library used by twenty processes occupies one set of frames rather than twenty. The same mechanism serves shared memory between cooperating processes, and memory-mapped files. Two conditions apply to shared code. It must be reentrant - never modifying itself, so that its instructions are identical for every user - and it is marked read-only in every page table, which enforces that. Each process keeps its own private data and stack pages. Where a process must be able to write to an initially shared page, copy-on-write is used: the page is shared read-only until a write faults, at which point it is duplicated for the writer alone. Sharing is one of the reasons paging is preferred to contiguous allocation.

Please log in or register to report this question.

138.

Each entry in a Translation look-aside buffer (TLB) consists of :

Answer: A

Correct answer: key

A TLB is associative memory: each entry is searched by its key, the page number, and returns the value stored with it, the frame number. The search is on the key, which is what the question is asking about.

Please log in or register to report this question.

139.

The owner of an address space can grant a number of its

Answer: B

Correct answer: Pages

In a system that shares memory between address spaces, the unit that can be granted to another owner is the page, since that is the unit the mapping hardware works in.

Please log in or register to report this question.

Answer: D

Correct answer: The set of pages held with n frames is always a subset of the set held with n+1 frames

A stack algorithm is one for which the set of pages in memory with \( n \) frames is always a subset of the set that would be in memory with \( n+1 \) frames, for the same reference string. That property has an immediate consequence: a stack algorithm can never suffer Belady’s anomaly. Since more frames can only add pages and never remove ones that would have been kept, the fault count cannot rise as frames are added. LRU and the optimal algorithm are both stack algorithms - LRU because it keeps the \( n \) most recently used pages, and the \( n \) most recent are always among the \( n+1 \) most recent. FIFO is not, which is exactly why it can exhibit the anomaly: age of loading bears no such nesting relation. The name refers to the mathematical property rather than to any data structure, and no stack is involved in the implementation.

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