0% found this document useful (0 votes)
2 views5 pages

OS Theory Notes

The document covers key concepts of process management, including the definition of a process, its states, and the role of the Process Control Block (PCB). It also discusses process scheduling, inter-process communication, threads, CPU scheduling, deadlock conditions, memory management techniques, and file system structures. Each section outlines essential components and methods related to operating systems, including scheduling algorithms, memory allocation strategies, and file access methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

OS Theory Notes

The document covers key concepts of process management, including the definition of a process, its states, and the role of the Process Control Block (PCB). It also discusses process scheduling, inter-process communication, threads, CPU scheduling, deadlock conditions, memory management techniques, and file system structures. Each section outlines essential components and methods related to operating systems, including scheduling algorithms, memory allocation strategies, and file access methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Process Management

3.1 Process - Concept, Process States, Process Control Block

- Process Concept: A process is a program in execution. It includes the program code, current

activity (values in registers, program counter), and resources like files and memory.

- Process States: New, Ready, Running, Waiting/Blocked, Terminated.

- Process Control Block (PCB): Stores process ID, state, program counter, registers, memory limits,

I/O status.

3.2 Process Scheduling - Scheduling Queues, Schedulers, Context Switch

- Scheduling Queues: Job Queue, Ready Queue, Device Queue.

- Schedulers: Long-term, Short-term, Medium-term.

- Context Switch: Saving and restoring process state when switching CPU.

3.3 Inter-Process Communication (IPC)

- Shared Memory System: Processes share a memory space.

- Message Passing System: Processes communicate via messages.

3.4 Threads - Benefits, User and Kernel Threads

- Threads: Smallest unit of execution.

- Benefits: Faster switching, better resource use, shared memory.

- User Threads: Managed by user libraries.

- Kernel Threads: Managed by the OS.


3.5 Multithreading Models

- Many-to-One: Many user threads to one kernel thread.

- One-to-One: One user thread to one kernel thread.

- Many-to-Many: Many user threads to many kernel threads.

CPU Scheduling & Deadlock


4.1 Scheduling Concepts

- Objectives: Maximize CPU usage, throughput, minimize waiting time, turnaround time.

- CPU and I/O Burst Cycles: Alternate use of CPU and I/O.

- Preemptive vs Non-preemptive Scheduling.

- Scheduling Criteria: CPU utilization, throughput, turnaround time, waiting time, response time,

fairness.

4.2 Scheduling Algorithms

- FCFS, SJF, SRTN, RR, Priority Scheduling, Multilevel Queue.

4.3 Deadlock

- System Model: Processes request/release resources.

- Necessary Conditions: Mutual Exclusion, Hold & Wait, No Preemption, Circular Wait.

- Handling: Prevention, Avoidance, Detection, Ignore.

4.4 Deadlock Avoidance


- Safe State, Resource Allocation Graph.

- Bankers Algorithm: Safe state checking.

- Safety Algorithm: Checks if system is in safe state.

- Resource-Request Algorithm: Checks if a request leads to a safe state.

Memory Management
5.1 Background

- Memory Hardware: MMU, RAM, etc.

- Address Binding: Compile-time, Load-time, Execution-time.

- Logical vs Physical Address.

5.2 Swapping

- Temporarily move processes between memory and disk.

5.3 Contiguous Memory Allocation

- Internal & External Fragmentation.

5.4 Paging, Page Table, Page Fault, Segmentation

- Paging: Pages and Frames with Page Table.

- Page Fault: Page not in memory.

- Segmentation: Logical division of memory.


5.5 Virtual Memory

- Concept: Combines RAM and disk.

- Demand Paging: Load pages only when needed.

5.6 Page Replacement

- FIFO, LRU, Optimal, NRU.

File System
6.1 File Concepts

- File: Named collection of data.

- Attributes: Name, Type, Size, Location, Permissions.

- Operations: Create, Open, Read, Write, Delete, etc.

- Types: Text, Binary, Executable.

- File System Structure: Organizes files and metadata.

6.2 Access Methods

- Sequential: Access in order.

- Direct: Random access.

- Swapping: Usually related to memory, not access method.

6.3 File Allocation Methods


- Contiguous: Fast, but fragmentation.

- Linked: No fragmentation, slow access.

- Indexed: Fast access, index overhead.

6.4 Directory Structure

- Single-Level: All files in one directory.

- Two-Level: Separate directories per user.

- Tree-Structured: Hierarchical, allows grouping.

You might also like