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

Memory Management Questions and Answers

61.

In paged memory systems, if the page size is increased, then the internal fragmentation generally :

Answer: B

Correct answer: becomes more

A process wastes on average half a page in its last page, so the larger the page the more is wasted. Small pages reduce that waste but enlarge the page table, which is the trade-off page size settles.

Please log in or register to report this question.

64.

An ______ uniquely identifies processes and is used to provide address space protection for that process.

Answer: B

Correct answer: address space identifier

An ASID stored with each TLB entry records which process it belongs to, so entries for different processes can coexist and the TLB need not be flushed at every context switch.

Please log in or register to report this question.

Answer: D

Correct answer: a program tends to access a small portion of its address space at any time

Locality of reference is the observed tendency of programs to concentrate their memory accesses in a small region of their address space over any short interval. It has two forms. Temporal locality: a location just referenced is likely to be referenced again soon - loop counters, frequently called routines. Spatial locality: locations near one just referenced are likely to be needed next - sequential instructions, elements of an array. It arises from how programs are written: loops, sequential execution, and data structures traversed in order. Its importance is that the entire memory hierarchy depends on it. Cache, the TLB and demand paging all work by keeping a small active portion in fast storage, and every one of them would be useless if accesses were uniformly random. The working set model is the formal expression of the same observation. It also explains why some algorithms are far faster than their instruction counts suggest - traversing an array beats traversing a linked list of the same length.

Please log in or register to report this question.

Answer: C

Correct answer: It makes memory access faster than direct physical addressing

Virtual memory does not make memory access faster. It adds a translation step and the possibility of a page fault, so an individual access is at best no faster and at worst thousands of times slower. Its benefits lie elsewhere. Those benefits are real and considerable. A program may be larger than physical memory, since only the pages in use need be resident. More processes fit in memory at once, so CPU utilisation and throughput rise. And less input and output is needed at start-up, since only the parts of a program actually executed are ever read from disk. It also simplifies programming, by removing the need for the overlay schemes programmers once wrote by hand. The costs are the translation overhead - mitigated by the TLB - the memory occupied by page tables, and the risk of thrashing if processes are given too few frames. Where speed of a single access is what matters, virtual memory is a cost rather than a benefit.

Please log in or register to report this question.

Answer: B

Correct answer: fixed-size blocks called frames

Physical memory is divided into fixed-size blocks called frames, and logical memory into blocks of the same size called pages. A page is loaded into any available frame, and the page table records which. Keeping the two the same size is what makes the scheme work: any page fits any frame, so allocation never fails for want of a suitably sized hole, and external fragmentation disappears entirely. The terminology is worth being exact about, since examiners rely on it: pages are logical and frames are physical. The size is a power of two, typically 4 KB. The residual waste is internal fragmentation in the last page of each process, averaging half a page - a far smaller cost than the third of memory that external fragmentation can consume under contiguous allocation. The second option describes segmentation, which divides memory along logical lines into variable-size pieces and therefore suffers external fragmentation instead.

Please log in or register to report this question.

69.

In statement 110 IF Num = INT(Num) THEN PRINT "Whole number' "of BASIC language, built-in function is

Answer: B

Correct answer: INT

INT is supplied by the language and returns the integer part of its argument, so it is the built-in function here. IF and PRINT are keywords and Num is a variable.

Please log in or register to report this question.

70.

Compaction is used to solve which problem?

Answer: A

Correct answer: External fragmentation

Compaction moves allocated blocks together at one end of memory so that all the free space forms a single large hole. It is the remedy for external fragmentation, where enough total memory is free but it is scattered in pieces too small to be useful. It has two serious costs. Copying every process is expensive, and the system can do nothing else meanwhile. And it is possible only if relocation is dynamic - addresses bound at execution time through a base register - since a process whose addresses were fixed at load time cannot be moved. It does nothing for internal fragmentation, which is space wasted inside an allocated block and cannot be recovered by rearrangement. The better answer to external fragmentation is paging, which removes the problem by definition: since any free frame will serve for any page, physical contiguity is never required and there is nothing to compact. Compaction survives in garbage-collected runtimes, where it consolidates the heap.

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