0% found this document useful (0 votes)
92 views2 pages

Operating Systems Exam Paper - August 2023

This document is an examination paper for the Operating Systems course at St. Martin's Engineering College, covering various topics such as process management, scheduling algorithms, and inter-process communication. It consists of two parts: Part A with compulsory questions worth 20 marks, and Part B with 10 questions from which students must answer any five, each worth 10 marks. The paper includes theoretical questions, practical problems, and case studies related to operating systems.

Uploaded by

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

Operating Systems Exam Paper - August 2023

This document is an examination paper for the Operating Systems course at St. Martin's Engineering College, covering various topics such as process management, scheduling algorithms, and inter-process communication. It consists of two parts: Part A with compulsory questions worth 20 marks, and Part B with 10 questions from which students must answer any five, each worth 10 marks. The paper includes theoretical questions, practical problems, and case studies related to operating systems.

Uploaded by

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

Code No:CS401PC SMEC-R20

St. MARTIN’S ENGINEERING COLLEGE


UGC Autonomous
NBA & NAAC A+ Accredited
Dhulapally, Secunderabad – 500100
[Link] II Year II Semester Regular/Supplementary Examinations, August-2023
OPERATING SYSTEMS
(COMMON TO CSE, IT)

Time: 3 Hours Max. Marks: 70

Note:This Question Paper contains two Parts A and B


Part A is compulsory which carries 20 marks. Answer all questions in Part A at one place only.
Part B Consists of 10 questions. Answer any five (one full question from each unit).
Each question carries 10 marks and may have a, b, c as sub questions.

PART – A (20 Marks)


1. a) Explain the need of operating system? (2M)
b) Differentiate between multi programming and multi-processing (2M)
c) Distinguish between process and threads. (2M)
d) What is meant by Race condition? (2M)
e) Define Demand paging (2M)
f) What is Belady’s Anomaly? (2M)
g) What are the processes managed in LINUX? (2M)
h) Discuss about swap space management. (2M)
i) Differentiate between unsafe state and dead lock state. (2M)
j) What do you meant by thrashing? (2M)

PART – B (5x10 = 50 Marks)

2.a) Define Essential properties of Distributed Operating Systems [5+5M]


b) What are the different types of operating systems? Explain them in detail.
OR
3.a) Define System call? Explain the various types of system calls with example each? [5+5M]
b) What are the advantages and disadvantages of using the same system call interface for both files
and devices.

[Link] is the snapshot of a


CPU Process CPU Burst Arrival Time
P1 5 0
P2 9 2
P3 3 3
P4 7 4
Draw the Gantt chart and calculate the turnaround time and waiting time of the jobs for FCFS (First
Come First Served), SJF (Shortest Job First),and RR (Round Robin with time quantum 10) scheduling
algorithms. Identify which scheduling algorithm is best and explain why [10M]
OR
5 a) Consider 3 processes P1, P2 and P3, which require 7, 9 and 6 time units and arrive at times 1, 2 and
3. Draw the Gant chart, process completion sequence and average waiting time for. i) Round-robin
scheduling with CPU quantum of 3 time [Link]) SJF [5+5M]
b) Explain the terms fork, exit, wait, waitpid, exec.

6. Consider the following snapshot of a system:

Processes Allocation Max Available

ABC ABC ABC

P0 010 753 332

P1 200 322

P2 302 902

P3 211 222

P4 002 433

Answer the following questions using the banker’s algorithm:


a) What is the content of the matrix Need?
b) Is the system in a safe state?
c) If a request from process P1 arrives for (1, 0, 2) can the request be granted immediately?

[10M]
OR
7.a) Describe dining-philosopher problem? Device an algorithm to solve the problem using semaphores.
[5+5M]
b) Explain about the inter process communication? What are the advantages and disadvantages of IPC.

8.a) Consider the following reference string 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1. Assume there are
three frames. Apply LRU replacement algorithm to the reference sting above and find out how many
page faults are produced. Illustrate the LRU page replacement algorithm in detail and also two feasible
implementations of the LRU algorithm. [5+5M]
b) Explain the terms in Memory Partitioning with examples: i) Fixed Partitioning ii) Dynamic parti-
tioning.
OR
9. 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.
Identify the [Link] page faults would occur for the following replacement algorithms, assuming one, two,
three, four, five, six, or seven frames? Remember all frames are initially empty, so your first unique
pages will all cost one fault each. [Link] replacement [Link] replacement c)optimal replacement. [10M]

