OSY Solved Question Bank
OSY Solved Question Bank
2 marks Questions
1. Two features of Linux:
Criticality Non-critical; delays are tolerable. Critical; delays can lead to system failure.
Fault Tolerance: Failure of one processor doesn't halt the entire system.
4 marks Questions
1. Batch OS
2. Time Sharing OS
3. Distributed OS
4. Real-Time OS
5. Multiprogramming OS
6. Multiprocessor OS
Multiprogramming OS Explanation:
Working:
o When one program is waiting for I/O operations, the CPU switches to another
program.
Advantages:
o Increased throughput.
Example: UNIX.
Working:
Time-sharing OS allows multiple users to share CPU time concurrently by dividing time into
small slices, known as time quanta.
Each user's program gets a time quantum for execution. If the program doesn't complete, it
moves to the back of the queue.
Diagram:
(Show multiple terminals connected to a central CPU, with arrows indicating time-sharing among
them).
Enlist:
1. Task Manager
2. Disk Cleanup
3. File Explorer
4. Performance Monitor
Explanation:
Task Manager:
Disk Cleanup:
o Identifies and removes unnecessary files like temporary data, recycle bin content,
etc.
Resources Consumes fewer system resources. Requires more memory and CPU.
Explanation:
Advantages:
1. Increased Throughput: Multiple CPUs allow parallel processing, reducing task completion
time.
2. Fault Tolerance: Failure of one processor doesn’t stop the entire system.
Explanation:
A real-time OS is designed to handle tasks within a fixed time constraint, ensuring immediate
and predictable responses.
Types:
Unit 2
2 marks questions
Process Control: For process creation and termination (e.g., fork, exit).
File Management: For file operations like read, write, open, and close.
Device Management: For device control, such as request and release of devices.
4 marks Questions
5. Activities of OS components
i) Main Memory Management:
Keeps track of used and free memory.
Allocates and deallocates memory to processes.
Ensures proper memory protection and access.
ii) File Management:
Provides file creation, deletion, and access mechanisms.
Maintains directories and file structures.
Ensures security and permissions for file access.
6. Uses of OS Tools
i) Security Policy:
Implements rules for system and data access.
Protects against unauthorized activities and ensures system integrity.
ii) User Management:
Manages user accounts, permissions, and authentication.
Tracks user activity and allocates system resources.
iii) Task Scheduler:
Allocates CPU time to processes based on priority.
Manages multitasking and ensures smooth operation.
Alternate Use Cases:
i) Device Management:
Manages hardware devices and drivers.
Resolves conflicts and ensures proper functionality.
ii) Performance Monitor:
Analyzes and optimizes system performance.
Identifies resource bottlenecks.
2. Syntax of Commands
o sleep: sleep [number of seconds]
o kill: kill [signal] PID
4 Marks Questions
1. Inter-Process Communication (IPC) Model
o Shared Memory Method:
Processes share a region of memory to exchange data.
One process writes data, and another reads it.
Diagram: Show two processes accessing a shared memory segment.
2. ps Command with Four Options
o ps -a: Lists all processes.
o ps -u: Shows processes by a specific user.
o ps -x: Displays processes without a terminal.
o ps -e: Displays all system processes.
3. Unix Commands
o Create folder OSY: mkdir OSY
o Create file FIRST in OSY: touch OSY/FIRST
o List files and directories: ls -l
o Clear screen: clear
4. Types of Scheduler
o Long-Term Scheduler: Selects processes to be loaded into memory.
o Short-Term Scheduler: Assigns CPU to ready processes.
o Medium-Term Scheduler: Suspends/resumes processes for better resource
management.
9. Types of Schedulers
o Same as Q4 above.
6 Marks Questions
1. One-to-One Multi-Threading Model
o Each thread maps to a kernel thread.
o Diagram: Show one user thread linked to one kernel thread.
o Advantages:
1. Parallelism at kernel level.
2. Threads do not block each other.
2. Process vs. Thread
2 Marks Questions
1. Four Scheduling Criteria
o CPU Utilization: Maximize CPU usage.
o Throughput: Number of processes completed per unit time.
o Turnaround Time: Total time from submission to completion.
o Waiting Time: Time a process spends in the ready queue.
Response Time Better for short tasks. May cause longer delays.
3. Definition of Deadlock
Deadlock is a state where multiple processes are unable to proceed because each
is waiting for resources held by another process.
4. Use of ps Command
Use: Displays information about running processes.
UID: User Identifier.
PID: Process Identifier.
5. Syntax of Commands
sleep: sleep [seconds]
kill: kill [signal] PID
4 Marks Questions
1. I/O Burst and CPU Burst Cycle
o CPU Burst: Time spent by a process executing on the CPU.
o I/O Burst: Time spent waiting for I/O operations.
o Diagram: Alternate cycles of CPU burst and I/O burst.
7. Types of Schedulers
o Long-Term Scheduler: Selects processes for execution.
o Short-Term Scheduler: Assigns CPU to processes in the ready queue.
o Medium-Term Scheduler: Suspends and resumes processes.
9. Scheduling Terms
o CPU Utilization: Percentage of time the CPU is busy.
o Throughput: Processes completed per unit time.
o Turnaround Time: Completion time minus arrival time.
o Waiting Time: Time spent in the ready queue.
Process Arrival Time Burst Time Completion Time Turnaround Time Waiting Time
P0 0 10 10 10 0
P1 1 29 39 38 9
P2 2 3 42 40 37
P3 3 7 49 46 39
P4 4 12 61 57 45
6 Marks Questions
1. SJF and FCFS Scheduling Example
Waiting Waiting
Arrival Burst Completion Completion Turnaround Turnaround
Process Time Time
Time Time Time (SJF) Time (FCFS) Time (SJF) Time (FCFS)
(SJF) (FCFS)
P1 0 7 7 7 7 7 0 0
P2 1 4 11 11 10 10 6 6
P3 2 10 21 21 19 19 9 9
P4 3 6 27 27 24 24 18 18
P5 4 8 35 35 31 31 23 23
2 Marks Questions
1. Virtual Memory:
o Virtual memory is a memory management technique that provides an
illusion of a large memory by using physical memory and disk storage.
2. Paging and Segmentation:
o Paging: Divides memory into fixed-size blocks called pages to manage
memory efficiently.
o Segmentation: Divides memory into variable-sized segments based on
logical divisions of a program.
3. Definitions:
o Virtual Memory: See Q1 above.
o Paging: See Q2 above.
4. Fragmentation:
o Fragmentation is the unusable memory space that arises due to inefficient
memory allocation, either internally or externally.
5. Virtual Memory:
o See Q1 above.
4 Marks Questions
1. Partitioning and its Types
o Partitioning: Memory is divided into sections to allocate to processes.
Fixed Partitioning: Memory is divided into fixed sizes.
Variable Partitioning: Memory partitions vary dynamically as per
process needs.
2. LRU Page Replacement Algorithm
o Reference String: 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1.
o Steps: Simulate page replacement with a given frame size.
o Calculate Page Faults: Number of times a new page replaces an existing
one.
4. Fragmentation
o Definition: Memory space waste due to inefficient allocation.
o Internal Fragmentation: Unused memory within allocated blocks.
o External Fragmentation: Unusable scattered free memory between
allocations.
Mapping Physical address using page table. Physical address using segment table.
6 Marks Questions
1. Virtual Memory and Paging
o Concept: Virtual memory uses paging to divide programs into fixed-size
pages and map them to physical frames in memory.
o Diagram: Draw paging hardware with page table, memory, and CPU.
o Example: Show mapping of logical addresses to physical addresses using the
page table.
2 Marks Questions
1. Four File Attributes:
o Name: The name of the file, used to identify it.
o Type: The file’s format (e.g., text, binary).
o Size: The total number of bytes the file occupies.
o Location: The location or address of the file on the storage device.
4 Marks Questions
1. Sequential and Direct Access Methods:
o Sequential Access: Data is accessed in a linear, one-by-one fashion, starting
from the beginning (e.g., tape storage).
o Direct Access: Data can be accessed in any order without reading the
preceding data, as done in hard drives.
6 Marks Questions
1. File Allocation Methods and Contiguous Allocation:
o Methods:
Contiguous Allocation
Linked Allocation
Indexed Allocation
o Contiguous Allocation:
Explanation: Files are stored in consecutive blocks in memory. This
method is efficient in terms of access speed but suffers from
fragmentation.
Advantages: Simple and fast to access.
Disadvantages: Leads to fragmentation and inefficient utilization of
space.
3. Directory Structures:
o Single-Level: All files are stored in one directory without subdirectories.
Simple but hard to manage.
o Two-Level: A root directory points to user directories, and each user
directory holds the files.
o Tree-Structured: Directories and subdirectories are organized hierarchically,
providing a flexible file management system.