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

B.Tech Operating Systems Exam Paper 2023

This document is an examination paper for the Operating Systems course at St. Martin's Engineering College, detailing the structure of the exam, which consists of two parts: Part A with compulsory questions worth 20 marks and Part B with 10 questions where students must answer five, each worth 10 marks. It covers various topics including definitions, OS services, process types, deadlocks, semaphores, scheduling algorithms, and memory allocation. The exam is scheduled for August 2023 and is designed for B.Tech II Year II Semester students.

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)
12 views2 pages

B.Tech Operating Systems Exam Paper 2023

This document is an examination paper for the Operating Systems course at St. Martin's Engineering College, detailing the structure of the exam, which consists of two parts: Part A with compulsory questions worth 20 marks and Part B with 10 questions where students must answer five, each worth 10 marks. It covers various topics including definitions, OS services, process types, deadlocks, semaphores, scheduling algorithms, and memory allocation. The exam is scheduled for August 2023 and is designed for B.Tech II Year II Semester students.

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: CSG403PC SMEC-R20

St. MARTIN’S ENGINEERING COLLEGE


UGC Autonomous
NBA & NAAC A+ Accredited
Dhulapally, Secunderabad – 500100
[Link] II Year II Semester Regular Examinations, August-2023
OPERATING SYSTEMS
(COMPUTER SCIENCE AND DESIGN)

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) Define Operating System? (2M)
b) What are the OS services? (2M)
c) What are the 4 types of process? (2M)
d) What is the critical section problem with Peterson's solution? (2M)
e) What are threads in OS?. (2M)
f) Define Deadlocks? (2M)
g) What is semaphores why it is used? (2M)
h) What is paging and its example?. (2M)
i) Where is segmentation used in OS?. (2M)
j) Explain directory structure?. (2M)

PART – B (5x10 = 50 Marks)


2. Deliberate about the structure of OS in details. [10 M]
OR
3. Briefly explain about Computing Environments. [10 M]

4. Elucidate about the system calls fork, exit, wait, waitpid and exec. . [10 M]
OR
5. Demonstrate about FCFS, RR and SJF scheduling algorithm with illustrations. [10 M]

6. How can deadlock be detected and recovered? Explain in detail with relevant example. [10 M]
OR
7. Briefly explain about Critical Section Problem in details. [10 M]
8. What is Semaphore? Give the implementation of Bounded Buffer Producer Consumer
Problem using Semaphor. [10 M]
OR
9. a) Express in your own words about optimal Page replacement algorithm. [5+5 M]
b) Explain in detail Contiguous Memory Allocation.

10. a) What is a Directory? Write short note on Directory implementation. [5+5 M]


b) Interpret about linked allocation method of a file.
OR
11. Explain about the Usage of open, create, read, and write, close. [10 M]

*******

Common questions

Powered by AI

FCFS (First-Come, First-Served) is simple and fair in order but can lead to convoy effect, causing inefficient CPU utilization. RR (Round Robin) improves time sharing and responsiveness but may increase context switching overhead. SJF (Shortest Job First) minimizes average waiting time by executing shortest tasks first, but can lead to starvation of longer tasks. Selecting an algorithm depends on system goals such as fairness, responsiveness, or throughput, balancing the trade-offs in specific environments .

Linked allocation stores files as linked lists of disks blocks, each block pointing to the next, allowing efficient dynamic storage without fragmentation risks. Compared to contiguous allocation, which requires files to occupy sequential blocks risking fragmentation and need for reshuffling, linked allocation saves space and allows easy file expansion. However, it suffers from slower access times due to non-sequential blocks and larger overheads in pointer storage, making it suitable for media where resizing and fragmentation control are priorities .

Directory structures in file systems organize and manage files in hierarchical formats, allowing efficient storage, retrieval, and naming of files. They provide a user-friendly way to navigate and structure data logically. Implementation involves tree structures where directories and subdirectories are nodes, and files are leaves, facilitating operations like creation, deletion, and renaming. Key advantages include improved access control, data grouping, and navigation simplicity .

Deadlocks occur when a group of processes become permanently blocked as each process waits for resources held by another. Prevention methods include avoiding conditions leading to circular waits, such as resource hierarchy protocols and preemptive resource scheduling. Recovery involves process termination to break the deadlock cycle or resource preemption where resources from some processes are forcibly taken under specific conditions. Each method has trade-offs in terms of complexity and performance .

The critical section problem challenges include ensuring that only one process accesses a shared resource at a time, preventing race conditions, and ensuring mutual exclusion and progress. Peterson's solution provides a two-process synchronization mechanism that uses a combination of turn and flag variables to ensure mutual exclusion. This solution allows each process to set its flag and give way to the other process only if it is the latter's turn, thus synchronously coordinating entry to the critical section .

Segmentation involves dividing the memory into variable-sized segments based on logical divisions like code, data, and stack, whereas paging divides memory into fixed-size pages. Segmentation is useful for handling growing data structures, object-oriented programs, and multiple threads requiring isolated memory spaces. Paging is beneficial in minimizing fragmentation and optimizing memory use without requiring contiguous memory allocation, thereby enhancing efficiency in multi-tasking environments .

The optimal page replacement algorithm replaces the page that will not be used for the longest period in the future, minimizing page fault rates. Its implementation requires future knowledge of process references, which is often impractical for real-time systems, hence it is used mainly for theoretical performance benchmarking. Benefits include setting a lower bound for comparison with other algorithms like FIFO or LRU to evaluate their effectiveness in managing memory .

An operating system (OS) performs several essential functions, including management of hardware resources such as the CPU, memory, and I/O devices, providing a user interface for interaction with the computer, and facilitating execution of application software. It supports system operations by ensuring efficient process management, memory management, and I/O operations. For users, it provides services such as file management, security, and error detection. All these functions together ensure seamless execution of tasks and efficient resource allocation .

System calls such as fork, exit, wait, waitpid, and exec are fundamental to process management. Fork creates a new process by duplicating the current process, exit terminates a process and optionally returns a status code to the parent, wait and waitpid make a process suspend its execution until children terminate or change state, and exec replaces the process memory space with a new program. These calls allow effective management, communication, and coordination of processes within an operating system .

Semaphores are synchronization tools used in operating systems to control access to shared resources by multiple processes to prevent race conditions. They act as counters indicating the availability of resources. In the Bounded Buffer Problem, which involves producers adding to and consumers removing from a fixed-size buffer, semaphores manage access to avoid buffer overflows and underflows. Two semaphores track the number of filled slots and available slots without needing explicit locking, efficiently synchronizing producer and consumer processes .

You might also like