Operating System

Operating System – Complete Study Notes (Exam Edition)

Operating System — Complete Study Notes

Simple, exam-focused notes for SSC, Banking (IBPS/SBI/RBI), Railway (RRB), UPSC, and other government exams. Built for fast learning and last-minute revision.

★ Concepts + Tables ★ Full Forms ★ 70+ Solved MCQs ★ Quick Revision

1 OS Basics & Definition

The single most common starting topic in every computer-awareness section.

Definition An Operating System (OS) is system software that acts as an interface between the user and computer hardware. It manages all hardware and software resources and lets the user run programs. Without an OS, a computer cannot function.
  • OS is the first program loaded into memory after booting and the last to close at shutdown.
  • It is also called a resource manager or master control program.
  • It runs in kernel mode (privileged), while user apps run in user mode.

Common Examples (memorise the maker)

OSMade ByUsed InType
WindowsMicrosoftPCs / LaptopsGUI, Desktop
LinuxLinus Torvalds (open source)Servers, supercomputersOpen-source, Multi-user
macOS / iOS / iPadOSAppleMac, iPhone, iPadUnix-based
AndroidGoogleSmartphonesLinux-kernel based, Mobile
UNIXBell LabsServers, workstationsMulti-user
MS-DOSMicrosoftOld PCsCLI, Single-user
Chrome OSGoogleChromebooksLinux-based, Cloud
Exam Tip The most-used desktop OS is Windows; the most-used mobile OS in the world is Android; servers/supercomputers mostly run Linux/Unix. These three facts appear repeatedly.

2 Functions of an Operating System

FunctionWhat it doesExample
Process ManagementCreates, schedules & ends running programsChrome + Word open together
Memory ManagementAllocates & frees RAM for programsGives memory to each app
File ManagementStores, names, organises files/foldersCreate, copy, delete, rename
Device (I/O) ManagementControls input/output via driversKeyboard, printer, mouse
Security & ProtectionControls access & protects dataPasswords, permissions
User InterfaceLets user interactGUI icons / CLI commands
Error DetectionFinds & reports problems“Not responding” message
Resource AllocationShares CPU, memory & devices fairlyCPU time-sharing
Remember A quick way to recall functions: “PMFDS-URE” → Process, Memory, File, Device, Security, User-interface, Resource-allocation, Error-handling.

3 Components: Kernel & Shell

Kernel The core / heart of the OS. It directly controls hardware, CPU, memory and devices. It always stays in memory.
Shell The interface between the user and the kernel. It takes user commands and passes them to the kernel (e.g. command interpreter in Linux/DOS).

Types of Kernel (frequently asked)

Kernel TypeIdeaExample
MonolithicWhole OS runs in kernel space; fast but largeLinux, UNIX
MicrokernelOnly basics in kernel; services in user space; stable & secure but slowerQNX, Minix, L4
HybridMix of bothWindows NT, macOS (XNU)
Exam Tip Other key terms: Bootloader (loads OS into memory), Device Driver (software that controls a hardware device), System Call (the way a program requests a service from the OS, e.g. fork(), read(), write()).

4 Types of Operating Systems

TypeMeaningExample
Batch OSSimilar jobs grouped & run in batches; no user interactionOld payroll / bank processing
Time-Sharing OSMany users share CPU using small time slicesMainframes, Multics
Real-Time OS (RTOS)Gives output within a strict time limitFlight control, missiles, ATMs, medical devices
Distributed OSMany connected computers act as one systemLOCUS, cloud systems
Multi-user OSMany users use one system togetherUNIX, Linux
Multiprocessing OSUses two or more CPUs togetherServers, modern PCs
Mobile OSOS for smartphones/tabletsAndroid, iOS
Network OSManages computers on a networkWindows Server, Novell NetWare
Embedded OSRuns inside dedicated small devicesVxWorks, washing machines, smart TVs
Common Trap RTOS is the one with guaranteed/immediate response — used in flight control, ATMs and medical equipment. Don’t confuse it with Distributed OS (multiple computers as one).

5 Process Management & Threads

