0% found this document useful (0 votes)
3 views10 pages

CST206 Operating Systems Important Topics

The document outlines important topics in operating systems, including functions, structures, and types of operating systems, as well as process management, synchronization, memory management, and file system management. It covers key concepts such as process states, scheduling algorithms, deadlock handling, memory allocation techniques, and disk scheduling. Additionally, it includes common computation problems related to scheduling, page faults, and memory address translation.

Uploaded by

kuriantony330
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)
3 views10 pages

CST206 Operating Systems Important Topics

The document outlines important topics in operating systems, including functions, structures, and types of operating systems, as well as process management, synchronization, memory management, and file system management. It covers key concepts such as process states, scheduling algorithms, deadlock handling, memory allocation techniques, and disk scheduling. Additionally, it includes common computation problems related to scheduling, page faults, and memory address translation.

Uploaded by

kuriantony330
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/ 10

OPERATING SYSTEMS -

IMPORTANT TOPICS
Based on analysis of CST206 July 2021 & June 2022 Question
Papers

MODULE 1: INTRODUCTION TO
OPERATING SYSTEMS
1. Functions of Operating Systems
• Process Management: Creates, schedules, and
terminates processes
• Memory Management: Allocates and deallocates
memory space
• File Management: Creates, deletes, and provides
access to files
• I/O Management: Manages device communication and
drivers
• Secondary Storage Management: Provides free space
management, storage allocation
• Protection and Security: Protects system resources
and user data

2. Parameter Passing Methods to OS


• Registers: Fastest method, limited number of values can
be passed
• Memory/Buffer: Parameters placed in a block of
memory, address passed in register
• Stack: Parameters pushed onto stack by program,
popped by OS
3. Operating System Structures
• Layered Approach: System divided into layers, each
built on lower layers
• Microkernel: Minimal kernel with basic features, other
services run as user processes
• Monolithic: All OS services operate in kernel space,
faster but less modular

4. Types of Operating Systems


• Multiprogramming Systems: Several programs loaded
in memory for execution
• Multitasking Systems: CPU switches between multiple
processes
• Multiprocessor Systems: Multiple processors share
memory and clock
• Peer-to-Peer Systems: No distinction between client
and server, all nodes share resources
• Client-Server Systems: Server provides services that
clients request

5. Bootstrap Loader
• Small code in boot ROM that locates and loads the OS
kernel
• Performs hardware initialization and memory checks
• Loads OS from disk to memory and transfers control to it

MODULE 2: PROCESS MANAGEMENT


1. Process Concept and PCB
• Process: Program in execution
• Process Control Block (PCB): Data structure
containing process information
• Process state, program counter, CPU registers,
scheduling information, etc.
2. Process States and Transitions
• New: Process being created
• Ready: Process waiting to be assigned to CPU
• Running: Instructions being executed
• Waiting/Blocked: Process waiting for some event
• Terminated: Process completed execution

3. Process Scheduling
• Long-term Scheduler: Controls degree of
multiprogramming
• Short-term Scheduler: Selects process from ready
queue for execution
• Mid-term Scheduler: Handles swapping of processes

4. Scheduling Algorithms
• First-Come, First-Served (FCFS): Non-preemptive,
simple but may cause convoy effect
• Shortest Job First (SJF): Minimizes average waiting
time, can be preemptive/non-preemptive
• Priority Scheduling: Assigns priority to each process,
can lead to starvation
• Round Robin (RR): Time quantum-based preemptive
scheduling

5. Context Switching
• Saving the state of current process and loading the state
of next process
• Considered overhead as no useful work is done during
this time
• Operations include: saving CPU registers, updating PCB,
loading new process state
6. Inter-Process Communication (IPC)
• Message Passing: Processes communicate by
exchanging messages
• Synchronous: Sender waits until message is received
• Asynchronous: Sender continues execution after
sending
• Shared Memory: Processes share a common memory
area
• Pipes: Allows communication between related processes

7. Process Creation with Fork()


• Creates child process which is duplicate of parent
• Both processes continue execution after fork() statement
• Return value differentiates parent (positive PID) from
child (0)

MODULE 3: PROCESS
SYNCHRONIZATION & DEADLOCKS
1. Critical Section Problem
• Section of code where shared resources are accessed
• Solution must satisfy:
• Mutual Exclusion: Only one process in critical section at
a time
• Progress: Selection of process to enter critical section
can't be postponed indefinitely
• Bounded Waiting: Limit on number of times other
processes enter critical section

2. Synchronization Tools
• Semaphores: Synchronization variable with wait() and
signal() operations
• Binary Semaphore: Value 0 or 1, used for mutual
exclusion
• Counting Semaphore: Can have arbitrary value, used
for resource counting
• Mutex: Simplified binary semaphore for mutual
exclusion

3. Classical Synchronization Problems


• Bounded Buffer (Producer-Consumer): Producers
write to buffer, consumers read from it
• Readers-Writers: Multiple readers can read
simultaneously, writers need exclusive access
• Dining Philosophers: Resource allocation problem
illustrating deadlock challenges

