Operating Systems and Memory Management Quiz Quiz

  1. Belady's Anomaly

    Which of the following page replacement algorithms suffers from Belady's anomaly?

    1. FIFO
    2. LRU
    3. Optimal Page Replacement
    4. Both LRU and FIFO
    5. LFU
  2. Swap Space

    What is the swap space in the disk used for?

    1. Saving temporary html pages
    2. Saving process data
    3. Storing the super-block
    4. Storing device drivers
    5. Storing the boot sector
  3. RAM and Performance

    Increasing the RAM of a computer typically improves performance because:

    1. Virtual memory increases
    2. Larger RAMs are faster
    3. Fewer page faults occur
    4. Fewer segmentation faults occur
    5. Increased processor speed
  4. Virtual Memory Elimination

    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?

    1. Efficient implementation of multi-user support is no longer possible
    2. The processor cache organization can be made more efficient now
    3. Hardware support for memory management is no longer needed
    4. CPU scheduling can be made more efficient now
    5. More memory becomes available
  5. TLB Tag Size

    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:

    1. 11 bits
    2. 13 bits
    3. 15 bits
    4. 20 bits
    5. 10 bits
  6. Virtual Memory Definition

    Virtual memory is:

    1. Large secondary memory
    2. Large main memory
    3. Illusion of large main memory
    4. None of the above
    5. A type of physical memory
  7. Page Fault

    Page fault occurs when:

    1. When a requested page is in memory
    2. When a requested page is not in memory
    3. When a page is corrupted
    4. When an exception is thrown
    5. When the disk is full
  8. Thrashing Condition

    Thrashing occurs when:

    1. When a page fault occurs
    2. Processes on system frequently access pages not memory
    3. Processes on system are in running state
    4. Processes on system are in waiting state
    5. When the system is overloaded
  9. Page Size Calculation

    A computer uses 46–bit virtual address, 32–bit physical address, and a three–level paged page table organization. The page table base register stores the base address of the first–level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second–level table (T2). Each entry of T2 stores the base address of a page of the third–level table (T3). Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16 way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes. What is the size of a page in KB in this computer?

    1. 2
    2. 4
    3. 8
    4. 16
    5. 32
  10. Page Colors

    Consider data given in the above question. What is the minimum number of page colours needed to guarantee that no two synonyms map to different sets in the processor cache of this computer?

    1. 2
    2. 4
    3. 8
    4. 16
    5. 32
  11. Difference between C++ and Java

    Which of the following is the key difference between C++ and Java?

    1. C++ supports pointers while Java does not
    2. Java allows direct memory manipulation, while C++ doesn't
    3. C++ is platform independent, while Java isn't
    4. Java is an imperative language, while C++ is object-oriented
    5. Java has header files, while C++ doesn't
  12. Array vs Linked List

    When should you prefer a linked list over an array data structure?

    1. When frequent element access is required by index
    2. When memory space is highly constrained and unknown
    3. When the size of the data structure is known beforehand
    4. When fast element retrieval is critical
    5. Only when fast insertions and deletions at the middle are needed
  13. Use of python in DS

    What makes Python a preferred choice for data science applications?

    1. Its native support for system-level programming
    2. Its extensive collection of libraries for data analysis and machine learning
    3. Its inherent ability to create mobile applications
    4. Its cost-effective database management solutions
    5. Its ability to use the code directly in web applications
  14. Importance of DSA in interviews

    Why is a strong foundation in Data Structures and Algorithms (DSA) important for software engineering interviews?

    1. It is the only factor that companies consider
    2. It demonstrates problem-solving skills and the ability to write efficient code
    3. It ensures familiarity with legacy systems and obsolete technologies
    4. It is crucial for UI and UX design
    5. It indicates the ability to manage teams effectively
  15. Web development technology

    Which front-end web technology is primarily used for building user interfaces with reusable components?

    1. Python
    2. ReactJS
    3. SQL
    4. Linux
    5. Docker