Process A program in execution (a running program). A thread is the smallest unit of execution — a lightweight part of a process.

Process States

NEW  →  READY  →  RUNNING  →  TERMINATED
                ↑          │
                └──────────┘   (back to READY when time slice ends)
RUNNING → WAITING/BLOCKED (for I/O) → READY
  • PCB (Process Control Block): stores all info about a process (ID, state, registers, priority).
  • Context switching: CPU saves one process’s state and loads another’s.
  • fork(): system call used to create a new (child) process.
  • Daemon: a background process (e.g. antivirus scan, print service).

Multi- terms (very frequently confused)

TermMeaningExample
MultitaskingOne CPU runs many tasks (by switching fast)Music + browsing
MultiprocessingMany CPUs work at the same timeQuad-core processor
MultithreadingMany threads run inside one programDownload + scroll in a browser
MultiprogrammingMany programs kept in memory to keep CPU busyImproves CPU utilisation

6 CPU Scheduling Algorithms

Scheduling decides which process gets the CPU next. Done by the scheduler; the dispatcher actually hands over the CPU.

AlgorithmRulePreemptive?Key Point
FCFSFirst Come First ServedNoSimple; suffers “convoy effect”
SJFShortest Job FirstNoLowest average waiting time; risk of starvation
SRTFShortest Remaining Time FirstYesPreemptive version of SJF
Round RobinEach process gets a fixed time quantumYesBest for time-sharing / interactive systems
PriorityHighest priority runs firstBothStarvation solved by “aging”
Exam Tip Preemptive: Round Robin, SRTF, Preemptive-Priority. Non-preemptive: FCFS, basic SJF. A Gantt chart is used to show scheduling order.

7 Synchronization & Deadlock

  • Critical Section: code that accesses a shared resource.
  • Race Condition: output depends on the timing/order of processes accessing shared data.
  • Mutual Exclusion: only one process uses a resource at a time.
  • Semaphore / Mutex: tools used to achieve synchronization.
  • Starvation: a process waits indefinitely for the CPU/resource.
Deadlock A situation where two or more processes wait for each other forever, so none can proceed.

4 Necessary Conditions for Deadlock (Coffman conditions)

ConditionMeaning
Mutual ExclusionResource can be used by only one process at a time
Hold and WaitProcess holds one resource & waits for another
No PreemptionResource cannot be forcibly taken away
Circular WaitProcesses form a circular chain of waiting
Remember All four conditions must hold for a deadlock. Banker’s Algorithm is used for deadlock avoidance.

8 Memory Management

Memory Hierarchy (fast → slow)

Registers  →  Cache  →  RAM  →  SSD  →  Hard Disk
(fastest, smallest, costliest) ........ (slowest, largest, cheapest)
  • RAM – volatile, temporary, primary memory. ROM – non-volatile, permanent (stores BIOS).
  • Cache – very fast memory between CPU and RAM for frequently-used data.
  • Virtual Memory – uses part of the hard disk as extra RAM (swap / page file).

Paging vs Segmentation

Paging

  • Memory split into fixed-size pages/frames
  • Causes internal fragmentation
  • Uses a page table

Segmentation

  • Memory split into variable-size logical segments (code, data, stack)
  • Causes external fragmentation
  • Matches programmer’s view

Key Memory Terms

TermMeaning
Page FaultRequired page is not in RAM → must be loaded from disk
ThrashingToo much paging/swapping → CPU utilisation drops sharply
TLBTranslation Lookaside Buffer — speeds up address translation
MMUMemory Management Unit — converts virtual→physical address
Demand PagingLoad a page only when it is actually needed
Belady’s AnomalyMore frames → more page faults (occurs in FIFO)

Page Replacement Algorithms

