CSE16 Operating Systems Practice Subjective Questions For ETE

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Unit I

Introduction to Operating System : Operating System Meaning, Supervisor & User


Mode, review of computer organization, introduction to popular operating systems
like UNIX, Windows, etc., OS structure, system calls, functions of OS, evolution of
OSs

Process Management : PCB, Operations on Processes, Co-operating and Independent


Processes, Inter-Process Communication, Process states, Operations on processes,
Process management in UNIX, Process concept, Life cycle, Process and threads

1. What is an operating system? Explain the role of an operating system in computer


systems.

2. Differentiate between supervisor mode and user mode in the context of operating
systems.

3. Describe the evolution of operating systems from the first generation to the fifth
generation.

4. Explain the concept of process in operating systems. What is a process control block
(PCB)?

5. Describe the life cycle of a process. What are the various states in which a process can
exist?

6. What are threads? How do they differ from processes? Explain the concept of
multi-threading.

7. What are system calls? Describe the various types of system calls.

8. Describe the structure of an operating system. What are the various components of an
operating system?

Unit II

CPU Scheduling : Types of Scheduling, Scheduling Algorithms, Scheduling criteria,


CPU scheduler - preemptive and non preemptive, Dispatcher, First come first serve,
Shortest job first, Round robin, Priority, Multi level feedback queue, multiprocessor
scheduling, real time scheduling, thread Scheduling

1. What are the different types of scheduling algorithms used in CPU scheduling? How are
they different from each other?
2. Describe the First Come First Serve (FCFS) scheduling algorithm. How does it work?
What are its advantages and disadvantages?

3. What is the Shortest Job First (SJF) scheduling algorithm? How is it different from the
FCFS scheduling algorithm? How is it implemented?

4. Explain the Round Robin (RR) scheduling algorithm. How is it different from FCFS and
SJF? What are its advantages and disadvantages?

5. Describe the Priority Scheduling algorithm. How is it implemented? What are the
advantages and disadvantages of this algorithm?

6. What is the Multi-Level Feedback Queue (MLFQ) scheduling algorithm? How does it
work? How is it different from other scheduling algorithms?

7. Explain the Real-Time Scheduling algorithm. What is it used for? What are the
challenges in implementing this algorithm?

8. Describe the concept of preemptive and non-preemptive scheduling algorithms. How


are they different from each other?

9. What is the role of the dispatcher in CPU scheduling? How does it interact with the
scheduling algorithm?

10. Consider a set of four processes P1, P2, P3, and P4 with burst times of 4, 6, 8, and 2
units respectively. Consider that all arrived at same time. The scheduling algorithm used
are SJF, Round Robin with time quantum 2 units, and FCFS. Compute the average
turnaround time for each algorithm.

Unit III

Process Synchronization : Critical Section Problem, Semaphores, Concurrent


processes, Cooperating processes, Precedence graph, Hierarchy of processes,
Monitors, Dining Philosopher Problem, Reader-writer Problem, Producer consumer
problem, classical two process and n-process solutions, hardware primitives for
synchronization

1. What is the critical section problem? How is it used to ensure mutual exclusion in
concurrent processes?

2. Explain the concept of semaphores. How are semaphores used to enforce


synchronization in a multithreaded program?

3. Describe the monitor synchronization mechanism. How is the monitor used to ensure
mutual exclusion and synchronization in a multithreaded program?
4. What is the Dining Philosopher problem? How is it used to illustrate the challenges of
synchronization in a multithreaded program?

5. Describe the reader-writer problem. How is it used to illustrate the challenges of


synchronization in a multithreaded program?

6. Explain the producer-consumer problem. How is it used to illustrate the challenges of


synchronization in a multithreaded program?

7. Describe the classical two-process solution and n-process solution to the critical section
problem. How do these solutions ensure mutual exclusion in a system of concurrent
processes?

Threads : Overview, Multithreading Models, scheduler activations, examples of


threaded programs

1. What is a thread? How is it different from a process? Explain the advantages of using
threads in an operating system.

2. Describe the different models of multithreading, including user-level threads, kernel-level


threads, and hybrid threads. What are the advantages and disadvantages of each
model?

3. Describe the different types of synchronization mechanisms used in multithreaded


programs, including locks, semaphores, and monitors. How do these mechanisms
prevent race conditions and ensure thread safety?

4. What is a thread pool? How is it used to improve the performance of multithreaded


programs?

Unit IV

Deadlock : Deadlock Characterization, Handling of deadlocks- Deadlock Prevention,


Deadlock Avoidance & Detection, Deadlock Recovery, Starvation

1. What is a deadlock in an operating system? Explain the necessary conditions for a


deadlock to occur.

2. Describe the different methods of handling deadlocks in an operating system, including


deadlock prevention, deadlock avoidance, and deadlock detection.
3. Explain the Banker's algorithm for deadlock avoidance in detail. How does it prevent
deadlocks?

4. What is a resource allocation graph? How is it used to detect deadlocks?

5. Describe the process of deadlock detection using the wait-for graph method.

6. Explain the concept of starvation in an operating system. How is it different from a


deadlock?

7. What is deadlock recovery? Describe the different methods used for recovering from a
deadlock.

Protection and Security : Need for Security, Security Vulnerability like Buffer overflow,
Trapdoors, Backdoors, cache poisoning etc, Authentication-Password based
Authentication, Password Maintenance & Secure Communication, Application
Security - Virus, Program Threats, Goals of protection, Principles of protection,
Domain of protection, Access matrix, Implementation of access matrix, System and
network threats, Examples of attacks

1. What is the need for security in an operating system? Explain the different types of
security threats that can occur.

2. What is a buffer overflow? How does it pose a security threat to an operating system?
Explain the methods used to prevent buffer overflow attacks.

3. What are trapdoors and backdoors? How are they used to exploit security vulnerabilities
in an operating system?

4. Describe the process of password-based authentication. What are the best practices for
password maintenance to ensure system security?

5. Explain the concept of secure communication. How can secure communication be


achieved in an operating system?

6. What are computer viruses? How do they pose a threat to an operating system?
Describe the different types of program threats that can occur.

7. Explain the goals of protection in an operating system. How do these goals relate to
system security?

8. What are the principles of protection in an operating system? How do these principles
ensure system security?

9. Describe the access matrix model for enforcing access control in an operating system.
How is the access matrix implemented?
10. Explain the different types of system and network threats that can occur in an operating
system. Provide examples of attacks that can be launched against an operating system.

Unit V

Memory Management : Logical & Physical Address Space, Swapping, Contiguous


Memory allocation, Paging, Segmentation, Page replacement algorithms,
Segmentation - simple, multi-level and with paging, Page interrupt fault,
Fragmentation - internal and external, Schemes - Paging - simple and multi level,
Overlays - swapping, Virtual memory concept, Demand paging

1. What is memory management in an operating system? Explain the basic concepts of


logical and physical address spaces.

2. Describe the process of swapping in memory management. What are the advantages
and disadvantages of swapping?

3. Explain the concept of contiguous memory allocation. What are the limitations of this
method?

4. What is paging in memory management? How does it work? What are the benefits of
paging?

5. Describe the concept of segmentation in memory management. What are the


differences between paging and segmentation?

6. What are page replacement algorithms? Explain the differences between FIFO, LRU,
and Optimal page replacement algorithms.

7. Describe the segmentation with paging.

8. What is a page fault interrupt? How is it handled in a paging system?

9. Explain the concept of fragmentation in memory management. What are the differences
between internal and external fragmentation?

10. Describe the different schemes used in paging, including simple paging and multi-level
paging. What are the advantages and disadvantages of each scheme?

11. Suppose a system has 4 physical memory frames and is running a program that
accesses 10 pages. The page reference string for the program is: 1, 2, 3, 4, 1, 2, 5, 1, 2,
3. Using FIFO page replacement, how many page faults will occur?

12. Using the same page reference string as in question 1, how many page faults would
occur using the LRU page replacement algorithm with 3 physical memory frames?
13. Consider a system with 5 physical memory frames and a page reference string of length
20: 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Using FIFO page replacement,
how many page faults will occur?

14. Using the same page reference string as in question 3, how many page faults would
occur using the LRU page replacement algorithm with 3 physical memory frames?

15. Suppose a system has 4 physical memory frames and is running a program that
accesses 10 pages. The page reference string for the program is: 1, 2, 3, 4, 1, 2, 5, 1, 2,
3. Using FIFO page replacement, what is the order in which the pages are loaded into
memory?

Unit VI

File Management : File Concepts, Access methods, Directory Structure, File System
Mounting and Sharing, Protection, Allocation methods, Free-Space Management,
Directory Implementation

1. What are the different access methods used for files? Explain the differences between
sequential, direct, and indexed access methods.

2. Describe the purpose of a directory structure in file management. What are the different
types of directory structures? Give an example of each.

3. How do file systems provide protection to files and directories? Explain the different
access control mechanisms used for file protection.

4. What are the different allocation methods used for file storage? Explain the differences
between contiguous, linked, and indexed allocation methods.

5. Explain the different directory implementation techniques used by file systems. What are
the advantages and disadvantages of each technique?

6. What are the common file operations supported by file systems? Explain the purpose of
each operation.

7. What is a domain in the context of file systems in an operating system?

8. How are domains used to organize and manage files in file systems?

9. Explain the concept of a domain ID and how it is used to control access to files.

10. What are the benefits of using domains in file systems? How do they improve security
and efficiency?

11. What is a domain group and how is it used in file systems? Give an example.
12. Describe the role of domain policies in file systems. How do they control access to files
and directories?

13. What are the different types of domain policies used in file systems? Explain each policy
and how it is enforced.

Device management : Dedicated, shared and virtual devices, Serial access and direct
access

devices, Disk scheduling methods, Direct Access Storage Devices – Channels and Control
Units

1. Explain the difference between dedicated, shared, and virtual devices in device
management. Give an example of each.

2. What is the difference between serial access and direct access devices? Give an
example of each.

3. Explain how disk scheduling methods work in device management and compare the
different scheduling algorithms.

4. A disk has 5000 cylinders, numbered from 0 to 4999. The requests to access the
cylinders are arriving in the following sequence: 100, 200, 4500, 50, 2300, 5400, 6000.
The disk head is initially positioned at cylinder 300. The seek time is 6 ms per cylinder.
The disk head movement direction is left to right. The total seek time to satisfy all the
requests if they are serviced in the order they are given above is?

5. A disk has 8 equidistant tracks. The diameters of the innermost and outermost tracks
are 1 inch and 8 inches respectively. The innermost track has a storage capacity of 2
MB. If the disk has 100 sectors per track and each sector has 512 bytes of data, what is
the minimum seek time if the disk rotates at 5400 rpm and the track-to-track seek time is
1 ms?

6. A disk has 2000 cylinders, numbered 0 to 1999. The requests to access the cylinders
are arriving in the following sequence: 165, 87, 43, 140, 50, 110, 30, 70. The disk head is
initially positioned at cylinder 100. The seek time is 6 ms per cylinder. The disk head
movement direction is left to right. The total seek time to satisfy all the requests if they
are serviced in the order they are given above using the SCAN disk scheduling algorithm
is?

7. The request queue for a disk scheduling algorithm is: 98, 183, 37, 122, 14, 124, 65, 67.
The disk head is currently at cylinder 53 and is moving in the direction of increasing
cylinder numbers. The total head movement for SSTF disk scheduling algorithm is?
8. The request queue for a disk scheduling algorithm is: 98, 183, 37, 122, 14, 124, 65, 67.
The disk head is currently at cylinder 53 and is moving in the direction of increasing
cylinder numbers. The total head movement for SCAN disk scheduling algorithm is?

9. A disk has 1000 cylinders and the disk scheduling algorithm used is SCAN. The
requests to access the cylinders are arriving in the following sequence: 700, 550, 880,
120, 990, 10. The initial head position is at cylinder 600. The total head movement
required to access all cylinders using the SCAN algorithm is?

10. The request queue for a disk scheduling algorithm is: 98, 183, 37, 122, 14, 124, 65, 67.
The disk head is currently at cylinder 53 and is moving in the direction of increasing
cylinder numbers. The total head movement for C-SCAN disk scheduling algorithm is?

11. The request queue for a disk scheduling algorithm is: 98, 183, 37, 122, 14, 124, 65, 67.
The disk head is currently at cylinder 53 and is moving in the direction of increasing
cylinder numbers. The total head movement for C-LOOK disk scheduling algorithm is:

12. The request queue for a disk scheduling algorithm is: 98, 183, 37, 122, 14, 124, 65, 67.
The disk head is currently at cylinder 53 and is moving in the direction of increasing
cylinder numbers. The total head movement for LOOK disk scheduling algorithm is?

Inter process communication : Introduction to IPC (Inter process communication) Methods,


Pipes

- popen and pclose functions, Co-processes, Shared memory, Stream pipes, FIFOs,
Message queues,

Passing File descriptors, Semaphores

1. What is inter-process communication (IPC) and why is it important in operating


systems?

2. Discuss the various types of IPC mechanisms in operating systems.

3. What is the difference between synchronous and asynchronous IPC?

4. What are the advantages and disadvantages of using shared memory for IPC?

5. Explain how message passing works as a mechanism for IPC.

6. Describe the role of pipes in IPC and compare them with sockets.

7. What is remote procedure call (RPC) and how is it used for IPC?
8. Discuss the challenges and solutions for implementing IPC in a distributed operating
system.

9. How does IPC impact the performance and scalability of a multi-process system?

You might also like