10. Suppose the head of a moving head disk with 300 tracks, numbered 0 to 299, is currently serving a
request at track 143 and has just finished a request at track [Link] the queue of requests is kept in FIFO
order: 86, 247, 91, 277, 94, 250, 102, 275,130. What is the total head movement to satisfy these requests
for the following disk scheduling algorithms? (a) FCFS (b) SCAN (c) SSTF (d) C- SCAN
[10M]
OR
11.a) Explain about the free space management and approaches for free space management. [5+5M]
b) Explain different IPC mechanisms available in Linux.

*******

Common questions

Powered by AI

The Banker's algorithm prevents deadlocks by simulating resource allocation for processes before actual allocation. It ensures that resource requests are granted only if the system remains in a safe state, meaning future processes can still obtain necessary resources without causing deadlocks. It uses vectors to track resources and demand, thus allowing precise control over allocation .

Page replacement algorithms directly impact how efficiently an operating system manages memory. LRU (Least Recently Used) minimizes page faults in practical access patterns by replacing the least recently used pages, whereas FIFO replaces the oldest pages regardless of access patterns, often leading to suboptimal performance and anomalies like Belady's. Efficient algorithms reduce page swaps, improving processing speed and resource utilization .

IPC faces challenges like synchronization, ensuring that processes run without conflicts; resource sharing, which requires management to avoid deadlocks; and security, preventing data from being accidentally shared or leaked. Solutions include semaphores and mutex locks for synchronization, deadlock detection algorithms, and permissions systems to secure data exchange .

Dynamic partitioning allows memory spaces to be allocated based on process needs, minimizing internal fragmentation and optimizing memory usage. However, it can lead to external fragmentation and increased overhead due to constant resizing. Fixed partitioning, while easier to manage and predict, suffers from internal fragmentation, as predefined partitions may not always fit process sizes efficiently, leading to wasted memory .

Thrashing occurs when excessive paging operations overshadow useful processing, usually due to insufficient physical memory. Understanding thrashing is crucial as it indicates a mismanagement of resources, leading to drastically reduced system performance. Addressing thrashing typically involves adjusting memory allocation strategies, increasing physical memory, or optimizing processes to reduce paging .

Belady's Anomaly refers to the counterintuitive situation where increasing the number of page frames results in more page faults in certain page replacement algorithms, like FIFO. This anomaly highlights the inefficiency of these algorithms in predicting and managing memory access patterns, directly impacting system performance and prompting the development of more sophisticated algorithms like LRU, which avoid such anomalies .

FCFS (First Come First Serve) is simple and fair in a temporal sense but can cause the 'convoy effect', delaying short processes. SJF (Shortest Job First) optimizes turnaround by prioritizing shorter tasks but may lead to starvation of longer processes. RR (Round Robin) provides fairness by allocating equal time slices to processes, improving response time in interactive systems but may introduce overhead due to frequent context switching .

FCFS is fair but not efficient for minimizing seek time. SSTF (Shortest Seek Time First) minimizes head movement but can starve outer requests. SCAN (Elevator Algorithm) is optimal for reducing seek time in high-density environments by servicing all requests in one direction before reversing, preventing starvation. C-SCAN is best for even distribution of service time across requests, beneficial in environments with many new requests, as it cyclically scans the disk like SCAN but in one direction .

Distributed operating systems enhance reliability by decentralizing resources to prevent a single point of failure, thus improving fault tolerance. They manage resources across multiple devices, promoting efficiency through load balancing and concurrent processing. They also provide services like remote access and resource sharing, unlike traditional systems that are limited to managing resources on a single device .

System calls serve as the interface between user-level programs and the operating system, enabling user applications to request services like file manipulation, process control, and communication. This interaction allows programs to execute tasks that require operating system privileges, bridging user operations with hardware abstraction .

You might also like