Previous year paper

THEORY EXAMINATION (SEM–IV) 2016-17 OPERATING SYSTEM

Computer Science B.Tech 0 downloads

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.QuestionExplanation
(a)Process vs ProgramA program is passive (set of instructions stored on disk); a process is an active execution instance of a program in memory.
(b)Context SwitchingThe mechanism of saving and restoring the state (CPU registers, program counter) of a process so that execution can resume later.
(c)Demand PagingA memory management scheme where pages are loaded into RAM only when required, reducing I/O overhead.
(d)Virtual MemoryTechnique that gives the illusion of a large memory by combining physical and secondary memory using paging.
(e)Directory vs FileDirectory stores file metadata and structure; file stores user data.
(f)Multiprogramming SystemAllows multiple programs to reside in memory at the same time; improves CPU utilization.
(g)Internal vs External FragmentationInternal → unused memory within allocated block; External → scattered free memory blocks that cannot be used.
(h)Critical SectionCode section where shared resources are accessed — must ensure mutual exclusion to prevent data inconsistency.
(i)ThreadsLightweight processes sharing memory and resources of a parent process.
(j)Operating System DefinitionSoftware 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

ConceptDescription
CachingStoring frequently used data temporarily to reduce access time.
SpoolingOverlapping I/O operations using buffers (e.g., print spooling).
Error HandlingOS 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 AreaKey Focus
OS FundamentalsDefinition, types, kernel, services
Process ManagementStates, PCB, threads, scheduling
Memory ManagementPaging, virtual memory, thrashing
Concurrency ControlCritical section, semaphores, synchronization
DeadlocksConditions, avoidance (Banker’s algorithm)
File & I/O ManagementOrganization, access, spooling, caching
TypePrevious year paper
SubjectComputer Science
Board / courseB.Tech
FilePDF · 77.44 KB
Shared by SuGanta International

Added by the SuGanta team.