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

Memory Management Questions and Answers

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.

Answer: A

Correct answer: share pages until one of them writes, at which point the page is duplicated

Copy-on-write lets a newly created process share its parent’s pages, marking them read-only. Only when one of the two attempts to write is the page duplicated, and only that page. The saving is large. Creating a process by copying the whole address space is expensive, and it is usually wasted: on Unix systems a fork is very often followed immediately by an exec, which replaces the address space entirely. Copy-on-write makes process creation nearly free in that common case. The mechanism is a page fault. The shared pages are marked read-only in both page tables; a write raises a protection fault; the operating system recognises the page as copy-on-write, allocates a free frame, copies the contents, and marks the new page writable for the faulting process. Pages never written are never copied, so a large shared library or a read-only data segment costs nothing. The same technique is used for memory-mapped files and for snapshots in file systems and virtual machines.

Please log in or register to report this question.

Answer: D

Correct answer: FIFO order, but a page with its reference bit set is spared and the bit cleared

The second-chance algorithm is FIFO with one modification. When a page reaches the head of the queue, its reference bit is examined: if the bit is 0 the page is replaced, and if it is 1 the bit is cleared and the page is given another chance, moving to the back of the queue as though newly loaded. Implemented as a circular queue with a pointer sweeping round it, this is known as the clock algorithm, and the pointer is the clock hand. Its purpose is to approximate LRU at almost no cost. True LRU needs a timestamp or a stack updated on every memory reference, which is too expensive; the reference bit is set by hardware for free, and one bit is enough to distinguish pages used recently from pages not used at all. An enhanced version considers the dirty bit as well, preferring to evict pages that are both unreferenced and unmodified, since those need no write-back. Most real operating systems use some variant of it.

Please log in or register to report this question.

Answer: B

Correct answer: each physical frame of memory

An inverted page table has one entry per physical frame rather than per virtual page. Each entry records which process and which virtual page currently occupy that frame. The motivation is size. An ordinary page table exists per process and covers the whole virtual address space, so with many processes and large address spaces the tables consume a great deal of memory. An inverted table is a single system-wide structure whose size is fixed by physical memory, which is far smaller. The cost is the search. Translation now requires finding the entry containing a given process and page number, which is a search rather than an index - potentially through the whole table. Real implementations use a hash table to bound it, and the TLB to avoid it in most cases. A second drawback is that shared memory becomes awkward, since one frame can have only one entry, and shared pages belong to several processes at once. The scheme has been used on architectures such as PowerPC and UltraSPARC.

Please log in or register to report this question.

Answer: C

Correct answer: bits in each page table entry marking a page read-only or invalid

Protection is enforced through bits in the page table entry. Each entry carries a valid bit, saying whether the page belongs to the process’s address space at all, and permission bits marking it read-only, read-write or execute-only. The hardware checks these on every access and traps to the operating system on a violation. The mechanism is cheap because the page table must be consulted for translation in any case, so the check costs nothing extra. It also provides isolation at no additional cost: a process can only name addresses through its own page table, so it simply cannot express an address in another process’s memory. That is the foundation of process separation in every modern operating system. The no-execute bit, added to mainstream processors in the 2000s, is a security refinement of the same idea: marking data pages non-executable defeats a large class of attacks that inject code into a buffer and jump to it. Sharing is arranged by mapping the same frame into two page tables with different permissions.

Please log in or register to report this question.

Answer: B

Correct answer: It is used for live conferencing

Video conferencing carries live picture and sound between two or more places at once, so a meeting can be held without the participants travelling. Ordinary communication and talking are what it is a particular form of, not what distinguishes it.

Please log in or register to report this question.

108.

The connection of network which can only be attached to is

Answer: A

Correct answer: Intranet

An intranet uses internet technologies but is reachable only from inside the organisation. An extranet extends limited access to chosen outsiders, and a VPN carries a private connection over the public internet.

Please log in or register to report this question.

Answer: C

Correct answer: the routine is loaded into memory only when it is first called

Dynamic loading defers bringing a routine into memory until it is first called. All routines are held on disk in a relocatable format; when one is called, the loader checks whether it is resident, loads and relocates it if not, and transfers control. The benefit is that unused routines are never loaded at all. Error-handling code, which may account for a large part of a program and is rarely executed, costs nothing unless an error occurs. It requires no support from the operating system - it is the responsibility of the program - though libraries are usually provided to make it convenient. It should be distinguished from dynamic linking, where the linking of a library is postponed until execution and a stub in the program locates the shared routine on first use. Dynamic linking allows a single copy of a library in memory to serve every process, and lets the library be patched without relinking every program that uses it. Both differ from static loading and linking, where everything is bound before execution begins.

Please log in or register to report this question.

110.

The internal network of a company is very large and would like to subnet into smaller parts. From the options given below, the device that will not be used to separate LAN and still protect critical resources is 

Answer: A

Correct answer: The modem between computers

Routers, firewalls and switches all divide a network into parts and control what passes between them. A modem converts signals for transmission over a line; it does not subnet anything or filter traffic, so it neither separates the LAN nor protects it.

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