0% found this document useful (0 votes)
21 views12 pages

Operating Systems - Study Guide

This study guide provides a comprehensive overview of Operating Systems for Computer Engineering students at Savitribai Phule Pune University. It covers key concepts such as process management, memory management, file systems, disk scheduling, and security measures, along with various algorithms and synchronization problems. Additionally, it includes practice questions and important topics for exam preparation.

Uploaded by

Rahul Kadam
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)
21 views12 pages

Operating Systems - Study Guide

This study guide provides a comprehensive overview of Operating Systems for Computer Engineering students at Savitribai Phule Pune University. It covers key concepts such as process management, memory management, file systems, disk scheduling, and security measures, along with various algorithms and synchronization problems. Additionally, it includes practice questions and important topics for exam preparation.

Uploaded by

Rahul Kadam
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/ 12

11/4/25, 4:56 AM Operating Systems - Study Guide

Operating 🖨️
Systems
Print ⬇️ Download HTML
Comprehensive Study Guide for Computer Engineering Students

University: Savitribai Phule Pune University (SPPU)

Course: Third Year Engineering - Computer Science & IT


Subject Code: 310241
Academic Year: 2024-2025

Unit 1: Introduction to Operating Systems

1.1 What is an Operating System?

An Operating System (OS) is system software that manages computer hardware and
software resources and provides common services for computer programs. It acts as an
intermediary between users and computer hardware.

Key Functions of OS:

Process Management

Memory Management

File System Management

Device Management

Security and Protection

User Interface

1.2 Types of Operating Systems

Batch OS: Groups similar jobs together for execution

Time-Sharing OS: Multiple users share CPU time

Distributed OS: Multiple interconnected computers

[Link] 1/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Real-Time OS: Provides guaranteed response times

Multiprocessing OS: Uses multiple CPUs

Mobile OS: Designed for smartphones and tablets

[Link] 2/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Unit 2: Process Management

2.1 Process States

A process can be in one of the following states:

New: Process is being created

Ready: Process is waiting to be assigned to processor

Running: Instructions are being executed

Waiting: Process is waiting for I/O or event

Terminated: Process has finished execution

2.2 Process Control Block (PCB)

PCB contains information about a process:

Process ID (PID)

Process State

Program Counter

CPU Registers

Memory Management Information

I/O Status Information

2.3 CPU Scheduling Algorithms

Algorithm Allocation Advantages Disadvantages

First Come First


FCFS Simple, fair Convoy effect
Serve

Minimum avg wait


SJF Shortest Job First Starvation possible
time

Round Time quantum Context switching


Fair, no starvation
Robin based overhead

[Link] 3/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Important processes Starvation of low


Priority Based on priority
first priority

Example - Round Robin: With time quantum = 2ms and processes P1(4ms),
P2(3ms), P3(5ms), the execution order would be: P1(2) → P2(2) → P3(2) → P1(2) →
P2(1) → P3(3)

[Link] 4/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Unit 3: Process Synchronization

3.1 Critical Section Problem

When multiple processes access shared resources, race conditions can occur. The critical
section is the code segment where shared resources are accessed.

Requirements for Solution:

Mutual Exclusion: Only one process in critical section

Progress: Selection of next process cannot be postponed indefinitely

Bounded Waiting: Limit on waiting time

3.2 Semaphores

Semaphores are synchronization tools with two atomic operations:

wait(S): Decrements semaphore value

signal(S): Increments semaphore value

// Binary Semaphore Example semaphore mutex = 1; // Process accessing critical


section wait(mutex); // Critical Section signal(mutex);

3.3 Classic Synchronization Problems

Producer-Consumer Problem: Bounded buffer synchronization

Readers-Writers Problem: Multiple readers, exclusive writers

Dining Philosophers Problem: Resource allocation deadlock

[Link] 5/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Unit 4: Deadlocks

4.1 Deadlock Conditions

Deadlock occurs when all four conditions are present simultaneously:

1. Mutual Exclusion: Resources cannot be shared

2. Hold and Wait: Process holds resources while waiting for others

3. No Preemption: Resources cannot be forcibly taken

4. Circular Wait: Circular chain of processes waiting for resources

4.2 Deadlock Handling Methods

1. Prevention: Ensure at least one condition cannot hold

2. Avoidance: Use algorithms like Banker's Algorithm

3. Detection and Recovery: Allow deadlock, then detect and recover

