0% found this document useful (0 votes)
17 views4 pages

Operating System Exam Paper 2022

The document is an examination paper for the Third Semester B.E. in Artificial Intelligence & Data Science at Siddaganga Institute of Technology, covering the Operating System subject. It consists of various units with questions on topics such as process management, memory management, scheduling algorithms, synchronization problems, and memory management techniques. Students are required to answer five questions, choosing one full question from each unit.

Uploaded by

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

Operating System Exam Paper 2022

The document is an examination paper for the Third Semester B.E. in Artificial Intelligence & Data Science at Siddaganga Institute of Technology, covering the Operating System subject. It consists of various units with questions on topics such as process management, memory management, scheduling algorithms, synchronization problems, and memory management techniques. Students are required to answer five questions, choosing one full question from each unit.

Uploaded by

madhuryar.01
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

USN 1 S I 20AD302

Siddaganga Institute of Technology, Tumakuru – 572 103


(An Autonomous Institution affiliated to VTU, Belagavi, Approved by AICTE, New Delhi)

Third Semester B.E. Artificial Intelligence & Data Science Examinations March – April 2022
Operating System
Time: 3 Hours Max. Marks: 100
Note : Answer any five questions choosing one full question from each unit.

Unit - I
01 a) Explain how the execution of operating system code is distinguished from user defined code. 6
BL: 2 CO: 1 PO: 1 PSO: 1

b) List any 3 activities that operating system is responsible in connection with the following
management: i) Process Management ii) Storage Management 6
BL: 1 CO: 1 PO: 1 PSO: 1

c) Compare microkernels with modules with respect to operating system design. Give suitable
examples. 8
BL: 2 CO: 1 PO: 1 PSO: 1

OR
02 a) List any 3 activities that operating system is responsible in connection with the following
management. i) Memory Management ii) File System Management 6
BL: 1 CO: 1 PO: 1 PSO: 1

b) How are the following operating system services useful to a user:


i) User interface ii) Resource allocation
6
BL: 2 CO: 1 PO: 1 PSO: 1

c) With a suitable diagram explain how a system call interface works. Discuss any two methods
used to pass parameters to operating system. 8
BL: 1 CO: 1 PO: 1 PSO: 1

Unit – II
03 a) Distinguish among the short-term, medium-term and long-term schedulers. 6
BL: 2 CO: 3 PO: 2 PSO: 1

b) What is a multi-threaded process? Explain with a suitable example. 6


BL: 1 CO: 2 PO: 2 PSO: 1

c) Consider the following set of processes, with the length of the CPU burst given in milliseconds.
Process Burst Time Priority
P1 2 2
P2 1 1
P3 8 4
P4 4 2
P5 5 3
The above process are assumed to have all arrived at time 0. Larger priority number implies
higher priority.
i) Draw Gantt charts to demonstrate the working of SJF and non-preemptive priority algorithms
ii) What is the turnaround time of each process for each of the scheduling algorithms in (i) 8
BL: 3 CO: 3 PO: 2 PSO: 1

-1- Please Turn Over


-2- 20AD302
OR
04 a) With suitable code demonstrate the use of fork( ), exec( ) and wait ( ) system calls? When does a
process become a zombie process. 6
BL: 4 CO: 2 PO: 2 PSO: 1

b) Compare one-to-one with many-to-many multithreading models. 6


BL: 2 CO: 2 PO: 2 PSO: 1

c) The following processes are being scheduled using a preemptive Round-Robin scheduling
algorithm. Each process is assigned a numerical priority with a higher number indicating higher
priority. The length of a time quantum is 10 units.
Process Priority Burst Arrival
P1 40 20 0
P2 30 25 25
P3 30 25 30
P4 35 15 60
P5 5 10 100
P6 10 10 105
i) Show the scheduling order of the processes using a Gantt chart.
ii) What is the waiting time for each process. 8
BL: 3 CO: 3 PO: 2 PSO: 1

Unit – III
05 a) What is race condition with respect to co-operating processes? Explain with a suitable example. 6
BL: 2 CO: 2 PO: 2 PSO: 1

b) Describe Readers-Writers problem. Justify that it is a classical problem of synchronization. 6


BL: 4 CO: 5 PO: 2 PSO: 1

c) Consider the following snapshot of a system:


Process Allocation Max Available
A B C D A B C D A B C D
P0 0 0 1 2 0 0 1 2 1 5 2 0
P1 1 0 0 0 1 7 5 0
P2 1 3 5 4 2 3 5 6
P3 0 6 3 2 0 6 5 2
P4 0 0 1 4 0 6 5 6
i) What is the content of the matrix Need?
ii) Is the system in a safe state?
iii) If a request from process P1 arrives for (0, 4, 2, 0), can the request be granted immediately? 8
BL: 3 CO: 4 PO: 1 PSO: 1

OR
06 a) What is critical-section problem? How does Peterson’s solution solve the critical section
problem? 6
BL: 4 CO: 5 PO: 2 PSO: 1

b) Describe Dining-Philosophers problem. Justify that it is a classical problem of synchronization. 6


BL: 4 CO: 5 PO: 2 PSO: 1

c) How can deadlock be prevented by ensuring that the following conditions never occur in the
system.
i) Hold and wait ii) No Preemption 8
BL: 2 CO: 4 PO: 1 PSO: 1
Contd…

-3- 20AD302
Unit – IV
07 a) What is external fragmentation? Describe any one technique to solve the problem of External
fragmentation. 5
BL: 2 CO: 6 PO: 2 PSO: 1

