Final Operating System Exam 2023/2024 - ECE 313C PDF

Document Details

TantalizingNobility7049

Uploaded by TantalizingNobility7049

Al-Safwa College of Engineering

2024

ECE

Dr. Wafaa Samy

Tags

operating system scheduling algorithms computer science exams

Summary

This is a past exam paper for operating systems, covering topics such as scheduling algorithms (FCFS, SJF, Round Robin), memory management, and process states. The exam is for a third-year student, and contains questions on core concepts in operating systems.

Full Transcript

## Ministry of Higher Education ### Al-Safwa College of Engineering ### Final Exam #### Subject Title: Operating Systems #### Subject Code: ECE 313C #### Department: Computers Engineering #### Year: 3rd #### Semester: 1st #### Academic Year: 2023/2024 #### Date: 16/1/2024 #### Time Allowed: (3) Hou...

## Ministry of Higher Education ### Al-Safwa College of Engineering ### Final Exam #### Subject Title: Operating Systems #### Subject Code: ECE 313C #### Department: Computers Engineering #### Year: 3rd #### Semester: 1st #### Academic Year: 2023/2024 #### Date: 16/1/2024 #### Time Allowed: (3) Hours #### No. of Pages: (3) #### Total Grade: (90) Marks #### Examiner: Dr. Wafaa Samy **Instructions: Answer All the Following Questions.** ### Question 1: (30 Marks) **(a)** Consider the following set of processes, with the length of the CPU-burst time given in milliseconds. Suppose that the following processes arrive at time 0 with the order P1, P2, P3, P4. [10 marks] | Process | Burst Time | |---|---| | P1 | 4 | | P2 | 3 | | P3 | 5 | | P4 | 7 | Using the First Come First Served (FCFS) scheduling algorithm, answer the following questions: 1. What is the waiting time of each of these processes? [ 4 marks] 2. What is the average waiting time for these processes? [1 mark] 3. What is the turnaround time of each of these processes? [4 marks] 4. What is the average turnaround time for these processes? [1 mark] **(b)** Consider the following set of processes, with the length of the CPU-burst time given in milliseconds. Suppose that the following processes arrive at time 0 with the order P1, P2, P3, P4. [10 marks] | Process | Burst Time | |---|---| | P1 | 7 | | P2 | 6 | | P3 | 5 | | P4 | 8 | Using the Shortest Job First (SJF) scheduling algorithm, answer the following questions: 1. What is the waiting time of each of these processes? [4 marks] 2. What is the average waiting time for these processes? [1 mark] 3. What is the turnaround time of each of these processes? [4 marks] 4. What is the average turnaround time for these processes? [1 mark] **(c)** Consider the following set of processes, with the length of the CPU-burst time given in milliseconds. Suppose that the following processes arrive at time 0 with the order P1, P2, P3, P4. [10 marks] | Process | Burst Time | |---|---| | P1 | 10 | | P2 | 6 | | P3 | 4 | | P4 | 8 | Using the Round Robin scheduling algorithm with time quantum = 4, answer the following questions: 1. What is the waiting time of each of these processes? [4 marks ] 2. What is the average waiting time for these processes? [1 mark ] 3. What is the turnaround time of each of these processes? [4 marks ] 4. What is the average turnaround time for these processes? [1 mark ] ### Question 2: (32 Marks) **(a)** What is the bootstrap program? [2 marks] **(b)** The memory layout of a process consists of 4 sections, what are these sections and what are the contents of each section? [4 marks] **(c)** What are the advantages of Multiprocessor Systems? [3 marks] **(d)** What is the External Fragmentation? What are the solutions to it? [4 marks] **(e)** Draw the diagram of process states? [2 marks] **(f)** What are the four conditions of deadlock? [4 marks] **(g)** What is the difference between Ordinary pipes and Named pipes? [4 marks] **(h)** What are the advantages and disadvantages of the First Come First Served (FCFS) scheduling algorithm? [3 marks] **(i)** What are the advantages of multithreading? [4 marks] **(j)** What is the direct access memory (DMA)? [ 2 marks] ### Question 3: (16 Marks) **(a)** Given five memory partitions of 200 KB, 500 KB, 100 KB, 300 KB, and 600 KB (in order). We want to place processes of 250 KB, 450 KB, 150 KB, and 550 KB (in order) in memory, answer the following questions: [13 marks] 1. Use the first-fit algorithm to place these processes in memory. [4 marks] 2. Use the best-fit algorithm to place these processes in memory. [4 marks] 3. Use the worst-fit algorithm to place these processes in memory. [4 marks] 4. Which algorithm makes the most efficient use of memory? [1 mark] **(b)** Consider a computer system with a 32-bit logical address and 4 KB page size. The system supports up to 512 MB of physical memory. How many entries are there in the page table? [ 3 marks ] ### Question 4: (12 Marks) **(a)** Choose the correct answer: [6 marks] 1. In a multi-programmed system, the process (currently executing by CPU) may have to wait for an I/O operation to complete. In this case, the CPU will do which of the following? [1 mark] * (a) The operating system switches to, and executes, another process. * (b) The CPU continues executing the same process. * (c) The CPU would sit idle. * (d) None of the above. 2. Which of the following operating system structures is removing all non-essential components from the kernel and implementing them as user-level programs that reside in separate address spaces? [1 mark] * (a) Layered System * (b) Monolithic System * (c) Hybrid System * (d) Microkernels System 3. Which of the following instructions is not privileged? [1 mark] * (a) Set value of timer * (b) Read the clock * (c) Clear memory * (d) Turn off interrupts 4. Deciding which processes (or parts of processes) and data to move into and out of memory is an activity of: [1 mark] * (a) Process Management * (b) Memory Management * (c) File-System Management * (d) All of the above 5. Which of the following is a type of computing that delivers storage, computing, and applications as a service across a network? [1 mark] * (a) Client Server * (b) Peer-to-Peer * (c) Cloud Computing * (d) Embedded Systems 6. CLI stands for: [1 mark] * (a) Command Line Interpreter * (b) Comment Line Interconnect * (c) Connection Line Interface * (d) None of the other selections **(b)** Write whether the following statements are True or False. [6 marks] 1. Virtualization allows operating systems to run as applications within other operating systems. [1 mark] 2. If a process in the “running” state and an interrupt occurs, then the process will be in the “Waiting” state. [1 mark] 3. Caching is copying information from storage system A to storage system B where B is slower than A. [1 mark] 4. Hard-disk drives are volatile storage devices and faster than the nonvolatile memory devices. [1 mark] 5. Each device controller type has an operating system device driver to manage it. [1 mark] 6. With DMA, device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention. [1 mark]

Use Quizgecko on...
Browser
Browser