4. Ignore: Ostrich Algorithm - used by many OS

Banker's Algorithm: Ensures system remains in safe state by checking if granting a


request would lead to deadlock. Used in resource allocation.

[Link] 6/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Unit 5: Memory Management

5.1 Memory Allocation Techniques

Contiguous Allocation:

First Fit: Allocate first sufficient block

Best Fit: Allocate smallest sufficient block

Worst Fit: Allocate largest available block

5.2 Paging

Memory is divided into fixed-size blocks called pages (logical) and frames (physical).

Aspect Description

Page Size Typically 4KB or 8KB

Page Table Maps logical to physical addresses

Internal Fragmentation Unused space within allocated pages

Advantages No external fragmentation, easy to implement

5.3 Virtual Memory

Allows execution of processes that may not be completely in memory. Uses demand paging
and page replacement algorithms.

Page Replacement Algorithms:

FIFO: Replace oldest page

LRU: Replace least recently used page

Optimal: Replace page not used for longest time (theoretical)

Second Chance: Modified FIFO with reference bit

[Link] 7/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Unit 6: File Systems

6.1 File System Structure

File system provides logical view of data storage and retrieval.

File: Named collection of related information

Directory: Contains information about files

File Attributes: Name, type, location, size, protection, time

6.2 File Allocation Methods

Method Description Advantages Disadvantages

Fast access, External


Contiguous Sequential blocks
simple fragmentation

Linked Linked list of blocks No fragmentation Slow random access

Index block with Fast access,


Indexed Index block overhead
pointers flexible

6.3 Directory Structure

Single-Level: All files in one directory

Two-Level: Separate directory for each user

Tree-Structured: Hierarchical directories

Acyclic Graph: Allows shared subdirectories

[Link] 8/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Unit 7: Disk Scheduling

7.1 Disk Structure

Disk is organized into tracks, sectors, and cylinders. Access time = seek time + rotational
latency + transfer time.

7.2 Disk Scheduling Algorithms

Algorithm Description Characteristics

FCFS First Come First Serve Fair but inefficient

SSTF Shortest Seek Time First Better than FCFS, starvation possible

SCAN Elevator algorithm Moves in one direction, then reverses

C-SCAN Circular SCAN More uniform wait time

LOOK Modified SCAN Reverses at last request

Example - SCAN Algorithm: If head is at position 50, queue is [98, 183, 37, 122,
14, 124, 65, 67], and head moves towards 0, the sequence would be: 37 → 14 → 0 →
65 → 67 → 98 → 122 → 124 → 183

[Link] 9/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Unit 8: Protection and Security

8.1 Protection Mechanisms

Access Matrix: Defines rights of each process to resources

Access Control Lists: List of permissions for each object

Capability Lists: List of objects a process can access

8.2 Security Threats

Malware: Viruses, worms, trojans, ransomware

Denial of Service: Making system unavailable

Unauthorized Access: Gaining illegal access

Data Breach: Unauthorized data extraction

8.3 Security Measures

Authentication (passwords, biometrics)

Encryption

Firewalls

Intrusion Detection Systems

Regular updates and patches

[Link] 10/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Practice Questions

Q1: Explain process states and state transitions with a diagram. Describe the role of
Process Control Block (PCB). (10 marks)

Q2: Compare FCFS, SJF, and Round Robin scheduling algorithms. Calculate average
waiting time for processes P1(6ms), P2(8ms), P3(7ms), P4(3ms) using each algorithm.
(10 marks)

Q3: Explain the Producer-Consumer problem. Write pseudocode to solve it using


semaphores. (8 marks)

Q4: What is deadlock? Explain all four necessary conditions for deadlock. Describe
Banker's Algorithm for deadlock avoidance. (10 marks)

Q5: Explain paging and segmentation. Compare both memory management schemes.
(8 marks)

Important Topics for Exam

1. CPU scheduling algorithms and calculations

2. Process synchronization and semaphores

3. Deadlock conditions and prevention

4. Memory management techniques

5. Page replacement algorithms

6. File allocation methods

7. Disk scheduling algorithms

8. System calls and their types

[Link] 11/12
11/4/25, 4:56 AM Operating Systems - Study Guide

Operating Systems Study Guide - Pune University

Comprehensive coverage of OS concepts for examination preparation

© 2024 | Educational Resource

[Link] 12/12

You might also like