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
File Size
77.44 KB
Uploader
SuGanta International
Download
Continue to the SuGanta to download this note securely.
This is Kishan Kumar Dubey. I have done my schooling from CBSE, graduation from CSJMU, post graduation from ASU and appear in B.Ed. from MGKVP on aided seat.
I have 2 years experience in academic class (Future Shapers C...
I have 10+ years of experience in teaching maths physics and chemistry for 10th 11th 12th and intermediate students all my students till today are 90% grade. Even an average student got 90%
I am an experienced teacher ,worked with many reputed institutions Mount Carmel Convent , Chandrapur Maharashtra India, St Paul’s H.S Hyderabad, Fiitjee school Narayanaguda.
I have handled students of different age gr...
Hi, I’m Shifna Sherin! I believe that every student has the potential to excel in Math with the right guidance. I offer dedicated tutoring for 10th-grade students, covering everything from foundational basics to advanced...
Excellence in Language. Leadership in Results.
With over 18 years of distinguished experience, Réussi Academy of Language stands as a trusted name in foreign language and communication training. Foun...
IGS Institute provide classes for SSC, Bank, Railway, Police, NDA, Airforce Group X and Group Y, Teaching exams. IGS - Institute for Government Services providing classes since 2018 to the students.