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

Memory Management Questions and Answers

Answer: B

Correct answer: each process occupies a single unbroken block of memory

Contiguous allocation gives each process one unbroken region of physical memory, defined by a base address and a limit. Its virtue is simplicity: address translation needs only an addition and a bounds check, so a single relocation register and limit register suffice, and no page table is required. Its defect is external fragmentation. As processes come and go, free memory is left in scattered holes, and a request may fail even when the total free space is ample. Compaction can cure it by shuffling processes together, but at a heavy cost in copying and only where relocation is dynamic. The scheme comes in two forms. Fixed partitioning divides memory into a set number of regions, wasting whatever a process does not fill - internal fragmentation. Variable partitioning allocates exactly what is asked for, avoiding that but suffering external fragmentation instead. Paging was introduced to escape the dilemma: because any free frame serves for any page, contiguity is never required.

Please log in or register to report this question.

45.

In Pascal and COMAL programming language, symbol ':=' is used for

Answer: D

Correct answer: assignments

In Pascal and COMAL := assigns a value to a variable, and the plain = is reserved for comparison. Keeping the two symbols apart removes an ambiguity that BASIC and C leave open.

Please log in or register to report this question.

Answer: C

Correct answer: It replaces the page that has been in memory the longest

FIFO replaces the page that has been resident longest, regardless of how recently or how often it has been used. It is implemented with a simple queue, so its cost is trivial. That simplicity is its only merit. Age of loading is a poor predictor of future need - a heavily used page loaded early is evicted while a rarely touched recent one survives - so its fault rate is markedly worse than LRU’s. It also suffers Belady’s anomaly: increasing the number of frames can increase the number of faults, which the third option denies. Algorithms free of the anomaly are the stack algorithms, of which LRU and the optimal algorithm are examples. The fourth option describes true LRU, which needs a timestamp or stack updated on every reference and is too expensive in practice. FIFO is rarely used unmodified. Adding a reference-bit check produces the second-chance or clock algorithm, which costs almost nothing more and approximates LRU well.

Please log in or register to report this question.

Answer: B

Correct answer: allocated memory is slightly larger than the requested memory, leaving unused space inside a block

Internal fragmentation is space wasted inside an allocated block, because memory is handed out in fixed units and the request rarely fills the last one exactly. A process needing 5 KB with a 4 KB page size receives two pages and wastes 3 KB. External fragmentation, the second option, is the opposite: enough free memory exists in total but it is scattered in pieces too small to satisfy a request. The distinction determines the remedy. Paging eliminates external fragmentation entirely, since any free frame will do for any page, but introduces internal fragmentation of at most one page per process - on average half a page. Contiguous allocation and segmentation avoid internal fragmentation but suffer external. Compaction cures external fragmentation by shuffling processes together to make one large hole, at considerable cost in copying, and only works if relocation is dynamic.

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