Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
UNIVERSITI TENAGA NASIONAL College of Information Technology BACHELOR OF INFORMATION TECHNOLOGY (HONS.) BACHELOR OF COMPUTER SCIENCE (HONS.) FINAL EXAMINATION SEMESTER II 2012/2013 OPERATING SYSTEM CONCEPTS (CSNB224) January 2013 Time allowed: 2 hours 30 minutes + 10 minutes for reading INSTRUCTIONS TO CANDIDATES 1. The total marks for this exam is 100 marks. 2. There are THREE (3) SECTIONS to this paper; Section A, Section B and Section C. 3. Answer ALL questions in the answer booklet provided. DO NOT OPEN THIS QUESTION PAPER UNTIL YOU ARE INSTRUCTED TO DO SO THIS QUESTION PAPER CONSISTS OF 9 PRINTED PAGES INCLUDING THIS PAGE Page 1 of 9 SECTION A: TRUE / FALSE (10 QUESTIONS, 10 MARKS) Instruction: Indicate whether each of the following statements is TRUE or FALSE. 1. The ability to evolve is one of the objectives of the operating system. 2. In a uniprogramming system, processor must wait for the input/output instruction to complete before it can execute the next program. 3. A two-state process model consists of Not Running and Running states. 4. In the Five-State Process Model, Running Exit represents a valid state transition. 5. The Process Control Block refers to the binary form of the program code. 6. The basic thread operation related to the change in thread state that occurs when a thread needs to wait for an event is referred to as the spawn operation. 7. Multiple threads may be created and executed within a single process. 8. An echo procedure running on a multiprocessor system can produce erroneous output if access to the echo procedure is unsynchronized. 9. Concurrency issues are a concern on multiprocessor systems, but do not impact uniprocessor systems. 10. In a uniprocessor system, mutual exclusion can be guaranteed by disabling interrupts. Page 2 of 9 Semester II 2012/2013 Operating System Concepts SECTIOB B: FILL IN THE BLANKS (10 QUESTIONS, 10 MARKS) Instruction: Fill in the blanks with the corresponding letters designating the correct answer. One term only can be used once. A. Process G. Critical Section M. Deadlock B. Blocked/Suspend H. Competition N. Blocked Running C. Four I. Application software O. Trace D. Kernel J. Ready/Suspend P. Two E. Running Exit K. Three Q. Communication F. Critical Resource L. Timer R. System Software 1. Operating system is one example of ________. 2. ________ contains the most frequently used functions in the operating system. 3. A ________is used to prevent a single job from monopolizing the system. 4. ________ is a program in execution. 5. We can characterize the behavior of an individual process by listing the sequence of instructions that execute for that process and this listing is referred to as a ________ of the process. 6. Transition ________ happens when currently running process is completed or aborts. 7. ________ is the state in which a process is in secondary memory and awaiting an event. 8. In order to implement mutual exclusion on a resource for competing processes, only one program at a time should be allowed in the ________ of the program. Page 3 of 9 Semester II 2012/2013 Operating System Concepts 9. The relationship between processes that are directly aware of each other is via ________. 10. There are ________ types of control problems for the processes that are indirectly aware of each other. Page 4 of 9 Semester II 2012/2013 Operating System Concepts SECTION C: STRUCTURED QUESTIONS (16 QUESTIONS, 80 MARKS) Instruction: Please answer the following questions as concisely as possible. Question 1 There are four necessary conditions to be satisfied before a deadlock can take place. The conditions are mutual exclusion, hold and wait, no pre-emption and circular wait. Briefly explain each of these conditions. [6 marks] Question 2 What does it mean by selection function and decision mode? [4 marks] Question 3 Explain the selection function and the decision mode for each of the scheduling algorithms below: (a) First Come First Serve [2 marks] (b) Shortest Process Next [2 marks] Page 5 of 9 Semester II 2012/2013 Operating System Concepts Question 4 The following table shows a set of 4 processes with their arrival time and burst time: Process Arrival time Service Time A 0 8 B 2 5 C 3 4 D 5 6 Draw the scheduling diagram and find the average waiting time for the processes above using the scheduling algorithm below: (a) Shortest Remaining Time [3 marks] (b) Round Robin (time quantum = 2ms) [3 marks] (c) Highest Response Ratio Next (HRRN) [3 marks] Question 5 Feedback scheduling uses priority queue mechanism. Explain how scheduling is being done using priority queues. Use a diagram to help you with your explanation. [3 marks] Question 6 In partitioning technique, the memory will be partitioned either in equal sized partitions or unequal sized partitions. Briefly describe TWO (2) difficulties in equal size partition. [4 marks] Page 6 of 9 Semester II 2012/2013 Operating System Concepts Question 7 What is compaction? Explain your answer in terms of what compaction does and why it is needed. [3 marks] Question 8 Consider a system with 1MB of memory being partitioned using the buddy system. Draw a diagram showing the allocation of memory after each of the following requests have been granted: Request A: 70K; Request B: 120K; Request C: 80K; Request D: 60K; Request E: 70K; Return D; Return C; Return E; Request F: 130K; Return A ; Request G: 270K; Return F; Return G; Return B; [7 marks] Question 9 Briefly define the following terms: (a) Present bit [2 marks] (b) Modify bit [2 marks] (c) Segment Fault [2 marks] Page 7 of 9 Semester II 2012/2013 Operating System Concepts Question 10 (a) What does replacement policy mean? [2 marks] (b) Given below is the references made to the following pages by a program: 0, 2, 4, 1, 5, 1, 4, 3, 0, 3, 1 Show the successive pages residing in the three frames using replacement policy below. Also, state how many page faults will occur for each of the replacement policies. (i) FIFO replacement [3 marks] (ii) LRU replacement [3 marks] (iii) Optimal replacement [3 marks] Question 11 Explain why the performance of I/O operations is improved when using a double buffer technique as compared to a single buffer technique. [2 marks] Question 12 Reading and writing data to disk involves seek time, rotational delay and access time. Explain about each of these types of delays. [3 marks] Page 8 of 9 Semester II 2012/2013 Operating System Concepts Question 13 The following figure shows the disk track request. 112, 237, 198, 180, 163, 211, 124 Assume that the last request is at track 150 and the head is moving towards track 0. Perform an analysis and find out the average seek length for each of the disk scheduling algorithms below: (a) Shortest Service Time First [3 marks] (b) SCAN [3 marks] Question 14 Explain any THREE (3) functions that can be performed on a file. [6 marks] Question 15 List any THREE (3) criteria used when choosing an appropriate file organization technique. [3 marks] Question 16 Space is allocated to a file or disk using preallocation or dynamic allocation techniques. Describe about these two types of allocation techniques. [3 mark] ---End of Questions--- Page 9 of 9 Semester II 2012/2013 Operating System Concepts