

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The cs162 midterm 2 exam for the spring 1998 semester, covering topics such as the relocation table, segmentation vs paging, page replacement, and various scheduling algorithms. It includes multiple-choice questions and true/false questions.
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!


What is the relocation table? What is in it? How does the loader use it? (10)
Suppose we have hardware that supports segmentation. Could we use it to support paging instead? Why or why not? (10)
Could we do page replacement in main memory on a set associative basis? Why or why not? How would it work? What are the tradeoffs? (10)
Given that the following cylinders have I/O requests pending, that the requests arrived in the order shown, that the disk head is currently at track 9, and that the last two requests serviced were on cylinders 8 and 9 (in that order), show the sequence in which the I/O requests are serviced (by listing their cylinder numbers) for each of the following scheduling algorithms. (12) 4 19 20 2 10 21 7 1 26 3 9 11 a) FIFO b) SSTF c) SCAN d) CSCAN
Give the number of page faults for LRU, FIFO, OPT for the following reference string, for memories of size 3 and 4. (no partial credit...) (14) 5 4 3 2 5 4 6 5 4 3 2 6 Also give the number of page faults if the working set parameter is 3.5.   3 4 FIFO LRU OPT
Working Set:
The following questions are true/false. No partial credit will be given for missing answers. The questions you answer will be graded (right-wrong). (44)
___a. According to the "fast file system for unix" paper, the randomization of disk blocks over the disk
CS162, Midterm #2, Spring 1998
CS162, Spring 1998 Midterm 2 Professor Alan Smith 1
surface, as files were created and deleted, lead to a drop in read bandwidth by more than a factor of five, compared to a 'new' file system. ___b. A page frame is a fixed size portion of a process's address space. ___c. A page fault is a type of interrupt. ___d. Internal fragmentation is a problem for segmentation (as implemented without paging). ___e. The STBR points to the page table for a process. ___f. In the absence of paging, segments cannot exceed the physical memory size. ___g. A plausible MTBF for a disk is 30,000 days. ___h. In the absence of paging, the sum of the sizes of all segments cannot exceed the physical memory size. ___i. The 'memory map' is another name for the page table. ___j. Putting the user process page tables in the OS virtual memory avoids having to do a two step translation from virtual address to real address. ___k. When a page table is implemented as a hash table, it is called "an indirect page table". ___l. One solution to the problem of I/O buffers that span virtual addresses which map to non-contiguous page frames is to prevent those pages from being paged out during I/O. ___m. "ATC" and "DLAT" are synonyms for "TLB" (depending on which manufacturer we are considering.) ___n. The set in the TLB is typically selected using the high order virtual address bits. ___o. 'Working set restoration' is a page placement algorithm. ___p. MIN and LRU are both stack algorithms. ___q. The clock algorithm is also called "FINUFO". ___r. A plausible power dissipation for a disk is 3 watts. ___s. A compact disk can hold more data than a twelve inch reel of 9-track tape. ___t. There are current disks that spin at approximately 5000rps. ___u. A unix i-node has the file name in it. ___v. A unix i-node has a field showing the number of bytes in the file.
CS162, Midterm #2, Spring 1998
Problem #6 2