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

Memory Management Questions and Answers

22.

The _____ table contains the base address of each page in physical memory.

Answer: C

Correct answer: page

The page table holds one entry per page, giving the base address in physical memory of the frame that page occupies.

Please log in or register to report this question.

Answer: C

Correct answer: to protect the address spaces of processes

The relocation register holds the smallest physical address a process may use and the limit register the size of its range. Every address is checked against the limit and then added to the relocation value, so a process cannot reach outside its own space.

Please log in or register to report this question.

Answer: C

Correct answer: moving a whole process between main memory and the backing store

Swapping moves an entire process out of main memory to a backing store and later brings it back. It was the classic technique for running more processes than memory could hold, in systems that predate paging. The cost is dominated by transfer time, which is proportional to the size of the process, so swapping a large process takes a long time. That is why it was replaced by paging, which moves individual pages rather than whole processes and so pays only for what is actually needed. It also requires that the process be idle: a process with pending input or output cannot be swapped out safely, since the device would write into memory now belonging to something else. Modern systems retain a limited form of it. When memory pressure is severe, a whole process may still be suspended and its pages written out - and the term swap space survives to name the disk area used, even though what is actually written there is pages rather than whole processes.

Please log in or register to report this question.

Answer: D

Correct answer: a file is mapped into the address space and accessed as if it were memory

Memory mapping associates a region of a process’s address space with a file on disk. Reading or writing that memory reads or writes the file, with the paging system doing the transfer as ordinary page faults. The advantage is that the usual read and write system calls disappear, and with them a copy: normally data moves from disk to a kernel buffer and then to the process’s buffer, whereas a mapped file is paged straight into the process’s own frames. For a file accessed repeatedly or randomly, that is substantially faster. It also provides shared memory between processes almost for free: two processes mapping the same file share the physical frames, and a write by one is visible to the other. Writes are not necessarily immediate - the operating system may defer them until the page is evicted or the file is closed - so an explicit synchronisation call exists where durability matters. Shared libraries are loaded this way, which is how one copy serves every process.

Please log in or register to report this question.

Answer: A

Correct answer: run a program larger than available memory by loading parts of it in turn

Overlays allowed a program larger than physical memory to run by keeping only the instructions and data needed at a given moment in memory, and loading a different portion over the same area when a new phase began. A two-pass assembler is the classic example: pass one and pass two are never needed simultaneously, so both occupy the same overlay region in turn, with a small permanently resident driver managing the switching. The critical burden was that overlays had to be designed by the programmer. The program had to be divided by hand into parts that were never needed together, and the loading arranged explicitly. That required detailed knowledge of the program’s structure and was error-prone. Virtual memory made the technique obsolete by achieving the same end automatically: the operating system pages in what is referenced and pages out what is not, with no cooperation from the programmer at all. Overlays survive only in small embedded systems without memory management hardware.

Please log in or register to report this question.

Answer: A

Correct answer: The operating system handles it automatically, without the programmer designing it

The decisive advantage of virtual memory over overlays is that the operating system does the work. The programmer writes as though memory were unlimited, and paging brings in what is referenced and evicts what is not. Overlays required the programmer to divide the program by hand into parts never needed simultaneously, arrange the loading explicitly, and keep the resident driver correct. That demanded detailed knowledge of the program’s structure and was a fertile source of bugs, particularly as programs were modified. The other options are wrong in specific ways. Virtual memory requires disk space for the backing store; it does not eliminate page faults but depends on them as its ordinary mechanism; and it does not change the size of a program on disk at all. It does have costs - translation overhead, memory for page tables, and the risk of thrashing - but the removal of a manual burden from the programmer is what made it universal. Overlays survive only in small embedded systems without memory management hardware.

Please log in or register to report this question.

29.

In internal fragmentation, memory is internal to a partition and :

Answer: B

Correct answer: is not being used

Internal fragmentation is the space inside an allocated block that the process does not use. It is allocated but wasted, which is what distinguishes it from external fragmentation, where the waste lies between blocks.

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