FIFO     → removes the oldest loaded page (can show Belady's anomaly)
LRU      → removes the Least Recently Used page
Optimal  → removes the page not needed for the longest future time
            (lowest faults — but only theoretical)

9 File & Device Management

File System Basics

TermMeaning
FileNamed collection of related data
Directory / FolderContainer that stores files
PathAddress of a file (absolute = from root; relative = from current folder)
File ExtensionType of file: .exe, .docx, .txt, .jpg
FAT / NTFSWindows file systems (NTFS = New Technology File System)
ext4Common Linux file system
Exam Tip File allocation methods: Contiguous, Linked, Indexed. Directory structures: Single-level, Two-level, Tree, Acyclic-graph.

Device (I/O) Management

TermMeaning
Device DriverSoftware that lets the OS control a hardware device
SpoolingSimultaneous Peripheral Operations On-Line — queues jobs (esp. printing)
BufferingTemporary storage to match speeds of CPU and device
DMADirect Memory Access — data transfer without using the CPU
InterruptSignal that tells the CPU to pause and attend a device
RAIDRedundant Array of Independent Disks — reliability/speed
Remember Disk scheduling algorithms: FCFS, SSTF (Shortest Seek Time First), SCAN (elevator), C-SCAN, LOOK.

10 Booting (BIOS / UEFI)

Power ON → BIOS/UEFI → POST (self-test) → Bootloader → OS loaded into RAM → Ready
TermMeaning
BIOSBasic Input Output System — firmware that starts the PC (stored in ROM)
UEFIModern replacement for BIOS (faster, supports large disks)
POSTPower-On Self-Test — checks hardware at startup
BootloaderLoads the OS into memory (e.g. GRUB in Linux)
Cold BootStarting the computer from power-off
Warm BootRestarting an already-on computer (Ctrl+Alt+Del)

11 OS Security & Protection

A high-value area as exams increasingly add computer-security questions.

  • Authentication — verifying identity (password, OTP, biometric, smart card).
  • Authorization — deciding what an authenticated user is allowed to do.
  • Access Control — file permissions Read / Write / Execute (rwx); uses ACL (Access Control List).
  • Encryption — scrambling data so only authorised users can read it.
  • Firewall — filters network traffic to block unauthorised access.
  • User mode vs Kernel mode — protects core OS from faulty/malicious programs.
  • Sandboxing — running apps in an isolated space.

Common OS-Level Threats (quick definitions)

ThreatMeaning
VirusMalicious code that attaches to files & spreads when run
WormSelf-replicating malware that spreads on its own (no host file)
TrojanHarmful program disguised as useful software
RansomwareLocks/encrypts files & demands payment
SpywareSecretly collects user information
Privilege EscalationGaining higher access rights than allowed
Common Trap A virus needs a host file and human action to spread; a worm spreads by itself over a network. This difference is frequently asked.

12 Important Full Forms

Abbr.Full FormAbbr.Full Form
OSOperating SystemBIOSBasic Input Output System
GUIGraphical User InterfaceUEFIUnified Extensible Firmware Interface
CLICommand Line InterfacePOSTPower-On Self-Test
RAMRandom Access MemoryROMRead Only Memory
FCFSFirst Come First ServedSJFShortest Job First
RRRound RobinRTOSReal-Time Operating System
PCBProcess Control BlockDMADirect Memory Access
TLBTranslation Lookaside BufferMMUMemory Management Unit
FATFile Allocation TableNTFSNew Technology File System
SSTFShortest Seek Time FirstRAIDRedundant Array of Independent Disks
SPOOLSimultaneous Peripheral Operations On-LineACLAccess Control List
IPCInter-Process CommunicationGRUBGRand Unified Bootloader

13 Inventors & History Facts

FactAnswer
UNIX developed atBell Labs — by Ken Thompson & Dennis Ritchie (≈1969)
Linux created byLinus Torvalds (1991)
Windows created byMicrosoft — first version (Windows 1.0) in 1985
C language created byDennis Ritchie
macOS / iOS made byApple
Android made byGoogle (now Open Handset Alliance)
Most OSes are written inC language

14 Comparison Charts

GUI

  • Uses icons, windows, mouse
  • Easy for beginners
  • Examples: Windows, Android

CLI

  • Uses typed commands
  • Fast & powerful for experts
  • Examples: MS-DOS, Linux terminal

RAM

  • Volatile (data lost on power-off)
  • Read + Write
  • Temporary working memory

ROM

  • Non-volatile (permanent)
  • Mostly read-only
  • Stores BIOS / firmware

Process

  • Running program
  • Has its own memory
  • Heavyweight

Thread

  • Part of a process
  • Shares process memory
  • Lightweight

🧠 Solved MCQs — Based on Exam Trends

Curated, high-frequency questions with answers + one-line explanations. Click “Show Answer” to self-test.

Set A · Basics & Types
1. An Operating System is a type of:
  • A) Application Software
  • B) System Software
  • C) Firmware
  • D) Utility Software
