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

Memory Management Questions and Answers

71.

If there are 32 segments, each of size 1Kb, then the logical address should have :

Answer: A

Correct answer: 15 bits

Selecting one of 32 segments needs \( \log_{2}32 = 5 \) bits, and an offset within a 1 KB segment needs \( \log_{2}1024 = 10 \) bits:

\[ 5 + 10 = 15\ \text{bits} \]

Please log in or register to report this question.

73.

To subnet LAN directly on the network server and to protect the resources of company that receives internet access through a network or gateway resources, the device which is best suited is

Answer: C

Correct answer: A multi-homed firewall

A multi-homed firewall has an interface on each network it joins, so it both separates the subnets and applies rules to everything passing between them and the outside. A router or VLAN separates without filtering, and a modem does neither.

Please log in or register to report this question.

Answer: B

Correct answer: between 0 and segment limit

An offset is a distance from the start of the segment, so it is legal from 0 up to but not including the limit. Anything else refers outside the segment and is trapped.

Please log in or register to report this question.

Answer: D

Correct answer: The page table becomes large but internal fragmentation is low

A small page size reduces internal fragmentation, since the waste is on average half a page per process. But it multiplies the number of pages, so the page table grows - consuming memory and requiring more levels of indirection. It also reduces TLB coverage: each TLB entry maps less of the address space, so a given program touches more entries and the miss rate rises. And disk transfers become less efficient, because the fixed cost of a seek is amortised over less data. A large page size reverses all four: smaller table, better TLB coverage, more efficient transfers, but more internal fragmentation and more data transferred that may never be used. The compromise most systems have settled on is 4 KB, with support for huge pages of 2 MB or 1 GB where a database or a virtual machine host benefits from the reduced TLB pressure. Page size is always a power of two, so that splitting an address into page number and offset requires no arithmetic.

Please log in or register to report this question.

Answer: D

Correct answer: the page that has not been used for the longest time

LRU evicts the page whose most recent use lies furthest in the past, on the reasoning that a page unused for a long time is unlikely to be needed soon - the principle of temporal locality. It approximates the theoretical optimal algorithm, the third option, which evicts the page that will next be needed furthest in the future. That is unimplementable, since it requires knowledge of the future, but it is used as a benchmark against which real algorithms are measured. FIFO, the second option, evicts the oldest-loaded page and is simple but poor, and it suffers Belady’s anomaly: adding more frames can increase the number of page faults, which is deeply counter-intuitive. LRU belongs to the class of stack algorithms and cannot exhibit it. True LRU is expensive to implement, needing a timestamp or a stack updated on every reference, so real systems approximate it with reference bits - the clock or second-chance algorithm being the usual method.

Please log in or register to report this question.

Answer: A

Correct answer: replacement algorithms that approximate LRU

The reference bit is set by hardware whenever a page is read or written, and cleared by the operating system. It is used by replacement algorithms that approximate LRU. The need arises because true LRU is too expensive. Maintaining an exact ordering of pages by last use requires a timestamp or a stack updated on every memory reference, which no practical hardware provides. The reference bit is set for free as a side effect of the access, and one bit is enough to distinguish pages used since the last sweep from pages not used at all. The second-chance or clock algorithm uses it directly: a page at the head of the queue with its bit set is spared and the bit cleared, so only a page unused since the last sweep is evicted. The additional-reference-bits refinement keeps a byte per page, shifting the reference bit in at intervals, which gives a coarse history rather than a single bit and approximates LRU more closely at modest cost.

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