Consider the following segment table:What are the physical addresses for the following logical addresses?a) 0, 550b) 5, 100c) 2, 480d) 1,103e) 4, 120
查看答案
Consider the following page reference string: 1, 2, 3, 4, 5, 6, 3, 4, 5, 6, 1, 2, 1, 0, 1, 0, 5.With 4 frames, how many page faults would occur with the following page replacement algorithms? Fill in the tables accordingly. (Remember all frames are initially empty, so your first unique pages will all cost one fault each.) RS: reference strings; F0: frame 0, F1: frame 1, etc.a). OPT (5 points)Total page fault?b). LRU (6 points)Total page fault?
The logical address space is 64KB and the physical address space is 32KB in a system, and the system is addressed by byte. If a process needs 6 pages, the page size is 1KB. The operating system allocates 4 frames to this process by using fixed allocation and local replacement strategy as in the following table(not page table).When the process is executing, it wants to access the data whose logical address of 13BAH at time 160.
Given a hard disk of 200 tracks (Track 0‐199) with Track 0 being the innermost track. Write down the track numbers the disk head will travel for the following 4 disk scheduling algorithms with the following sequence of disk track requests: 93, 129, 98, 110, 43, 155, 150, 47, 40. The disk head has just finished a request at track 115 and is currently at track 108. What is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests.1)FCFS 2)SCAN 3)SSTF 4)C-LOOK
A database is shared among several concurrent processes. Reader processes want only to read the database, whereas writer processes want to update the database. Readers can access the shared data simultaneously, while the writers should have exclusive access to the shared database. Now you need to solve the problem using semaphores.The semaphore mutex is used to ensure mutual exclusion when the variable readcount is updated. he readcount variable keeps track of how many processes are currently reading the object. The semaphore wrt functions as a mutual-exclusion semaphore for the writers.(1) Initialize the semaphore mutex and wrt.(2 points)(2) Given the code of writer processes, please write the code of reader processes.(8 points)