0% found this document useful (0 votes)
26 views5 pages

PP B20L2S1 IN2310 2022-Dec

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
26 views5 pages

PP B20L2S1 IN2310 2022-Dec

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
176 IN 2310 UNIVERSITY OF MORATUWA Faculty of Information Technology bd BSc. in Information Technology B.Sc. (Hons.) in Information Technology and Management qe Level 2- Semester 1 Examination IN 2310 - OPERATING SYSTEMS Time Allowed: 3 hours November 2022 INSTRUCTIONS TO CANDIDATES . This paper contains 4 questions on 5 Pages including this page. . The total marks obtainable for this examination is 100. The marks assigned for each question & sections there of are included in square brackets. .. This examination accounts for 60% of the module assessment. This is a close book examination. ‘Non programmable calculators are allowed. Start answering cach question using a new page. Answer ALL questions. NV Raney ADDITIONAL MATERIAL None Page 1 of S IN 2310 [Total Marks allocated: 100 Marks]-Answer All Questions uest @ i) Briefly explain what is meant by the term ‘Operating System (OS).’ i) ly exp) yy Operating [2 Marks] ii) Discuss the requirements and objectives of an OS. [3 Marks] (b) List four (4) differences between traps and interrupts. Explain the usage of each of them. [4 Marks] (©) Compare & contrast Windows Operating System with Linux Operating System under two (2) criteria. [4 Marks] @ i) Whatis a system call? [2 Marks] ii) List three different types of system calls. [3 Marks] iii) Explain the usage of a system call with a suitable example. [4 Marks] (©) List three (3) advantages of the microkemel operating system design. [3 Marks} Question 2 (a) Briefly explain the difference between the techniques paging and segmentation in terms of memory management. [I Marks] (b) Figure | shows the situation of memory allocation of a system having processes A, C, F, G, and H with free slots (holes) indicated in shades. 0 100 400 450 550 650 900 1086-1186 1586 Fe] » El |» Fea Figure 1: Memory Allocation Continued. Page 2 of 5 IN 2310 Which of the above holes in the memory will be taken by the new processes I (200kB) and process J (300kB) when using each of the following memory replacement policies? [3*2 Marks] i) First fit ii) Best fit iii) Worst fit (©) Explain the difference between internal and external fragmentations. [3 Marks] (@ Describe each of the following page replacement algorithms: i) Least Recently Used (LRU) ii) First In First Out (FIFO) iii) Optimal Page replacement [3x2 Marks] (c) Consider the ‘reference string’ given in Table 1. Assuming four pages can be in the memory at a time per process, find out the numter of page faults for each of the replacement algorithms LRU, FIFO, and Optimal page replacement and compare them. [3*3 Marks] (Al4i2 4[2]s]4]2] Table 1: Reference String Question 3, (a) Define the following terms with respect to an Operating System. i) User level thread ii) Semaphores [2x1 Marks} (b) Write down the pseudo-code for the solution of the classic producer-consumer problem using semaphores. [4 Marks] Continued IN 2310 (©) Briefly explain the term ‘race condition,” [2 Marks] (@) In an operating System, there is a shared variable “x”. The relevant functions for “addnum” and “ addsum” are given below. int addnum (int x) int addsum (int x) { int, ad = 0, remainder; intn, sum =1, ¢; n=%; for (c= 1; c<=n; cH) while (t> 1) { remainder = t % 10; ad = ad + remainder; { sum = sum + sum * ¢; t=t/10; } } x=ad; x= sum; return x; return x; } Answer the following questions using the above description, 1 Explain the race condition using the above two functions, [4 Marks} ii, Identify the critical section for each functior nm and write the necessary code Segments to demonstrate solutions for the criti ical region using: a. Swap b. Semaphores [10 Marks} (©) Explain the difference between logical address and physical address G Marks] Continued, Page 4 of 5 IN 2310 Question 4 (a) Describe the five states of a process and clearly mention the possible transitions in the five-state process model with the aid of a dicgram. [7 Marks] (b) Illustrate through a suitable example, how the ‘Shortest Job First’ scheduling algorithm works. Further explain, under which concition the algorithm provides an optimal solution. [7 Marks] (©) Briefly describe each of the following factors considered as performance criteria in order to achieve efficient processor management: i) Tumaround time ii) Wait time [2*2 Marks] (@ Consider a system with one CPU and five processes. Hach process hasan arrival time and burst time as given in the following table: Process | Arrival Time | Burst Time _| Po 0 80 | Pi 10 20 Po 10 10 Ps 80 20 Pa 85 50. ji) Supposing a system uses Round Robin scheduling with a quantum of 15, create a Gantt chart illustrating the execution of these processes. [4 Marks] ii) What is the turnaround time for processes Ps and Pa? [I Marks] iii) What is the average waiting time for the processes? [2 Marks] END OF THE PAPER 5 ofS

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy