0% found this document useful (0 votes)
426 views3 pages

Os Lab Viva Questions

Uploaded by

r9233332
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)
426 views3 pages

Os Lab Viva Questions

Uploaded by

r9233332
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
You are on page 1/ 3

Module 1: Introduction to Operating Systems and Process Management

1. What is an operating system?


Software that manages computer hardware and software resources.
2. Name some essential services provided by an OS.
Process management, memory management, file management, I/O system management.
3. What are system calls, and why are they needed?
Interface for programs to request OS services.
4. Define a process and a thread. How do they differ?
Process: an executing program; Thread: smallest unit of execution within a process.
5. What is a Process Control Block (PCB)?
Data structure that stores information about a process.
6. Explain process scheduling and its main types.
Allocating CPU to processes; Types: FCFS, SJF, Priority, Round Robin.
7. What is inter-process communication (IPC)? Name some IPC methods.
Method for processes to communicate; Methods: pipes, message passing, shared memory.
8. List the criteria used in CPU scheduling.
CPU utilization, throughput, turnaround time, waiting time, response time.
9. What is the difference between user-level and kernel-level threads?
User-level: managed by user libraries; Kernel-level: managed by OS kernel.
10. Describe the round-robin scheduling algorithm.
Each process gets a fixed time slot in a rotating order.
11. Explain any one multithreading model.
One-to-One: each user thread maps to one kernel thread.
12. How does multiprocessor scheduling differ from single-CPU scheduling?
Manages multiple CPUs with load balancing for efficiency.

Module 2: Process Synchronization and Deadlocks


1. What is the critical section problem?
Ensuring only one process enters a critical section at a time.
2. State Peterson’s solution to the critical section problem.
Software-based solution using flags and a turn variable.
3. How does synchronization hardware help in process synchronization?
Provides atomic operations to avoid race conditions.
4. Define a semaphore and its types.
Variable for controlling access; Types: binary and counting.
5. Name three classic synchronization problems.
Producer-Consumer, Readers-Writers, Dining Philosophers.
6. What is a monitor, and how is it used in synchronization?
High-level construct with mutual exclusion and condition variables.
7. What are the four necessary conditions for a deadlock to occur?
Mutual exclusion, hold and wait, no preemption, circular wait.
8. Explain deadlock prevention and avoidance.
Prevention: negating one condition; Avoidance: keeping the system in a safe state.
9. What is the banker’s algorithm, and how does it help in deadlock avoidance?
Allocates resources safely based on process needs and available resources.
10. Describe one method of deadlock detection.
Resource-Allocation Graph (RAG) method to detect cycles.
11. What are the main steps in deadlock recovery?
Process termination or resource preemption to break the deadlock.

Module 3: Memory Management and Secondary Storage


1. What is swapping in memory management?
Moving processes between main memory and disk.
2. Explain contiguous memory allocation.
Allocating consecutive memory blocks to a process.
3. Define paging and its advantages.
Dividing memory into fixed-size pages; minimizes fragmentation.
4. What is segmentation, and how is it different from paging?
Divides memory by segments; segments vary in size unlike pages.
5. Describe segmentation with paging.
Combines segmentation and paging to manage memory.
6. What is demand paging?
Loads pages into memory only when needed.
7. List some common page replacement algorithms.
FIFO, LRU, Optimal.
8. Explain the concept of thrashing.
High paging activity causing poor performance.
9. What is Copy-on-Write, and when is it used?
Duplicates a page only on modification; used for efficiency.
10. Describe the disk structure in secondary storage.
Disk is divided into tracks, sectors, and cylinders.
11. Explain any one disk scheduling algorithm.
SSTF (Shortest Seek Time First): prioritizes nearest requests.
12. What is disk management?
Organizing and maintaining disk storage and structure.

Module 4: File and I/O Systems


1. What is a file, and why are file systems important?
A file is data stored on disk; file systems manage and organize files.
2. List some file access methods.
Sequential, direct, indexed.
3. What is the structure of a directory in a file system?
Hierarchical, tree-like structure.
4. Define an inode and its role in file systems.
Data structure storing file metadata like permissions and size.
5. How is a file system implemented?
Using structures like inodes, superblocks, and data blocks.
6. What are some directory implementation methods?
Linear list and hash table.
7. List common file allocation methods and explain one.
Contiguous, linked, indexed; Contiguous allocates continuous blocks.
8. What role does I/O management play in operating systems?
Manages input and output devices and data transfer.

You might also like