CS3013 Practice Second Exam

  1. True or False:

    1. You cannot get deadlock with semaphores.
    2. You cannot have deadlock with conditional critical regions.
    3. The operating system can disable interrupts to protect a critical region.
    4. A process may still be blocked indefinitely in a correct critical region solution.
    5. Semaphores are more commonly provided by operating systems than are monitors.

  2. What is a relocation register? What is it used for?

  3. Consider a logical address space of eight pages of 1024 words each, mapped onto a physical memory of 32 frames.

  4. Consider a computer system using variable sized partitions for memory management. The computer has 1M of user memory. It compacts once every second, moving all the allocated memory segments adjacent to each other at the top of the physical memory. It takes a microsecond to copy a byte, The average hole is 0.4 as large as the average allocated memory segment. On the average, what fraction of the total CPU time is used up by compaction?

  5. Consider a paging system with the page table stored in memory.

  6. Consider the following segment table:

        Segment      Base     Length
        _______      ____     ______
           0          219        600
           1         2300         14
           2           90        100
           3         1327        580
           4         1952         96
    
    What are the physical addresses for the following logical addresses?
    1. 0,430
    2. 1,10
    3. 2,500
    4. 3,400
    5. 4,112

  7. Consider a machine that has a 16-bit logical and physical address and 256 bytes per page. The page table is kept entirely in associative registers. When a process starts, the page table is copied to the registers from memory, at a rate of 1 byte every 10 nanoseconds. If a time quantum is 100 milliseconds (including loading the page table), what fraction of a process' CPU time is devoted to loading page tables?

  8. Does it make sense to have multiple hey processes read the heybox at the same time as long as there is only one hey processes writing to the heybox? Implement a solution that allows this.


Return to the CS3013 Home Page