精華區beta NTU-Exam 關於我們 聯絡資訊
課程名稱︰ 作業系統 課程性質︰ 系必修 課程教師︰ 郭大維 開課學院: 電資 開課系所︰ 資工系 考試日期(年月日)︰ 2011/11/17 考試時限(分鐘): 180分鐘 是否需發放獎勵金: 需要 (如未明確表示,則不予發放) 試題 : The exam is 180 minutes long. The total score is 107pts. Please read the questions carefully. 1. Terminologies (24pts). a. Security b. A Layered Approach in OS Designs c. Para-virtualization d. Lightweight Process e. NUMA f. Deterministic Modeling g. Race Condition h. Write Ahead Logging 2. Please answer following questions regarding the design the design of operation systems(22pts) a. There are two conflicting goals in OS designs: Convenience and Efficiency. Please give me one example feature of OS that shows the conflict in persuing efficiency and convenience (Hint: Live preview of open windows for Windows7 taskbar). (5pts) b. What is the main goal of Unix process init? Is init a user or kernel process?(8pts) c. Please explain how I/O protection is done.(5pts) d. Give me one advantage in OS implementations in some high-level language. (4pts) 3. Please answer the following questions for process managment.(16pts) a. Inside the Process Control Block, we might have a filed "Program Counter". What is the purpose of the field?(4pts) b. There are a lot of segments for a process image, such as code segment, data segment, heap, and user stack. When we call malloc() or free(), which segment is involved?(4pts) c. When a parent process calls fork() to create a child process, how does the parent process know the process ID of the created child process? (4pts) d. Which of the following IPC mechanisms does not require two communicating processes to have a parent-child relationship: Named Pipes and sockets.(4pts) 4. Please answer the following questions for CPU scheduling.(17pts) a. Compared to user-level threads, why the cost of context switching for kernel-level threads in higher?(4pts) b. The delivery of a signal for theads is complicated. Give me an example signal that should be delivered to the threads to which the signal applies.(4pts) c. For preemptive scheduling, there are serveral occasions in triggering scheduling. Please give me three, beside the one in which a running process terminates by itself.(9pts) 5. Consider Shortest-Job-First(SJF) and Round-Robin(RR) scheduling algorithms, and processes under considerations are only of one single CPU burst and are all ready at time 0. Please answer the folowing questions. Explanation is needed to receive any credit:(18pts) a. Is SJF always better than RR, for any time quantum, in terms of the average turnaround time?(6pts) b. When all processes are of the same size, please tell us what the best time quantum is for RR in terms of the average waiting time.(6pts) c. Now suppose that processes might arrive at different times, and SJF and RR are preemptive scheduling algorithms. Is SJF always better than RR, for any time quantum, in terms of the average waiting time.(6pts) 6. Please design a solution for airplanes to land in an airport. Suppose that there is only one runway in the airport. Please make sure that only one airplane can control the runway to land at a time, and there should be no starvation for your solution.(Hint:(1)the Bakery Algorithm; (2)Each process donotes an airplane.) (10pts) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.4.196