b) What is the role of Translation Look-aside Buffer (TLB) in managing pages. Explain with a neat
diagram. 7
BL: 4 CO: 6 PO: 2 PSO: 1

c) How does a segment Table ensure mapping of a user-defined addresses to physical memory
adders? Consider the following segment table.
Segment Base Length
0 219 600
1 2300 14
2 90 100
3 1327 580
4 1952 96
What are the physical addresses for the following logical addresses?
i) 0, 430 ii) 1, 10 iii) 2, 500 iv) 3, 400 v) 4, 112 8
BL: 4 CO: 6 PO: 2 PSO: 1

OR
08 a) Differentiate between logical and physical address space? What is the role of relocation register
in memory management unit? 6
BL: 2 CO: 6 PO: 2 PSO: 1

b) How is an inverted page table useful? Describe its drawbacks. 6


BL: 4 CO: 6 PO: 2 PSO: 1

c) Given 6 memory partitions of 300kB, 600kB, 350kB, 200kB, 750kB and 125kB, how would the
first-fit, best-fit and worst-fit algorithms place processes of size 115kB, 500kB, 358kB, 200kB
and 375kb (in order)? Rank the algorithms interms of how efficiently they use memory. 8
BL: 4 CO: 6 PO: 2 PSO: 1

Unit – V
09 a) Under what circumstances do page faults occur? How is a page fault handled by operating
system? Explain with a suitable diagram. 6
BL: 4 CO: 6 PO: 2 PSO: 1

b) Consider the following page reference string. 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6


How many page faults would occur for the following replacement algorithms, assuming 4
frames? Assume that all frames are initially empty. i) LRU replacement ii) Optimal
replacement 8
BL: 3 CO: 6 PO: 2 PSO: 1

c) What is thrashing? When does it occur? Explain using suitable graph. 6


BL: 4 CO: 6 PO: 2 PSO: 1

OR
10 a) Why is there a need for page replacement? Explain with a neat diagram. 7
BL: 4 CO: 6 PO: 2 PSO: 1

b) What is Belady’s anomaly? Demonstrate the same considering the reference string. Consider 3
and 4 page frames. 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 7
BL: 3 CO: 6 PO: 2 PSO: 1

c) Justify that working set model prevents thrashing while keeping the degree of multiprogramming 6
as high as possible.
BL: 4 CO: 6 PO: 2 PSO: 1

________

Common questions

Powered by AI

The operating system distinguishes between executing its own code and user-defined code through the use of different modes of operation, typically user mode and kernel mode. In kernel mode, the operating system executes its privileged instructions with unrestricted access to hardware resources. When a system call or an interrupt occurs, the system switches from user mode to kernel mode, allowing the operating system to perform its operations. This separation ensures that user applications do not have direct access to critical system resources, preventing potential damage or security breaches .

Inverted page tables provide a space-saving alternative to traditional page tables by reducing page table entries to the number proportional to frames rather than pages. Each entry contains information about a single page frame. However, this design complicates page lookup processes, leading to slower access times due to a need for searching. Thereby, they are often supplemented with hash tables or other structures to improve lookup speed .

A race condition occurs when two or more processes can access shared data and their execution order affects the program's outcome, leading to inconsistent results. For instance, consider a banking system where two processes simultaneously withdraw funds from the same account balance. If the balance is read simultaneously by both processes before the update, both transactions might pass checks for available funds, resulting in an overdrawn account .

The long-term scheduler, also known as the admission scheduler, determines which processes are to be admitted to the ready queue, thus controlling the degree of multiprogramming. The medium-term scheduler handles swapping processes in and out of the memory to balance load and reclaim memory spaces. The short-term scheduler, or CPU scheduler, is responsible for selecting which process should be executed next by the CPU. It operates more frequently than the other two, aiming to maximize CPU utilization and system responsiveness .

The working set model minimizes thrashing by tracking the set of pages actively used by a process. By ensuring that each process has enough frames to hold its working set to avoid frequent page swapping, it keeps the system stabilized and efficient. By dynamically adjusting based on a process's behavior, it allows maximum processes to execute concurrently without degradations that occur when excessive paging activity overwhelms system resources .

The Readers-Writers problem addresses the conflict between reader and writer processes accessing a shared resource, such as a database. Readers can read simultaneously without conflict, but writers require exclusive access. The problem's challenge lies in ensuring that no writer starves for resource access while also optimizing reader throughput. Solutions must balance these competing access needs efficiently, making it a classical example in studying process synchronization .

A multi-threaded process is one where multiple threads within the same process can run concurrently. Each thread shares resources such as memory and file handles but operates independently. For example, in a web server, different threads handle different requests. This allows threads to perform input/output simultaneously while sharing data, improving CPU utilization and application performance .

Page faults occur when a process attempts to access a page not currently in memory. When a page fault is triggered, the operating system checks if the memory access is valid, and if so, locates the page on disk, loads it into RAM, possibly swapping existing pages back to disk. This process includes updating the page table and resuming process execution seamlessly to the user to maintain system stability and performance .

In process management, the operating system is responsible for creating and deleting both user and system processes, scheduling processes, and providing mechanisms for process synchronization and communication. In storage management, the operating system handles activities such as memory allocation and deallocation, managing storage memory hierarchy, and maintaining system integrity by ensuring proper access controls are in place .

A microkernel design minimizes kernel size by running most services, including device drivers and file management, in user space as separate processes, which can increase modularity and stability. Conversely, monolithic designs have extensive services incorporated into the kernel itself, which may improve performance due to fewer context switches but at the cost of reduced modularity and increased risk of system crashes. This distinction affects system reliability, security, and process efficiency, requiring trade-offs depending on the specific use case .

You might also like