IOS (CS3451) - Full Notes
IOS (CS3451) - Full Notes
Basic Elements:
Definition:
An Operating System (OS) is a system software that acts as an intermediary between the user and the
hardware, managing resources and providing services to programs.
Objectives:
Functions:
1. Process Management
2. Memory Management
3. File System Management
4. Device Management
5. Security and Protection
6. User Interface
Generation Features
Types:
Services Provided:
Program Execution
I/O Operations
File System Manipulation
Communication
Error Detection
Resource Allocation
Security and Protection
8. System Calls
Definition:
System calls are the programming interface to the services provided by the OS.
Categories:
9. System Programs
Purpose:
Types:
File manipulation
Status information
Programming language support
Program loading and execution
Communication
Design Goals:
Implementation:
Language: OS can be written in C, C++, Assembly.
Kernel vs User mode: Kernel handles core services; user space is for applications.
Techniques:
Monolithic Structure
Layered Approach
Microkernel Architecture
Modular Approach
Client-Server Model
Virtual Machines
1. Processes
Process Concept:
Process States:
New
Ready
Running
Waiting
Terminated
Contains:
Process state
Program counter
CPU registers
Memory management info
I/O status info
2. Process Scheduling
Objective:
Scheduling Queues:
Schedulers:
3. Operations on Processes
Purpose:
Methods:
Shared Memory
Message Passing
Communication Types:
Direct / Indirect
Synchronous / Asynchronous
5. CPU Scheduling
Scheduling Criteria:
CPU Utilization
Throughput
Turnaround Time
Waiting Time
Response Time
Scheduling Algorithms:
SJF (Shortest Job First) Chooses job with shortest burst Preemptive & Non-preemptive
6. Threads
Definition:
Benefits:
Multithread Models:
Many-to-One
One-to-One
Many-to-Many
Threading Issues:
Thread cancellation
Signal handling
Thread pools
7. Process Synchronization
Conditions:
Mutual Exclusion
Progress
Bounded Waiting
8. Synchronization Tools
Hardware Support:
Test-and-set
Compare-and-swap
Semaphores:
Mutex Locks:
1. Producer-Consumer Problem
2. Reader-Writer Problem
3. Dining Philosophers Problem
10. Monitors
11. Deadlock
Definition:
A situation where a set of processes are blocked, each waiting for a resource held by others.
Necessary Conditions:
1. Mutual Exclusion
2. Hold and Wait
3. No Preemption
4. Circular Wait
Methods:
1. Prevention
o Deny one of the necessary conditions.
2. Avoidance
o Ensure safe state (e.g., Banker’s Algorithm).
3. Detection and Recovery
o Detect cycles in resource allocation.
o Recover by killing processes or preempting resources.
4. Ignore the Problem
o Called the Ostrich Algorithm (used in many OSs).
A diagram set
A PDF printable version
A comparison table for algorithms
Solved problems on CPU scheduling or deadlocks
✅ UNIT III – MEMORY MANAGEMENT
1. Main Memory
2. Swapping
Allocation Strategies:
Problem:
4. Paging
8. Virtual Memory
9. Demand Paging
Algorithm Description
Equal allocation
Proportional allocation
Priority-based allocation
13. Thrashing
2. Disk Structure
Algorithm Description
4. File-System Interface
File Concepts:
Access Methods:
Sequential
Direct (random)
Indexed
5. Directory Structure
Organizes files.
Types:
Single-level
Two-level
Tree-structured
Acyclic graph
General graph
6. Directory Organization
Directory Implementation:
Linear list
Hash table
Allocation Methods:
Method Description
Bit vector
Linked list
Grouping
Counting
10. I/O Systems
I/O Hardware:
I/O scheduling
Buffering
Caching
Spooling
Definition:
History:
Benefits:
Isolation
Resource sharing
Flexibility
Testing environments
Features:
Hypervisor (VMM):
o Type 1 (bare metal)
o Type 2 (hosted)
iOS:
Developed by Apple.
Based on Darwin (UNIX).
Secure and sandboxed.
Android:
Open-source OS by Google.
Based on Linux kernel.
Uses Java/Kotlin with ART (Android Runtime).