Show Answer
B) System Software. The OS manages hardware/software resources, unlike application software (e.g. MS Word) which performs user tasks.
2. Which of the following is NOT an operating system?
  • A) Linux
  • B) Windows
  • C) Android
  • D) Oracle
Show Answer
D) Oracle. Oracle is a database management system (DBMS), not an OS.
3. The core component of an OS is called:
  • A) Shell
  • B) Kernel
  • C) Application
  • D) Processor
Show Answer
B) Kernel. The kernel is the heart of the OS that controls hardware. The shell is the user interface to the kernel.
4. Android OS is based on:
  • A) UNIX
  • B) Windows
  • C) Linux kernel
  • D) Macintosh
Show Answer
C) Linux kernel. Android is built on a modified Linux kernel and is owned by Google.
5. Which OS is an example of open-source software?
  • A) Windows
  • B) macOS
  • C) Linux
  • D) iOS
Show Answer
C) Linux. Linux source code is freely available and modifiable.
6. The program that loads the OS into memory during startup is the:
  • A) Compiler
  • B) BIOS
  • C) Bootloader
  • D) Kernel
Show Answer
C) Bootloader. BIOS/UEFI starts the machine, then the bootloader loads the OS into RAM.
7. UNIX was originally developed by:
  • A) Microsoft
  • B) Bell Labs
  • C) IBM
  • D) Intel
Show Answer
B) Bell Labs — by Ken Thompson and Dennis Ritchie.
8. Restarting a computer without turning off the power is called:
  • A) Hard boot
  • B) Warm boot
  • C) Cold boot
  • D) Power boot
Show Answer
B) Warm boot. Cold boot = starting from power-off; warm boot = restart of a running system.
9. The OS used in ATM machines and flight control is usually:
  • A) Batch OS
  • B) Real-Time OS
  • C) Distributed OS
  • D) Multi-user OS
Show Answer
B) Real-Time OS. RTOS guarantees response within a strict time limit.
10. Which is NOT a function of an OS?
  • A) Memory management
  • B) Process management
  • C) File handling
  • D) Weather forecasting
Show Answer
D) Weather forecasting. It is an application task, not an OS function.
Set B · Process & Scheduling
11. A process in the “ready” state means it is:
  • A) Waiting for I/O
  • B) Currently executing
  • C) Waiting to be assigned the CPU
  • D) Completed
Show Answer
C) Waiting to be assigned the CPU. It is loaded and ready, just waiting for CPU time.
12. The scheduling method used in time-sharing systems is:
  • A) FCFS
  • B) Round Robin
  • C) SJF
  • D) LIFO
Show Answer
B) Round Robin. Each process gets a fixed time quantum — ideal for interactive systems.
13. Switching the CPU from one process to another is called:
  • A) Swapping
  • B) Paging
  • C) Context switching
  • D) Spooling
Show Answer
C) Context switching. The state of the current process is saved and the next process’s state is loaded.
14. The system call used to create a new process is:
  • A) init()
  • B) fork()
  • C) create()
  • D) load()
Show Answer
B) fork(). It creates a child process in UNIX/Linux.
15. Banker’s Algorithm is used for:
  • A) Booting
  • B) Deadlock avoidance
  • C) Page replacement
  • D) Process creation
Show Answer
B) Deadlock avoidance. It checks whether allocating resources keeps the system in a “safe state”.
16. Which is NOT one of the four conditions for deadlock?
  • A) Mutual exclusion
  • B) Hold and wait
  • C) Circular wait
  • D) Fast switching
