1. Which of the following page replacement algorithms suffers from Belady’s anomaly?
A) FIFO B) LRU C) Optimal Page Replacement D) Both LRU and FIFO
Answer:
A
Explanation - Belady’s anomaly proves that it is possible to have more page faults when increasing the number of page frames while using the First in First Out (FIFO) page replacement algorithm.
2. What is the swap space in the disk used for?
A) Saving temporary html pages
B) Saving process data
C) Storing the super-block
D) Storing device drivers
Answer:
B
Explanation - Virtual memory is a combination of RAM and disk space that running processes can use. Swap space is the portion of virtual memory that is on the hard disk, used when RAM is full.
3. A computer system supports 32-bit virtual addresses as well as 32-bit physical addresses. Since the virtual address space is of the same size as the physical address space, the operating system designers decide to get rid of the virtual memory entirely. Which one of the following is true?
A) Efficient implementation of multi-user support is no longer possible
B) The processor cache organization can be made more efficient now
C) Hardware support for memory management is no longer needed
D) CPU scheduling can be made more efficient now
Answer:
C
Explanation - For supporting virtual memory, special hardware support is needed from Memory Management Unit. Since operating system designers decide to get rid of the virtual memory entirely, hardware support for memory management is no longer needed
4. A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative. The minimum size of the TLB tag is:
A) 11 bits
B) 13 bits
C) 15 bits
D) 20 bits
Answer:
C
Explanation - Size of a page = 4KB = 2^12
Total number of bits needed to address a page frame = 32 – 12 = 20
If there are ‘n’ cache lines in a set, the cache placement is called n-way set associative. Since TLB is 4 way set associative and can hold total 128 (2^7) page table entries, number of sets in cache = 2^7/4 = 2^5. So 5 bits are needed to address a set, and 15 (20 – 5) bits are needed for tag.
5. Virtual memory is
A) Large secondary memory
B) Large main memory
C) Illusion of large main memory
D) None of the above
Answer:
C
Explanation - Virtual memory is a section of volatile memory created temporarily on the storage drive. It is created when a computer is running many processes at once and RAM is running low.
6. Thrashing occurs when
A) When a page fault occurs B) Processes on system frequently access pages not memory C) Processes on system are in running state
D) Processes on system are in waiting state Answer:
B
Explanation - Thrashing occurs processes on system require more memory than it has.
If processes do not have “enough” pages, the pagefault rate is very high. This leads to: – low CPU utilization – operating system spends most of its time swapping to disk
The above situation is called thrashing
7. CPU fetches the instruction from memory according to the value of ?
A) program counter
B) status register
C) instruction register
D) program status word
Answer:
A
Explanation -
The CPU fetches the instructions one at a time from the main memory into the registers. One register is the program counter (pc). The pc holds the memory address of the next instruction to be fetched from main memory. The CPU decodes the instruction. The CPU executes the instruction. Repeat until there are no more instructions.
8. A memory buffer used to accommodate a speed differential is called ?
A) stack pointer
B) cache
C) accumulator
D) disk buffer
Answer:
B
Explanation -
Cache serves to add fast memory between the CPU and main memory. Cached data is stored temporarily in an accessible storage media that's local to the cache client and separate from the main storage. Cache is commonly used by the central processing unit (CPU), applications, web browsers and operating systems.
9. Run time mapping from virtual to physical address is done by ?
A) Memory management unit
B) CPU
C) PCI
D) None of the mentioned
Answer:
A
Explanation -
A computer’s memory management unit (MMU) is the physical hardware that handles its virtual memory and caching operations. The MMU is usually located within the computer’s central processing unit (CPU), but sometimes operates in a separate integrated chip (IC). All data request inputs are sent to the MMU, which in turn determines whether the data needs to be retrieved from RAM or ROM storage.
10. What is compaction?
A) a technique for overcoming internal fragmentation
B) a paging technique
C) a technique for overcoming external fragmentation
D) a technique for overcoming fatal error
Answer:
C
Explanation - Compaction is a process in which the free space is collected in a large memory chunk to make some space available for processes. In memory management, swapping creates multiple fragments in the memory because of the processes moving in and out. Compaction refers to combining all the empty spaces together and processes.
11.The first fit, best fit and worst fit are strategies to select a __
A) process from a queue to put in memory
B) processor to run the next process
C) free hole from a set of available holes
D) all of the mentioned
Answer:
C
Explanation -
When it is time to load a process into the main memory and if there is more than one free block of memory of sufficient size then the OS decides which free block to allocate.
12. In internal fragmentation, memory is internal to a partition and ?
A) is being used
B) is not being used
C) is always used
D) none of the mentioned
Answer:
B
Explanation -
Internal fragmentation happens when the memory is split into mounted-sized blocks. Whenever a method is requested for the memory, the mounted-sized block is allotted to the method. just in case the memory allotted to the method is somewhat larger than the memory requested, then the distinction between allotted and requested memory is that the internal fragmentation.
13. External fragmentation exists when?
A) enough total memory exists to satisfy a request but it is not contiguous
B) the total memory is insufficient to satisfy a request
C) a request cannot be satisfied even when the total memory is free
D) none of the mentioned
Answer:
A
Explanation -
External fragmentation happens when there’s a sufficient quantity of area within the memory to satisfy the memory request of a method. However, the process’s memory request cannot be fulfilled because the memory offered is in a non-contiguous manner. Whether you apply a first-fit or best-fit memory allocation strategy it’ll cause external fragmentation.
14. The address loaded into the memory address register of the memory is referred to as ?
A) Physical address
B) Logical address
C) Neither physical nor logical
D) None of the mentioned
Answer:
A
Explanation -
Physical address refers to a memory address or the location of a memory cell in the main memory. It is used by both hardware and software for accessing data. Software, however, does not use physical addresses directly; instead, it accesses memory using a virtual address. A hardware component known as the memory management unit (MMU) is responsible for translating a virtual address to a physical address.
15. Another solution to the problem of external fragmentation problem is to ?
A) permit the logical address space of a process to be noncontiguous
B) permit smaller processes to be allocated memory at last
C) permit larger processes to be allocated memory at last
D) all of the mentioned
Answer:
A
Explanation - External fragmentation occurs when total unused memory space is enough to answer all the allocation requests. Here the memory is non-contiguous. Therefore, the memory has empty blocks scattered all over, which are insufficient to be allocated to other programs.
16. With relocation and limit registers, each logical address must be _______ the limit register.
A) less than
B) equal to
C) greater than
D) none of the mentioned
Answer:
A
Explanation - Base register contains value of smallest physical address and Limit register contains range of logical addresses . Each logical address must be less than the limit register.
17. In contiguous memory allocation ?
A) each process is contained in a single contiguous section of memory
B) all processes are contained in a single contiguous section of memory
C) the memory space is contiguous
D) none of the mentioned
Answer:
A
Explanation - Contiguous memory allocation is basically a method in which a single contiguous section/part of memory is allocated to a process or file needing it. Because of this all the available memory space resides at the same place together, which means that the freely/unused available memory partitions are not distributed in a random fashion here and there across the whole memory space.
18. Memory management technique in which system stores and retrieves data from secondary storage for use in main memory is called?
A) fragmentation
B) paging
C) mapping
D) none of the mentioned
Answer:
B
Explanation - Memory paging is a memory management scheme by which a computer stores and retrieves data from secondary storage for use in main memory. In this scheme, the operating system retrieves data from secondary storage in same-size blocks called pages.
19. The base register is also known as the ?
A) basic register
B) regular register
C) relocation register
D) delocation register
Answer:
C
Explanation - Relocation registers used to protect user processes from each other, and from changing operating-system code and data. – Base register contains value of smallest physical address – Limit register contains range of logical addresses – each logical address must be less than the limit register.
20. When the memory allocated to a process is slightly larger than the process, then ?
A) internal fragmentation occurs
B) external fragmentation occurs
C) both internal and external fragmentation occurs
D) neither internal nor external fragmentation occurs
Answer:
A
Explanation - Internal fragmentation happens when the memory is split into mounted-sized blocks. Whenever a method is requested for the memory, the mounted-sized block is allotted to the method. just in case the memory allotted to the method is somewhat larger than the memory requested, then the distinction between allotted and requested memory is that the internal fragmentation.
21. A solution to the problem of external fragmentation is ?
A) compaction
B) larger memory space
C) smaller memory space
D) none of the mentioned
Answer:
A
Explanation - Compaction is a process in which the free space is collected in a large memory chunk to make some space available for processes. In memory management, swapping creates multiple fragments in the memory because of the processes moving in and out. Compaction refers to combining all the empty spaces together and processes.
The Tech Platform
Subscribe us at www.thetechplatform.com for more information.
Comments