1、 a collection. of files and a , which organizes and provides information about all files in the system.(10) Considering file access methods and file disk space allocation, access is adapt to the files of linked allocation2. CHOICE (1* 13 points)(1) Which one is not the main task of an operating syst
2、em? A. Process managementB. Language translationC. File managementD. memory management(2) Which of the following system has strict time constraint?A. batch system B. time-sharing system C. real-time system D. interactive system(3)A starvation-free job-scheduling policy guarantees that no job waits i
3、ndefinitely for service .Which of the following job-scheduling policies is starvation free?A. Round Robin B. Priority C. Shortest Job First D. None of the above(4)In operating systems,the semaphore stands for instances of resource,it is a integer variable relevant to a queue ,its value can only be c
4、hanged by operation WAIT and SIGNAL .If a semaphore S is initialized to 5,now its value is 2,how many processes is or are waiting in the queue relevant to S. A.3 B.2C.1D.0(5) The Banker Algorithm is used for .A. deadlock avoidanceB. deadlock preventionC. deadlock detection.D. deadlock recovery(6) Wi
5、th respect to binding of instructions and data to memory addresses, if address binding is done at ,the hardware MMU is needed.A. Coding time B. compile time C. load time D. execution time(7) Considering the following memory management schemes, will maximize memory utilization.A. fixd-sized partition
6、s (MVT).B. pagingC. segmentation will(8) Consider a machine in which all memory-reference instructions have only one memory address, and one-level indirect addressing is allowed, if an instruction is assumed to be stored in one frame, then the minimum number of frames per process is .A. oneB. twoC.
7、threeD. four(9) The file system itself is generally composed of several different levels. In these levels, the manages metadata and is responsible for protection and security.A. logical file systemB. file-organization moduleC. basic fie systemD. I/O control(10) Which allocation scheme would work bes
8、t for a file system implemented on a device (e.g. a tape drive) that can only be accessed sequentially?A. linked allocationB. contiguous allocationC. index allocationD. none of them(11) The disk free-space list is implemented as a bitmap. If the size of the disk space is 128 blocks, and each block i
9、s of 512 bytes, then bytes are needed to store the bitmap.A. 128B. 512C. 16D. 8192(12) With respect to disk 1O operations, the executes IO instructions to control the disk controller to access data on disksA. file systemB. kernel I/O subsystemC. application process D. driver(13) The following charac
10、teristics except are correct for disks.A. secondary storageB. read-write devicesC. random-access devicesD. character-stream devices3. ESSAY QUESTIONS (27 points)3.1 (6 points)Explain the following terms1) deadlock (3 points)(2) demand paging (3 points)3.2 (6 points)In a multiprogramming system, cons
11、ider the following diagram of process state transitions,1) Is it possible that the transition 2 of a process can cause the transition 1 for a process? If yes,give an example;Ii not,why?(3 points)2) Is it possible that the transition 4 of a process can cause the transition 1 for a process?If not,why?
12、3.3 (4 points)In a paging system, the page table is stored in main memory, and the active page entries are also bold in high-speed associate memory TLB (translation look-aside buffer). If it takes 100 nanoseconds to search the TLB, and 180 nanoseconds to search page table in main memory. What must t
13、he TLB hit ratio be to achieve an effective access time (EAT) of 150ns?3.4 (6 points) In the file system on a disk with physical block sizes of 512 bytes, a file is made up of 128-byte logical records, and each logical record cannot be separately stored in two different blocks. The disk space of the
14、 file is organized on the basis of indexed allocation, and a block address is stored in 4 bytes. Suppose that 2-level index blocks is used to manage the data blocks of the file, answer the following questions:1) What is the largest size of the file? (3 points)2) Given 2000, the number of a logical r
15、ecord the file, how to find out the physical address of the record 2000 in accordance with the 2-level index blocks (3 points)3.5 (5 points)A file is made up of 128-byte fix-sized logical records and stored on the disk in the unit of the block that is of 1024 bytes. The size of the file is 1024 byte
16、s. Physical I/O operations transfer data on the disk into an OS buffer in main memory, in terms of 1024- byte block. If a process issues read requests to read the files records in the sequential access manner, what is the percentage of the read requests that will result in IO operations?4. (12 point
17、s)Considering a real-time system, in which there are 4 real-time processes P1, P2, P3 and P4, that are aimed to react to 4 critical environmental events e1, e2, e3 and e4 in time respectively.The arrival time of each event ei, 1i4, (that is, the arrival time of the process Pi), the length of the CPU
18、 burst time of each process Pi, and the deadline for each event ei; are given below. Here, the deadline for ei is defined as the absolute time point before which the process Pi must be completed.The priority for each event ei (also for Pi) is also given, and a smaller priority number implies a highe
19、r priority.EventsProcessArrival TimeBurst TimePrioritiesDeadlinee1P10.004.0037.00e2P23.002.0015.50e3P3412.01e4P46.00211.00(1) Suppose that priority-based preemptive scheduling is employed, (6 points)a) Draw a Gantt chart illustrating the execution of these processesb) What are the average waiting ti
20、me and the average turnaround timec) Which event will be treated wih in time, that is the process reacting to this event will be completed before its deadline?(2) Suppose that FCFS scheduling is employed, (6 points)a) Draw aGantt chart illustrating the execution of these processesb) What are the ave
21、rage waiting time and the average turnaround time c). Which event will be treated with in time?5. (16 points) Here is a plate that can contain 3 fruits. The father puts apples and the mother puts oranges into the plate. The daughter takes apples and the son takes oranges from the plate to eat. The f
22、ather, mother, daughter and son are permitted only to operate on the plate in a mutually exclusive mode, and only one apple or one orange can be put into or taken from the plate each time.Please design four semaphore-based processes for the father, mother, daughter and son-to correctly operate on th
23、e plate.Requirements:.1) Define the semaphores used to synchronize the processes, describe simply the role of each semaphore, and give their initial values. (4 points)2) Illustrate the structures of, processes for the father, mother, daughter and son.(12 points)AllocationRequestAvailable6. (12 point
24、s)Considering a system with five processes P0 through P4 and three resource types A, B and C. Resource types A has 4 instances, B has 3 instances and C has 6 instances. Suppose that, at time T0, we have the following resource-allocation state,ABCP06Answer following questions by means of the deadlock
25、-detection algorithm(1) Is the system in a deadlocked state? and why? (6 points)(2) If P0 requests one additional instance of type B; what is the Request Matrix? Is there a deadlock in the system?7. (10 points)A cache is a region of faster memory that holds copies of data. Most systems have one or m
26、ore high-speed data caches in the memory hierarchy. Information (e.g. the instruction or data) is normally kept in main memory. As it is used, it is copied-into the cache. When a particular piece of information is-needed, we first check whether it is in the cache. If it is, we use the information directly from the cache; if it is mot, we use the information from the main memory and put a copy in the cache under the assumption that we will need it again soon.8 / 10In a paging system, the-main memory is divided into 1024 frames
copyright@ 2008-2023 冰点文库 网站版权所有
经营许可证编号:鄂ICP备19020893号-2