1、 turnaround time and throughput; meeting deadlines and predictability2. If we use round-robin schedule algorithm, then when the process runs out of time pieces it will turn to _. blocked; running; ready; suspend; swap; deadlock; exit; killed3. _ is a kind of special variable which can only be modifi
2、ed by two operations: wait( ) and signal( ). It can be used to implement the control mechanism among several asynchronously concurrent running processes, including _ and _. means to share resources exclusively, while applies to control the execution order between two processes in logic. _ is also a
3、special data structure used for the above control mechanism, which combines and together in one module. The _in is used to implement the function of . : scheduling; class; process; mutual exclusion; semaphore; control variable; condition variable; monitor, synchronization; shared variable; procedure
4、; dispatching4.The _ page replacement algorithm has Beladys Anomaly. LRU; OPT; FIFO; Round-robin 5. A 80G hard disk, each block size is 1K, and each table entry needs 4bytes, then its FAT need _ memory space. 100M; 160M; 320M; 480M6. The two basic features of an OS are _ and sharing. concurrency; ef
5、ficiency; virtualization; asynchronism; convenience7. There are four main methods of transferring information between CPU and I/O, as programming (or polling), _, _, and _. spooling; interrupt; PCI; DMA; SCSI; USB; north bridge; south bridge; channel; printer port8. A computer uses the dynamic reloc
6、ation scheme. A program is 5,000 bytes long and is loaded at address 2,400. Then the base registers value should be _, and the limit registers value should be 2400; 7400; 5000; 26009. When we manage the memory by using Paging with Segmentation. The virtual address is divided to three parts, as _, _
7、and offset. segment number; segment partition; main boot section; page number; page fault; page restore; page age; offset; cache; TLB; pointer; page frame 10Disk access time is constituted by the , , and data transmission time. schedule time; seek time; sector time; rotational latency time; cylinder
8、 timeSection 2. Selection. There are 10 questions, and 2 scores per question, in total 20 scores. Just 1 answer is correct in the 4 selects, please choose it out.1. Two processes, A and B, each need three records, 1, 2, 3, in a database. If A asks for them in the order 1, 2, 3, then in which order B
9、 asks for them, deadlock is not possible. ( )A. 1, 2, 3 B. 2, 1, 3 C. 3, 2, 1 D. 1, 3, 2 2. It is sure that the transition ( ) is never occurring in the process 3 states.A. running-ready B. ready - waitingC. running-waiting D. waiting-ready 3. The initial value of a semaphore is 2. Its current value
10、 is -1 now. That means there is/are ( ) processes waiting for this semaphore.A. 0 B.1 C. 2 D. 34. In a single processor system, there are 10 processes in the system, and then the most amount of process in the running state is ( ).A 1 B 8 C 10 D 95. Let the memory access time be 100 nanoseconds and t
11、he average page-fault service time be 8 milliseconds. What is the maximum acceptable page-fault rate for all effective access time of no more than 10 microseconds? ( )Note: 1 nanosecond = 10-9 s; 1 milliseconds = 10-3 s;1 microseconds=10-6 sA. 0.224% B. 0.124% C. 1.24% D. 2.24%6. From the directory
12、and the FAT given as follows, we know the last block of the file wise is ( ).FAT/162384957File name First blockwisestarA. 0 B. 2 C. 5 D.77. There are 4 jobs, arrived almost simultaneously with the order: J1 J2 J3 J4. Those running time are listed as follow.JOBRUNNING TIMEJ110 minutesJ24 minutesJ36 m
13、inutesJ42 minutesWhat is the average turnaround time for the four jobs using Round-Robin scheduling algorithm with time slice equals to 2 minutes? ( ) A. 13 minutes B. 15 minutesC. 14 minutes D. 16 minutes 8. In a new file system, the free-space is managed using Bit Vector. Suppose that block size e
14、quals 2Kbytes and the disk size is 8 gigabyte. It is easy to see that the bitmap for the disk contains ( ) blocks.A. 64 B. 128 C. 256 D. 5129. In Contiguous Memory Allocation strategy, the leftover 剩余的;边角料的 space, after program assignment, is called _ fragmentation. A. external B. waste C. internal
15、D. allocated10. There are 4 processes sharing 9 resources. For dynamically avoid deadlock, the most number of resource which every process could request isA. 1 B. 2 C. 3 D.4Section 3. Answer the following questions. There are 4 questions, in total 20 scores1 (5pts). A computer has six tape drives, w
16、ith n processes competing for them. Each process may need two drives. For which values of n is the system deadlock free?2 (5pts). Consider the following segment table:SegmentBaseLength120600210018860100What are the physical addresses for the following logical addresses?(a) 0, 430(b) 1, 20(c) 2, 643
17、(5pts). Consider the traffic deadlock depicted in the following figure. a) Point out that which resources are mutual exclusion. Which conditions are hold and requesting? Which condition is non- preemptable? Which one is circle waiting?b) State a simply rule for avoiding deadlocks in this system. (He
18、re, A, B, C, and D are intersections.)4 (5pts). Consider the following snapshot of a system:AllocationMaxAvailableABCDP1P2P3P4P5Answer the following questions using the bankers algorithm:(a) What is the content of the matrix Need?(b) Is the system in a safe state?(c) If a request from process P3 arr
19、ives for (0, 2, 0, 0), can the request be granted immediately?Section 4. Calculations. There are 4 questions, in total 30 scores.1 (6pts). Here is a multi-programming system, which has 1 processor and two IO devices. Three jobs, called J1, J2 and J3, come at the same time. J1 has highest priority, J
20、2 has second one, and J3 has third. The time sequences they use are listed as follows.J1: I2(30ms); CPU(10ms); I1(30ms); I2(20ms)J2: I1(20ms); CPU(20ms); I2(40ms)J3: CPU(30ms); I1(10ms)In the system, CPU operation and IO operation (IO1 and IO2) work in parallel, and IO1 and IO2 are also working para
21、llel. The CPU utilization can be preempted, but the IO operation cannot be preempted.Your tasks are:(a) Calculate the time when they arrived till they have finished. (b) Calculate the utilization time of CPU.(c) The utilization time of IO devices.2 (7pts). Suppose that a disk drive has 200 cylinders
22、, numbered 0 to 199. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FlFO order, is:86, 147, 91, 177, 94, 150, 102, 175, 130.Starting from the current head position, what is the total distance (in cylinders) th
23、at the disk arm moves to satisfy all the pending requests for each of the following disk-scheduling algorithms?(a) FCFS (b) SSTF (c) SCAN 3 (8pts). Given memory partitions of 100K, 500K, 200K, 300K, and 600K (in order), how would each of the following algorithms place processes of 202K, 407K, 126K,
24、and 416K (in order)?(a) First-fit (b) Best-fit (c) Next-fit (d) Worst-fit 4 (9pts). An OS uses request paging system in memory management. Assume the capacity of the main memory is 300 byte, which is divided into 3 frames. The process will access the following Logical address byte series: 215, 328,
25、160, 68, 346, 132, 368, 432, 660, and 767.(a) Writing down the page-reference string sequence.(b) Analyze the page replacement situation and calculate the page fault frequency when LRU and FIFO algorithm is used Section 5. Program:There are 2 questions, in total 10 scores.1. There is a plate on the
26、table and it could only contain one fruit. Dad Frank could put the apple on it and mum Jessica could put the orange on it. But they do such jobs by mutual exclusion. Son Tom fetches the orange only and daughter Anne fetches apple only. They do it by mutual exclusion, too. Please write down Frank, Je
27、ssica, Tom and Annes programs by using down-up operating correctly.Solution:Semaphore empty=, apple=0, orange=0;Process Father () wait(empty) ; put_apple; ;Process Mather () put_orange;Process Son () get_orange; signal(empty);Process Daughter ( ) ; get_apple;2. Dining philosopher (DP) problem is one popular instance of OSs synchronization problems. Here is the unfinished pseudo code for a DP problem with five philosophers. Please complete it.semaphore chopstick5 = ;semaphore coord = 4;Process Philosopher (i) while (1) wait( ); wait(chopsticki); wait( );
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1