Show Answer
D) Fast switching. The four Coffman conditions are mutual exclusion, hold & wait, no preemption, and circular wait.
17. When a process waits indefinitely for resources, it is called:
  • A) Deadlock
  • B) Starvation
  • C) Thrashing
  • D) Buffering
Show Answer
B) Starvation. It is solved using “aging” (gradually raising waiting processes’ priority).
18. Multiple CPUs working together is called:
  • A) Multithreading
  • B) Multiprocessing
  • C) Multitasking
  • D) Multiprogramming
Show Answer
B) Multiprocessing. Two or more processors execute simultaneously.
Set C · Memory Management
19. The fastest memory among these is:
  • A) Hard disk
  • B) RAM
  • C) Cache
  • D) Pen drive
Show Answer
C) Cache. Among the options, cache is fastest (CPU registers are faster still, but not listed).
20. Virtual memory means:
  • A) Backup memory
  • B) Using disk space as extra RAM
  • C) Flash memory
  • D) Cache memory
Show Answer
B) Using disk space as extra RAM. It lets large programs run with limited physical RAM.
21. Paging divides memory into:
  • A) Variable segments
  • B) Fixed-size pages/frames
  • C) Logical blocks
  • D) Sectors
Show Answer
B) Fixed-size pages/frames. Paging causes internal fragmentation; segmentation causes external fragmentation.
22. Thrashing occurs due to:
  • A) Too many files
  • B) Excessive paging/swapping
  • C) A booting error
  • D) Disk crash
Show Answer
B) Excessive paging/swapping. The CPU spends more time swapping pages than executing — utilisation drops.
23. A page fault occurs when:
  • A) The disk crashes
  • B) The required page is not in RAM
  • C) The CPU overheats
  • D) A program ends
Show Answer
B) The required page is not in RAM. It must then be fetched from disk.
24. Belady’s anomaly is associated with which page replacement algorithm?
  • A) LRU
  • B) FIFO
  • C) Optimal
  • D) LFU
Show Answer
B) FIFO. Here, increasing the number of frames can surprisingly increase page faults.
25. TLB stands for:
  • A) Table Lookup Buffer
  • B) Translation Lookaside Buffer
  • C) Time Local Buffer
  • D) Transfer Level Buffer
Show Answer
B) Translation Lookaside Buffer. It caches recent address translations to speed up paging.
Set D · File & Device Management
26. NTFS stands for:
  • A) Network Table File System
  • B) New Technology File System
  • C) New Terminal Format System
  • D) National Transfer File System
Show Answer
B) New Technology File System — the modern Windows file system supporting permissions & journaling.
27. Spooling is mainly used with:
  • A) Monitor
  • B) Printer
  • C) Scanner
  • D) Mouse
Show Answer
B) Printer. Spooling queues print jobs so the CPU need not wait for the slow printer.
28. A device driver is:
  • A) A hardware component
  • B) Software that controls hardware
  • C) A data file
  • D) A type of shell
Show Answer
B) Software that controls hardware and lets the OS communicate with a device.
29. The DOS command to list files in a directory is:
  • A) LIST
  • B) DIR
  • C) SHOW
  • D) FILES
Show Answer
B) DIR. (In Linux, the equivalent is ls.)
30. DMA stands for:
  • A) Direct Memory Address
  • B) Direct Memory Access
  • C) Dynamic Memory Allocation
  • D) Data Memory Activity
Show Answer
B) Direct Memory Access. It transfers data between device and memory without the CPU, freeing it for other work.
31. RAID stands for:
  • A) Random Access Input Drive
  • B) Redundant Array of Independent Disks
  • C) Remote Access Internet Disk
  • D) Real-time Array Integrated Device
Show Answer
B) Redundant Array of Independent Disks — used for data reliability and improved performance.
Set E · Security & Misc
32. A firewall protects mainly against:
  • A) Hardware failure
  • B) Unauthorised network access
  • C) Disk corruption
  • D) Power cuts