4. Deadlock Concept
• Situation where processes are blocked forever waiting for
each other
• Necessary Conditions:
• Mutual Exclusion: At least one resource must be non-
sharable
• Hold and Wait: Process holding resources can request
more
• No Preemption: Resources can't be forcibly taken away
• Circular Wait: Circular chain of processes waiting for
resources

5. Deadlock Handling Strategies


• Prevention: Ensure at least one of four necessary
conditions cannot hold
• Avoidance: Dynamic resource allocation using Banker's
Algorithm
• Detection: Identify deadlocks using resource allocation
graph or algorithms
• Recovery: Terminate processes or preempt resources to
break deadlock
6. Resource Allocation Graph
• Directed graph showing processes, resources, and their
relationships
• Used to detect and avoid deadlocks

7. Banker's Algorithm
• Safety algorithm to determine if system is in safe state
• Resource-request algorithm to handle new requests
• Prevents deadlocks by granting resources only if system
remains in safe state

MODULE 4: MEMORY MANAGEMENT


1. Memory Binding
• Compile Time: Absolute addresses known during
compilation
• Load Time: Relocatable addresses generated during
compilation, bound at load time
• Execution Time: Binding delayed until run time,
requires hardware support

2. Contiguous Memory Allocation


• Each process allocated single continuous section of
memory
• Issues with external fragmentation

3. Paging
• Physical memory divided into fixed-sized frames
• Logical memory divided into same-sized pages
• Page table maps logical pages to physical frames
• Eliminates external fragmentation but can have internal
fragmentation
4. Translation Lookaside Buffer (TLB)
• Cache for page table entries
• Speeds up page access by storing recently used page
translations
• Address translation process: 1. Check TLB for page
number 2. If present (TLB hit), get frame number 3. If not
present (TLB miss), consult page table and update TLB

5. Segmentation
• Memory divided according to logical segments (functions,
data, stack)
• Each segment has name and length
• Logical address consists of
• No internal fragmentation but can have external
fragmentation

6. Virtual Memory
• Allows execution of processes larger than physical
memory
• Separates logical memory from physical memory
• Implemented using demand paging

7. Demand Paging
• Pages loaded into memory only when needed
• Uses page fault handling mechanism: 1. Trap to OS 2.
Save user registers 3. Determine if address is valid 4. Get
free frame 5. Read page from disk 6. Reset page table
and other tables 7. Restart instruction

8. Page Replacement Algorithms


• FIFO: Replace oldest page
• Optimal: Replace page not used for longest time in
future
• LRU (Least Recently Used): Replace page unused for
longest time in past

9. Thrashing
• Process spending more time paging than executing
• Occurs when a process doesn't have enough frames for
its working set

MODULE 5: FILE SYSTEM & DISK


MANAGEMENT
1. File Concept
• Attributes: Name, identifier, type, location, size,
protection, time/date/user ID
• Operations: Create, write, read, reposition, delete,
truncate
• Types: Text files, source files, executable files, etc.

2. Access Methods
• Sequential Access: Records processed in order
• Direct Access: Random access without traversing
previous records
• Indexed Access: Index provides pointers to various
blocks

3. Directory Structure
• Single-Level: All files in same directory, naming issues
• Two-Level: Separate directory for each user
• Tree-Structured: Hierarchical system with directories
and subdirectories

4. File Allocation Methods


• Contiguous Allocation: Files occupy continuous blocks
• Advantages: Simple, supports sequential and direct
access
• Disadvantages: External fragmentation, file size
declaration
• Linked Allocation: Each block points to next block in
file
• Advantages: No external fragmentation, files can grow
• Disadvantages: Only sequential access, reliability issues
• Indexed Allocation: Special index block contains
pointers to all blocks
• Advantages: Direct access, no external fragmentation
• Disadvantages: Pointer overhead, file size limited by
index block size

5. File Protection
• Access control based on user identities and permissions
• Common scheme: owner/group/public with read/write/
execute permissions

6. Disk Scheduling Algorithms


• FCFS (First-Come, First-Served): Simple but might
cause excessive head movements
• SSTF (Shortest Seek Time First): Minimizes seek time
but may cause starvation
• SCAN: Head moves from one end to other, servicing
requests along the way
• C-SCAN: Modified SCAN that returns to start without
servicing on return trip
• LOOK/C-LOOK: Like SCAN/C-SCAN but only goes as far
as last request

7. Disk Performance Metrics


• Seek Time: Time to position head at desired cylinder
• Rotational Latency: Time waiting for desired sector to
rotate under head
• Transfer Time: Time to transfer data
• Disk Bandwidth: Total amount of data transferred / total
time

8. Disk Formatting
• Low-level Formatting: Dividing disk into sectors for
controller
• Partitioning: Dividing disk into one or more groups of
cylinders
• Logical Formatting: Creating file system structures

COMMON COMPUTATION PROBLEMS


1. Scheduling Algorithm Calculations - Average waiting
time - Average turnaround time - Gantt chart
construction
2. Page Fault Calculations - Number of page faults for
given reference string - Comparing different replacement
algorithms
3. Disk Scheduling Calculations - Total head movement
for different algorithms
4. Memory Address Translation - Logical to physical
address conversion - Page table calculations
5. Banker's Algorithm - Determining if system is in safe
state - Handling resource requests safely

You might also like