CY404 β€’ Operating Systems β€’ RGPV Cyber Security β€’ IV Semester

Operating Systems

Premium exam-oriented study material covering OS fundamentals, process management, CPU scheduling, memory management, file systems, device management and Linux system calls.

Course Introduction

What is an Operating System?

An Operating System is system software that manages computer hardware and provides common services for application programs. It acts as an interface between users, applications and hardware resources.

RGPV's CY404 course covers OS importance and objectives, OS services, process management, memory management, CPU scheduling, inter-process communication, file/device management and Linux or educational-OS system calls.

CY404Operating Systems
4 CreditsRGPV IV Semester
Exam FocusAlgorithms, diagrams, comparisons & numericals
Core Notes

CY404 Operating Systems

Structured notes aligned with the major RGPV CY404 course areas.

Unit I

Introduction to Operating Systems & OS Services

The Operating System manages resources, controls program execution and provides an environment in which application software can run.

Functions of an Operating System

Process ManagementCreates, schedules and terminates processes.
Memory ManagementAllocates and tracks main-memory usage.
File ManagementOrganises files, directories and storage.
Device ManagementCoordinates I/O devices.
SecurityControls access to system resources.
User InterfaceProvides CLI, GUI or other interfaces.

Operating System Services

  • Program execution
  • I/O operations
  • File-system manipulation
  • Communication
  • Error detection
  • Resource allocation

Desirable Characteristics

  • Reliability and availability
  • Efficient resource utilisation
  • Security and protection
  • Convenient user interaction
  • Support for concurrent activities
Exam Tip: Define the OS first, then explain its major functions/services and draw a neat block diagram.

Unit 1

Introduction to Operating Systems

πŸ“– Open handwritten notes
Unit II

Process Management, IPC & CPU Scheduling

A process is a program in execution. Process management deals with process creation, scheduling, synchronisation, communication and termination.

Process States

NewProcess is being created.
ReadyWaiting for CPU.
RunningCurrently executing.
WaitingWaiting for an event or I/O.
TerminatedExecution completed.

Inter-Process Communication

IPC allows processes to exchange data and coordinate activities. Common approaches include shared memory and message passing.

CPU Scheduling Algorithms

FCFSFirst Come First Served.
SJFShortest Job First.
SRTFPreemptive shortest-job scheduling.
PriorityScheduling according to priority.
Round RobinTime-quantum based scheduling.
Multilevel QueueSeparate scheduling queues.
Turnaround Time = Completion Time βˆ’ Arrival Time
Waiting Time = Turnaround Time βˆ’ Burst Time
Numerical Approach:
Draw the Gantt chart, calculate completion times, then calculate turnaround and waiting time process-by-process.

Deadlock

Deadlock occurs when processes remain blocked because each is waiting for a resource held by another process.

  • Mutual exclusion
  • Hold and wait
  • No preemption
  • Circular wait

Unit 2

Process Management

πŸ“– Open handwritten notes
Unit III

Memory Management & Virtual Memory

Memory management controls allocation and deallocation of memory and supports efficient execution of multiple processes.

Contiguous Allocation

  • Memory is allocated in contiguous regions.
  • Common strategies include first fit, best fit and worst fit.
  • External fragmentation can occur.

Paging

Paging divides logical memory into fixed-size pages and physical memory into frames. A page table maps pages to frames.

Logical Address = Page Number + Page Offset

Segmentation

Segmentation divides a program into logical variable-sized segments such as code, data and stack.

Virtual Memory

Virtual memory allows processes to execute without requiring their complete address space to be resident in physical memory at once.

Page Replacement Algorithms

FIFOReplaces the oldest loaded page.
OptimalReplaces the page used farthest in the future.
LRUReplaces the least recently used page.
Numerical Tip: Create a frame table and mark each page reference. Count page faults after each reference.

Unit 3

Memory Management

πŸ“– Open handwritten notes
Unit IV

File System, I/O & Device Management

The file system organises persistent data, while device management coordinates communication between software and hardware devices.

File Attributes

NameFile identifier.
TypeKind of file.
SizeStorage occupied.
ProtectionAccess permissions.
LocationStorage information.
TimestampsCreation/modification/access information.

File Allocation Methods

  • Contiguous: File blocks are stored consecutively.
  • Linked: File blocks are connected through pointers.
  • Indexed: An index block stores references to file blocks.

Disk Scheduling

FCFSServices requests in arrival order.
SSTFSelects shortest seek distance.
SCANMoves the disk arm and services requests.
C-SCANCircular one-direction scheduling.
Disk access time is commonly discussed using seek time, rotational latency and transfer time.

Unit 4

File Systems Management

πŸ“–Open handwritten Notes
Unit V

Linux, System Calls & OS Utilities

RGPV's course outcomes include developing small modules, shell and utility programs using Linux or an educational operating system's system calls.

System Calls

System calls provide a controlled interface through which application programs request services from the operating system kernel.

Process ControlProcess creation and execution operations.
File ManagementOpen, read, write and close operations.
Device ManagementRequests involving I/O devices.
Information MaintenanceSystem and process information.
CommunicationProcess communication mechanisms.
ProtectionAccess control over resources.

Linux Shell

A shell provides a command-line interface through which users interact with the operating system and automate tasks using scripts.

Cyber Security Connection: Processes, permissions, files, users, memory and system calls are fundamental for Linux security analysis.

Unit 5

Input / Output Management

πŸ“– Open handwritten notes
Exam Revision

Important Comparisons

Process vs Program

PointProgramProcess
MeaningPassive set of instructionsProgram in execution
StateNot executingHas execution state
ResourcesNot an active execution entityUses CPU, memory and other resources

Paging vs Segmentation

PointPagingSegmentation
DivisionFixed-size pagesVariable-size logical segments
ViewMemory-management orientedLogical program structure
AddressPage number + offsetSegment number + offset

FCFS vs Round Robin

PointFCFSRound Robin
SchedulingArrival orderTime quantum based
PreemptionGenerally non-preemptivePreemptive
UseSimple schedulingTime-sharing systems
Quick Revision

Important Formulas & Algorithms

Turnaround TimeCompletion Time βˆ’ Arrival Time
Waiting TimeTurnaround Time βˆ’ Burst Time
Response TimeFirst CPU allocation βˆ’ Arrival Time
PagingPage number + offset
FIFOFirst In First Out
LRULeast Recently Used
Most Important

CY404 Important Questions

Prepare these topics thoroughly for theory and numerical questions.

Question 01

Define Operating System. Explain its functions, objectives and characteristics.

Question 02

Explain operating system services with suitable examples.

Question 03

Explain process states and process management.

Question 04

Explain FCFS, SJF, Priority and Round Robin scheduling.

Question 05

Solve a CPU scheduling numerical and calculate waiting and turnaround time.

Question 06

Explain Inter-Process Communication and its mechanisms.

Question 07

Explain deadlock and its four necessary conditions.

Question 08

Explain paging, segmentation and virtual memory.

Question 09

Explain FIFO, Optimal and LRU page replacement algorithms.

Question 10

Explain file allocation and disk scheduling algorithms.

Question 11

What are system calls? Explain their categories and role.

Question 12

Explain Linux shell and the role of system calls.