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

Memory Management Questions and Answers

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: A

Correct answer: split into halves and merged with their partner when freed

The buddy system keeps memory in blocks whose sizes are powers of two. A request is satisfied by repeatedly halving a block until the smallest adequate size is reached; the two halves produced at each split are buddies. When a block is freed, the system checks whether its buddy is also free, and if so merges the pair back into the larger block, repeating upward. Its merit is that coalescing is fast. A block’s buddy is found by flipping a single bit of its address, so merging costs almost nothing - unlike a general free-list, where finding an adjacent free block requires searching. Its cost is internal fragmentation: a request for 33 KB receives 64 KB, wasting nearly half. On average about a quarter of allocated memory is lost. It is used in the Linux kernel for physical page allocation, where the fixed page size limits the waste, and the slab allocator is layered on top of it to serve small kernel objects efficiently.

Please log in or register to report this question.

164.

Which register pair is typically used to protect memory in a contiguous allocation scheme?

Answer: D

Correct answer: Base and limit registers

The base register holds the smallest physical address the process may use, and the limit register holds the size of its range. Every address generated is checked: it must be less than the limit, and the base is then added to give the physical address. The check is performed by hardware on every reference, so it costs nothing in time, and any violation traps to the operating system as an addressing error. The registers can be loaded only by a privileged instruction, executable in kernel mode alone. That is what makes the protection genuine: a user program cannot alter the bounds of its own confinement. The distinction between user and kernel mode exists largely to support arrangements of this kind. The scheme also supplies relocation, since changing the base register moves the process without altering any address within it - which is what makes swapping and compaction possible. Paging generalises the idea, replacing the single register pair with a page table.

Please log in or register to report this question.

Answer: C

Correct answer: It is a type of conversation that takes place on a computer network in real time

Chat is live typed conversation: what one person types appears on the other's screen at once. A discussion area where messages are posted and read later is a forum, and uploading files is FTP.

Please log in or register to report this question.

Answer: A

Correct answer: Paging to disk is often avoided so that timing is predictable

A real-time system is judged by whether it meets deadlines, not by average throughput, so predictability matters more than efficiency. Demand paging introduces a page fault whose cost is several milliseconds and whose occurrence cannot be predicted, which is intolerable where a response must be guaranteed within a bounded time. Such systems therefore either avoid paging altogether or allow critical pages and code to be pinned in memory - locked so the replacement algorithm cannot evict them. Many use fixed contiguous allocation, accepting the fragmentation in exchange for determinism. The same reasoning runs through the rest of the design: preemptive priority scheduling with bounded latency, priority inheritance to avoid unbounded priority inversion, and interrupt handlers kept short. The distinction is between hard real-time systems, where a missed deadline is a failure - flight controls, medical devices - and soft ones, where it merely degrades quality, as in video playback. Only the former forbids paging outright.

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: B

Correct answer: addresses are bound at execution time

Compaction moves running processes to consolidate the free space, which means a process must be able to change its physical location while it is loaded. That is possible only where addresses are bound at execution time, through a relocation register or a page table that the operating system can simply update. Where binding happens at compile time or load time, a process’s addresses are fixed once and for all, and moving it would leave every reference pointing at the wrong place. The purpose of compaction is to cure external fragmentation, gathering scattered holes into one usable block. Its cost is heavy: every process must be copied, and the system can do nothing else meanwhile, so it is used sparingly. Under paging, compaction is unnecessary rather than required - the second option inverts the relation. Paging removes external fragmentation by definition, since any free frame serves for any page and physical contiguity is never needed. The technique survives in garbage-collected runtimes, which compact the heap for the same reason.

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