About this previous year paper
Course: B.Tech (Computer Science / Information Technology)
Subject Code: NCS401
Subject Title: Operating System
Exam Type: Theory
Duration: 3 Hours
Maximum Marks: 100
SECTION – A (10 × 2 = 20 Marks)
Short answer questions test conceptual clarity across all OS modules
| No. | Question | Explanation |
|---|---|---|
| (a) | Process vs Program | A program is passive (set of instructions stored on disk); a process is an active execution instance of a program in memory. |
| (b) | Context Switching | The mechanism of saving and restoring the state (CPU registers, program counter) of a process so that execution can resume later. |
| (c) | Demand Paging | A memory management scheme where pages are loaded into RAM only when required, reducing I/O overhead. |
| (d) | Virtual Memory | Technique that gives the illusion of a large memory by combining physical and secondary memory using paging. |
| (e) | Directory vs File | Directory stores file metadata and structure; file stores user data. |
| (f) | Multiprogramming System | Allows multiple programs to reside in memory at the same time; improves CPU utilization. |
| (g) | Internal vs External Fragmentation | Internal → unused memory within allocated block; External → scattered free memory blocks that cannot be used. |
| (h) | Critical Section | Code section where shared resources are accessed — must ensure mutual exclusion to prevent data inconsistency. |
| (i) | Threads | Lightweight processes sharing memory and resources of a parent process. |
| (j) | Operating System Definition | Software that acts as an interface between hardware and user; manages processes, memory, and I/O efficiently. |
SECTION – B (5 × 10 = 50 Marks)
Descriptive and analytical questions covering OS principles and applications
(a) Types of Operating Systems
Batch OS – executes jobs in batches without user interaction.
Multiprogramming OS – allows concurrent execution of multiple programs.
Multitasking OS – supports multiple active user processes.
Real-Time OS – responds to inputs within fixed deadlines.
Distributed OS – manages networked computers as a single system.
Network OS – provides shared access to files and devices over LAN.
(b) Kernel and Its Functions
Kernel: Core part of OS managing resources and communication between hardware and software.
Main operations:
Process scheduling and dispatching
Memory management
File system handling
Interrupt and I/O management
System calls interface
(c) Thrashing
Cause: Too many page faults due to insufficient frames; CPU spends more time swapping pages than executing processes.
Prevention:
Increase physical memory
Use working set model
Implement page fault frequency (PFF) control
(d) Process and Its States
States: New → Ready → Running → Waiting → Terminated
Process Control Block (PCB): Stores process ID, program counter, registers, memory limits, accounting info, and I/O status.
(e) Mutual Exclusion & Dekker’s Algorithm
Principles: Mutual exclusion, progress, bounded waiting.
Dekker’s Solution: Uses shared variables and flags to ensure only one process enters its critical section at a time.
(f) Producer–Consumer Problem (Semaphore Solution)
semaphore empty = n, full = 0, mutex = 1; Producer() { wait(empty); wait(mutex); // produce item signal(mutex); signal(full); } Consumer() { wait(full); wait(mutex); // consume item signal(mutex); signal(empty); }
Ensures safe access to the shared buffer.
(g) File Organization & Access Methods
Sequential Access: Files read/write sequentially.
Direct (Random) Access: Access any record via key or offset.
Indexed Access: Uses index table for efficient record retrieval.
Directory Structure: Single-level, two-level, tree-structured, acyclic, and general graph directory models.
(h) Services Provided by OS
Process & memory management
File system operations
I/O device control
Security & protection
Error detection & handling
Networking & communication support
SECTION – C (2 × 15 = 30 Marks)
Comprehensive questions testing design understanding and analytical application
Q3. (i) Deadlocks
Definition: A set of processes waiting indefinitely for resources held by each other.
Necessary Conditions (Coffman):
Mutual Exclusion
Hold and Wait
No Preemption
Circular Wait
Example: Two processes waiting for each other’s printer and tape drive.
(ii) Banker’s Algorithm
Used for deadlock avoidance by checking for a safe sequence before allocating resources.
It ensures the system always stays in a safe state.
Q4. Caching, Spooling, and Error Handling
| Concept | Description |
|---|---|
| Caching | Storing frequently used data temporarily to reduce access time. |
| Spooling | Overlapping I/O operations using buffers (e.g., print spooling). |
| Error Handling | OS detects, logs, and recovers from hardware or software errors gracefully. |
Disk Scheduling Algorithms:
FCFS (First-Come First-Serve): Requests served in arrival order.
SCAN: Disk arm moves like an elevator; services requests in one direction before reversing.
CSCAN (Circular SCAN): Arm moves in one direction, then resets quickly to beginning.
Summary
This Operating System (NCS401) paper comprehensively tests:
| Topic Area | Key Focus |
|---|---|
| OS Fundamentals | Definition, types, kernel, services |
| Process Management | States, PCB, threads, scheduling |
| Memory Management | Paging, virtual memory, thrashing |
| Concurrency Control | Critical section, semaphores, synchronization |
| Deadlocks | Conditions, avoidance (Banker’s algorithm) |
| File & I/O Management | Organization, access, spooling, caching |