Show Answer
B) Unauthorised network access. It filters incoming/outgoing traffic by rules.
33. Self-replicating malware that spreads without a host file is a:
  • A) Virus
  • B) Worm
  • C) Trojan
  • D) Cookie
Show Answer
B) Worm. Unlike a virus, a worm spreads by itself across networks.
34. File permissions Read/Write/Execute are managed using:
  • A) Page table
  • B) Access Control List (ACL)
  • C) Gantt chart
  • D) Bootloader
Show Answer
B) Access Control List (ACL). It defines what each user can do with a file.
35. A virtual machine allows:
  • A) Running without an OS
  • B) Running multiple OSes on one hardware
  • C) Running only BIOS
  • D) Running RAM only
Show Answer
B) Running multiple OSes on one hardware. A hypervisor creates isolated virtual machines.

🎯 Expected / High-Probability MCQs

Newer and likely-to-appear questions on modern OS and security concepts.

1. UEFI is best described as:
  • A) A type of RAM
  • B) A modern replacement for BIOS firmware
  • C) A scheduling algorithm
  • D) A file system
Show Answer
B) A modern replacement for BIOS. UEFI boots faster and supports very large hard disks.
2. Which kernel type is used by the Linux operating system?
  • A) Microkernel
  • B) Monolithic kernel
  • C) Exokernel
  • D) No kernel
Show Answer
B) Monolithic kernel. The entire core OS runs in kernel space. (Windows/macOS use hybrid kernels.)
3. Malware that encrypts a user’s files and demands payment is called:
  • A) Adware
  • B) Spyware
  • C) Ransomware
  • D) Rootkit
Show Answer
C) Ransomware. A leading modern cyber threat that targets individuals and organisations.
4. Running an application in an isolated environment to limit damage is called:
  • A) Spooling
  • B) Sandboxing
  • C) Paging
  • D) Mounting
Show Answer
B) Sandboxing. It contains a program so it cannot affect the rest of the system.
5. Which provides the interface between an application program and the OS?
  • A) System call
  • B) Compiler
  • C) Firewall
  • D) Bootloader
Show Answer
A) System call. Programs request OS services (file, memory, process) through system calls.
6. In a multi-core processor, the OS feature that most directly uses extra cores is:
  • A) Spooling
  • B) Multiprocessing
  • C) Demand paging
  • D) Defragmentation
Show Answer
B) Multiprocessing. Multiple cores execute different tasks at the same time.
7. Two-factor authentication usually combines a password with:
  • A) A second password
  • B) An OTP / biometric
  • C) A faster CPU
  • D) A larger disk
Show Answer
B) An OTP / biometric. It mixes “something you know” with “something you have/are” for stronger security.
8. The elevator algorithm in disk scheduling is also known as:
  • A) FCFS
  • B) SSTF
  • C) SCAN
  • D) LRU
Show Answer
C) SCAN. The disk head moves in one direction servicing requests, then reverses — like a lift.

📄 One-Page Quick Revision

ConceptOne-line Recall
OSInterface between user & hardware (system software)
KernelHeart/core of OS that controls hardware
ShellUser’s command interface to the kernel
BootloaderLoads OS into memory at startup
Cold / Warm bootStart from power-off / restart while running
RTOSGuaranteed response time (ATM, flight control)
Process / ThreadRunning program / lightweight part of a process
Round RobinTime-quantum scheduling for time-sharing
DeadlockProcesses wait for each other forever (4 conditions)
Banker’s AlgorithmDeadlock avoidance
Virtual MemoryDisk used as extra RAM
Paging / SegmentationFixed pages (internal frag.) / variable segments (external frag.)
ThrashingExcessive swapping; CPU use drops
SpoolingJob queue, mainly for printers
DMAData transfer without CPU
FirewallBlocks unauthorised network access
Virus vs WormVirus needs host + action; worm spreads itself
5-Second Memory Hooks Kernel = Heart · Shell = Speaker · RTOS = Fast & on-time · Deadlock = Stuck forever · Virtual Memory = Disk pretending to be RAM.

✦ Operating System — Complete Study Notes · GyanDesk · Made for quick learning & smart revision ✦