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

OS Module1 Notes

this is the notes for operating systems from sjce college

Uploaded by

hackantho18
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 views41 pages

OS Module1 Notes

this is the notes for operating systems from sjce college

Uploaded by

hackantho18
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

24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

OPERATING SYSTEM
24CS410

Computer System Structure

MODULE 1 — COMPLETE STUDY NOTES


Dr. M S Sunitha Patel | Assistant Professor, Dept. of CSE

JSS Science & Technology University

SUBJECT Operating System

MODULE 1 — Introduction & OS Structures

CHAPTERS Chapter 1: Introduction | Chapter 2: OS Structures

NOTE Designed for XEROX — Black & White Print Ready

Page 1
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

TABLE OF CONTENTS
1. What is an Operating System?
2. Computer System Structure
Hardware & Software Layers
Computer Startup & Bootstrap
3. Computer-System Organization
Interrupts
I/O Structure
DMA
4. Storage Hierarchy
Storage Definitions
Types of Storage
5. Computer-System Architecture
Single-Processor
Multiprocessor
Clustered Systems
6. Operating System Operations
Dual-Mode Operation
Timer
7. Process Management
8. Memory Management
9. Storage Management
File System
Mass Storage
Caching
10. Protection and Security
11. Computing Environments
Traditional
Mobile
Distributed
Client-Server
Cloud
12. OS Services & System Calls
OS Services
System Call Types
System Programs
13. OS Design & Structures

Page 2
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Simple
Layered
Microkernels
Modules
Hybrid
14. Virtual Machines
15. OS Generation & System Boot
16. Predicted Exam Questions (5 Marks Each)

Page 3
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER 1 INTRODUCTION TO OPERATING


SYSTEMS
Everything you need to know — explained simply!

1. What is an Operating System?


Imagine you want to play music on your computer. You press a key, and music plays. But who told
the speaker to make sound? Who told the CPU to find the music file? That middleman is the
Operating System (OS).

An Operating System is a system software that acts as an interface (middleman) between the
user and the computer hardware. It manages ALL the resources of the computer — CPU, memory,
files, and devices.

Fig 1.1 — Four Components of a Computer System (User Application OS Hardware)

Real-Life Examples of Operating Systems:


OS Where You See It

Microsoft Windows Desktop PCs & Laptops

Linux Servers, developer machines

macOS Apple MacBooks & iMacs

Android Most smartphones

Page 4
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

iOS iPhone and iPad

OS Goals — What Does the OS Want to Achieve?


• Execute user programs and make solving user problems easier
• Make the computer convenient to use — no need to know hardware details
• Use computer hardware efficiently — don't waste resources

Why Do We Need an OS?


Without an OS, you would have to write machine-level code every time you wanted to do anything
— even open a file! Here's what would happen without an OS:

• Users cannot interact directly with hardware (hardware speaks binary, not English!)
• Running multiple programs at the same time would be impossible
• Memory and CPU would not be managed — programs would crash into each other
• No security — anyone could access anyone's files

Think of the OS like a hotel manager. You (the user) just walk in and ask for a room. The manager
(OS) handles keys, room assignments, cleaning (memory), and makes sure guests (programs) don't
disturb each other. You don't need to know how the plumbing works!

2. Functions of an Operating System


The OS has many jobs. Think of it as a multitasking worker who never takes a break!

• Process Management: Handles running programs. Decides which program gets the CPU and
for how long. Think: a teacher managing students taking turns to speak in class.

• Memory Management: Keeps track of which part of RAM is used and which is free. Ensures
programs don't accidentally read each other's data. Think: a library where each book has a fixed
shelf — no one grabs someone else's book.

• File System Management: Organizes all your files and folders on disk. Controls who can read,
write, or delete files. Think: a filing cabinet with folders.

• Device Management: Controls all hardware devices — keyboard, mouse, printer, USB, etc. Uses
special programs called device drivers for each device.

• Security & Access Control: Protects your data from unauthorized users. Uses passwords, user
IDs, and permissions. Think: a security guard at the door.

3. Types of Operating Systems


• Batch OS: Processes jobs one after another without user interaction. Old style. Like baking a
full tray of cookies together.
• Time-Sharing OS: Multiple users share the CPU simultaneously. Each gets a tiny slice of time.
• Distributed OS: Multiple computers connected together, sharing resources over a network.
• Real-Time OS: Used where responses must happen IMMEDIATELY — like airplane controls or
hospital machines.

Page 5
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

• Mobile OS: Designed for smartphones/tablets. Android and iOS are examples.

4. Components of an Operating System


• Kernel: The CORE part of the OS. It directly talks to hardware. Always running in memory. The
most important part. Like the engine of a car.
• Shell: The outer layer — the part the user interacts with. Can be a command-line (text) or GUI
(graphical). Like the steering wheel of a car.
• System Programs: Programs that come with the OS to help manage the system (e.g., file
manager, task manager).

Page 6
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER
1B
COMPUTER SYSTEM STRUCTURE &
ORGANIZATION

5. Computer System Structure


A computer system has four main parts that work together:

Fig 1.2 — Computer System Organization showing CPU, Memory, Device Controllers on a shared bus

• Hardware: Physical parts — CPU, RAM, Hard Disk, Keyboard, Screen


• Operating System: Controls and coordinates hardware use among all applications and users
• Application Programs: Programs users run — Word, Chrome, Games, Compilers
• Users: People, other computers, or machines that interact with the system

6. Computer Startup — How Does a Computer Wake


Up?
When you press the power button on a computer, something very specific happens step by step.
This process is called booting.
• Step 1 — Bootstrap Program Runs: A tiny program stored in ROM (permanent chip) runs first.
This is called the bootstrap program or bootstrap loader.
• ROM/EPROM/Firmware: This is where the bootstrap is stored. ROM = Read Only Memory —
it doesn't get erased when power is off.
• Step 2 — Initialize Everything: The bootstrap initializes CPU registers, device controllers, and
memory contents.
• Step 3 — Load the Kernel: Bootstrap finds and loads the OS Kernel into RAM and starts
executing it.
• Step 4 — System Daemons Start: After kernel loads, it starts system processes (daemons). On
UNIX, the first process is called 'init'.
• Step 5 — Wait for Events: The fully booted system now waits for you to do something!

Page 7
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Simple Analogy: Turning on a computer is like waking up. The alarm (power button) triggers your body to run its
startup routine: eyes open brain starts legs move go make coffee. The bootstrap is your brain's startup routine!

7. Interrupts — The Computer's 'Hey! Pay Attention!'


Signal
An interrupt is a signal sent to the CPU to stop what it's doing and handle something important
immediately. It's like someone tapping your shoulder urgently while you're reading.

Fig 1.3 — Interrupt Timeline showing CPU handling interrupts from I/O devices

Types of Interrupts:
• Hardware Interrupt: Triggered by hardware devices (e.g., keyboard press, mouse click, disk
done reading). The device sends a signal on the system bus.
• Software Interrupt (Trap/Exception): Triggered by software — either a system call (user
requesting OS service) or a program error (division by zero, illegal memory access).

How Interrupts Work:


• CPU receives interrupt signal immediately stops current task
• Saves the address of the interrupted instruction (so it can resume later)
• Jumps to a fixed memory location runs the Interrupt Service Routine (ISR)
• ISR handles the interrupt (e.g., reads data from keyboard buffer)
• CPU resumes the original interrupted task

• Interrupt Vector: A table that contains the addresses of all service routines. When an interrupt
occurs, the CPU looks up this table to find where to go.
• An OS is interrupt-driven — it spends most of its time waiting for interrupts!

8. I/O Structure — How Input/Output Works

Page 8
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Fig 1.4 — I/O Structure with Device Controllers and DMA

• Each I/O device has a device controller — a mini-computer that manages the device.
• Each device controller has its own local buffer (small temporary storage).
• The OS has a device driver for each device controller (software that 'speaks' to the controller).
• CPU moves data between main memory and the device controller's local buffer.
• When an I/O operation finishes, the device controller sends an interrupt to notify the CPU.

Direct Memory Access (DMA) — Fast Data Transfer:


For big data transfers (e.g., reading a large file), using interrupts for every byte is too slow. DMA
solves this:

• Device controller transfers entire blocks of data directly to/from main memory
• No CPU intervention needed for each byte — CPU does other work meanwhile
• Only ONE interrupt per block transferred (not one per byte!)
• Result: Huge speed improvement for bulk data operations

Page 9
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER
1C
STORAGE & COMPUTER
ARCHITECTURE

9. Storage Hierarchy — From Tiny & Fast to Big & Slow


Computers use different types of storage. Think of it as a pyramid: the top is FAST but SMALL and
EXPENSIVE; the bottom is SLOW but HUGE and CHEAP.

Fig 1.5 — Storage-Device Hierarchy (Registers Cache RAM HDD Optical)

• Registers: Fastest, smallest. Inside the CPU itself. Only a few bytes. Used for immediate
calculations. Extremely expensive per byte.
• Cache: Super-fast temporary storage. Stores frequently used data to avoid slow RAM access.
Several MB in modern CPUs. Think of it as your desk — quick access.
• Main Memory (RAM): All currently running programs are here. Faster than disk but volatile
(data lost when power off). Gigabytes in size. Think of it as a workbench.
• Electronic Disk (SSD): Non-volatile, fast secondary storage. No moving parts. Much faster
than HDD. Think of it as your bookshelf — organized, quick.
• Magnetic Disk (HDD): Most common secondary storage. Uses spinning magnetic platters.
Large capacity but slower than SSD. Like a filing cabinet.
• Optical Disk: CDs, DVDs, Blu-ray. Uses laser to read/write. Mostly for archiving/distribution.
• Magnetic Tape: Slowest. Used for backups. Sequential access only (must wind to find data).
Very cheap per GB. Like a cassette tape.

Storage Size Units (Important for Exams!):


Unit Abbreviation Value Real-World Scale

Kilobyte KB 1,024 bytes A short text document

Megabyte MB 1,024 KB One MP3 song

Gigabyte GB 1,024 MB A full HD movie

Terabyte TB 1,024 GB Many movies

Petabyte PB 1,024 TB Data center storage

Page 10
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

10. Computer-System Architecture


How many CPUs (processors) does a computer have? This determines its architecture.

A) Single-Processor Systems
Most basic setup. ONE main CPU that executes all user programs. May also have special-purpose
processors for specific devices (disk controller, keyboard controller) but those don't run user code. If
there's only ONE general-purpose CPU, it's single-processor.

B) Multiprocessor Systems (Parallel / Tightly Coupled)


Two or more processors in close communication, sharing the same bus, memory, and sometimes
peripherals.

Fig 1.6 — Multiprocessor System Architecture

Advantages of Multiprocessor Systems:


• Increased Throughput: More programs run simultaneously. 3 processes on 3 CPUs = all run at
the same time!
• Economy of Scale: Cheaper than buying three separate computers.
• Increased Reliability: If one CPU fails, others continue. System slows down but doesn't stop.

Types of Multiprocessing:
• Asymmetric Multiprocessing (Master/Slave): One master CPU assigns work to slave CPUs.
Master controls everything. Slaves do the assigned tasks.
• Symmetric Multiprocessing (SMP): ALL CPUs are equals — no master. Each CPU has its own
registers. Only memory is shared. N processes can run on N CPUs simultaneously. Used by
Windows, Linux, macOS.

Reliability Concepts:
• Graceful Degradation: When a CPU fails, other CPUs take its work. System slows down
gradually instead of crashing suddenly.
• Fault Tolerant: System detects, diagnoses, and corrects failures automatically. More advanced
than graceful degradation.

C) Clustered Systems

Page 11
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Two or more separate complete computers (nodes) connected via a network, sharing software
resources. Each computer is called a node. They work together as one system.
• Goal: High availability — if one node fails, others continue serving users
• Asymmetric Clustering: One node in hot-standby mode (just watching). If active server fails,
hot-standby immediately takes over.
• Symmetric Clustering: All nodes run applications AND monitor each other. More efficient —
uses all hardware.
• SAN (Storage Area Network): Allows cluster nodes to share storage across miles.

Page 12
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER
1D
OS OPERATIONS, PROCESS &
MEMORY MANAGEMENT

11. Operating System Operations


Modern operating systems are interrupt-driven — they sit quietly doing nothing until an interrupt
or event occurs. Events are signaled by interrupts (hardware) or traps (software).

A) Dual-Mode Operation — User Mode vs. Kernel Mode


This is one of the most important concepts! The OS needs to protect itself from buggy or malicious
user programs. The solution: two modes of operation.

Fig 1.7 — Transition between User Mode and Kernel Mode via System Calls and Interrupts

• User Mode (mode bit = 1): Normal programs run here. Limited access to hardware and OS
resources. Can't execute privileged instructions.
• Kernel Mode (mode bit = 0): OS itself runs here. Full access to everything — hardware,
memory, all instructions. Also called supervisor mode, system mode, or privileged mode.
• Mode Bit: A hardware bit that tells the CPU which mode it's in. 0 = Kernel, 1 = User.

How Mode Switching Works:


• Computer starts Boots in kernel mode (OS loads itself)
• OS starts user program switches to user mode
• User program wants OS help (e.g., open a file) makes a system call
• Hardware switches to kernel mode OS handles the request
• OS finishes returns to user mode
• If user program tries privileged instruction in user mode OS traps it as illegal!

Why is this important? Without dual-mode, a buggy program could accidentally overwrite OS memory or crash
the entire system. Dual-mode prevents this!

B) Timer — Preventing Infinite Loops


What if a user program runs forever and never gives back the CPU? The OS uses a timer to
prevent this.

• Fixed Timer: Interrupts every fixed period (e.g., every 1/60 second)

Page 13
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

• Variable Timer: Implemented with a clock + counter. OS sets the counter. Clock ticks
decrement it. When counter = 0, interrupt fires!
• Before switching to user mode, OS always sets the timer
• When timer fires, control returns to OS automatically
• OS then decides: give program more time, or switch to another program

12. Process Management


A process is simply a program in execution. When you double-click an app icon, the OS creates a
process for it.

Process vs Program:
• Program on disk: Passive — just sitting there (a recipe in a book)
• Process in memory: Active — currently executing (actually cooking the recipe)

Resources a Process Needs:


• CPU time (to execute its instructions)
• Memory (to store its code and data)
• Files (to read/write data)
• I/O devices (keyboard, screen, etc.)

Single-Threaded vs Multi-Threaded Processes:


• Single-threaded: One program counter pointing to the next instruction. Does one thing at a
time.
• Multi-threaded: Multiple program counters — multiple threads running simultaneously within
the SAME process (e.g., a browser downloading while you scroll).

OS Responsibilities for Process Management:


• Scheduling processes and threads on the CPU
• Creating and deleting user and system processes
• Suspending and resuming processes
• Providing mechanisms for process synchronization (making sure processes cooperate)
• Providing mechanisms for process communication (processes talking to each other)

13. Memory Management


Main memory (RAM) is like a big array of storage slots, each with its own address. The CPU reads
from and writes to these slots constantly during execution. To run a program, it MUST be loaded
into RAM first.

OS Responsibilities for Memory Management:


• Keep track of which parts of memory are used and who is using them
• Decide which processes and data to move into and out of memory
• Allocate and deallocate memory space as needed

Page 14
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Think of RAM as a hotel with rooms. Each process gets a room. When it leaves, the room is freed for the next
process. The OS is the front desk manager!

Page 15
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER
1E
STORAGE, PROTECTION, SECURITY
& ENVIRONMENTS

14. Storage Management


There are three main types of storage management:

i) File System Management


A file is a collection of related information. Files represent programs and data. The OS organizes
files into directories (folders).

OS handles:
• Creating and deleting files and directories
• Reading, writing, and repositioning files
• Mapping files onto physical disk storage
• Backing up files to stable storage

ii) Mass-Storage Management


Since RAM is small and volatile, secondary storage (disks) is used for permanent storage. Most
programs live on disk and are loaded to RAM when needed.

OS handles:
• Free-space management: Tracking which disk sectors are empty
• Storage allocation: Deciding where to store new files
• Disk scheduling: Ordering disk read/write requests for efficiency

iii) Cache Management

Fig 1.8 — Caching: Data copied to faster storage for quick access

Caching = copying frequently used data to faster storage so you don't have to go to the slow
original source every time.

• Check cache first. If data is there (cache hit), use it — fast!

Page 16
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

• If not there (cache miss), get it from slower storage AND store a copy in cache
• Cache is small needs smart management to decide what to keep
• Cache Coherency: In multiprocessor systems, if one CPU updates data in its cache, all other
CPU caches must be updated too (usually done by hardware)

15. I/O Systems


The OS hides the weird details of I/O devices from the user and applications. For example, UNIX
hides device peculiarities through its I/O subsystem.

The I/O Subsystem consists of:


• Memory-management component: Includes buffering, caching, and spooling
• General device-driver interface: Standard way for OS to talk to any device
• Device drivers: Specific software for each hardware device

Key Terms:
• Buffering: Temporarily storing data while it moves between devices
• Caching: Keeping a copy of data in fast storage
• Spooling: Overlapping output for one job with input for another (e.g., printer queues multiple
documents)

16. Protection and Security

If a computer has multiple users, we must control who can access what.

Protection vs Security:
• Protection: Internal mechanism — ensures processes/users only access authorized resources.
Memory addressing hardware ensures process stays in its own space.
• Security: External mechanism — defends against external attacks (viruses, worms,
denial-of-service attacks, hacking).

How the OS Identifies Users:


• OS maintains a list of user names and user IDs (UIDs)
• When user logs in, authentication determines their UID
• Every process runs with the UID of its creator OS checks permissions
• Group IDs: Users can belong to groups. File can allow access to specific groups.
• Privilege escalation: Temporarily granting extra permissions under controlled conditions

17. Computing Environments

Page 17
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Fig 1.9 — Client-Server Computing Architecture

A) Traditional Computing
• Early offices: PCs connected to network, servers provide file/print services
• Today: Web portals, thin clients, WAN connectivity, home networks with firewalls
• Batch systems (no interaction) Time-sharing systems Modern interactive systems

B) Mobile Computing
• Smartphones and tablets — portable, lightweight, battery-powered
• Connectivity via WiFi (802.11) and cellular data networks
• Dominant mobile OSes: Apple iOS and Google Android
• Apps include: music, video, photos, HD video recording, augmented reality

C) Distributed Systems
• Multiple computers connected via a network, sharing resources
• LAN: Local Area Network — same room, floor, or building
• WAN: Wide Area Network — between cities or countries
• MAN: Metropolitan Area Network — within a city
• Bluetooth / 802.11: Small area wireless networks

D) Client-Server Computing

Page 18
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Fig 1.10 — Client Server Model

• Server: Provides services (file server, compute server, database server)


• Client: Sends requests to server and receives results
• Compute Server: Client sends requests to perform actions (e.g., run calculations)
• File Server: Client can create, update, read, delete files on server

E) Peer-to-Peer (P2P) Computing


• No distinction between client and server — all nodes are equals (peers)
• Each node can be both a client (requesting service) and a server (providing service)
• No central bottleneck — services distributed across all nodes
• To find a service: register with centralized lookup, OR broadcast request to all peers

F) Cloud Computing

Page 19
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Fig 1.11 — Cloud Computing Types (Public, Private, Hybrid, SaaS, PaaS, IaaS)

• Public Cloud: Available to anyone via the Internet (pay per use). Example: Amazon AWS,
Google Cloud.
• Private Cloud: Run by a company for its own use only. More control, more expensive.
• Hybrid Cloud: Mix of public and private cloud components.
• SaaS (Software as a Service): Applications available via Internet (e.g., Google Docs, Office
365).
• PaaS (Platform as a Service): A software stack ready for your app (e.g., database server in
cloud).
• IaaS (Infrastructure as a Service): Raw servers or storage available over Internet (e.g., AWS
EC2).

G) Real-Time Embedded Systems


• Computers embedded inside physical devices — car engines, robots, microwave ovens, medical
devices
• Have very specific tasks. Limited user interface. Must respond in real time
• OS for these is minimal — no frills, focused on speed and reliability

H) Virtualization
• Technology that allows one physical machine to run multiple operating systems
simultaneously
• Host OS: The main OS installed on the physical machine
• Guest OS: OS instances running inside virtual machines
• VMM (Virtual Machine Monitor): Software that manages guest OSes (e.g., VMware,
VirtualBox)

Page 20
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

• Each guest thinks it has its own private computer — it's an illusion!

Page 21
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER 2
OPERATING SYSTEM STRUCTURES
Services, System Calls, and Design — Chapter 2

18. Operating System Services


The OS provides services to both users (to make their lives easier) and to the system itself (to
work efficiently).

Fig 2.1 — OS Services overview showing relationships between services

Services for Users:


• User Interface (UI): Every OS has a UI. Three types: CLI (command line text), Batch
(commands in a file), GUI (graphical with windows and mouse).
• Program Execution: OS must be able to load a program into memory and run it. Program can
end normally or abnormally (with error).
• I/O Operations: OS handles all transfers to/from I/O devices. Users don't talk to hardware
directly.
• File-System Manipulation: Create, delete, read, write, search files and directories. Control file
permissions.
• Communications: Processes exchange info via shared memory or message passing. Works both
on same machine and across networks.
• Error Detection: OS detects hardware errors (power failure, memory error), I/O errors
(network failure), and software errors (division by zero). Must handle appropriately for each.

Services for System Efficiency:


• Resource Allocation: When multiple users/jobs run simultaneously, OS allocates CPU cycles,
memory, file storage, I/O devices fairly and efficiently.
• Accounting: OS tracks system usage — for billing, performance monitoring, or statistical
records.
• Protection and Security: Multiple users must not interfere. OS controls access and defends
against external attacks via passwords and authentication.

Page 22
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

19. User-OS Interface (How Users Interact with OS)

Fig 2.2 — Bourne Shell Command Interpreter (CLI example)

A) Command-Line Interface (CLI) / Shell


• User types text commands directly
• OS finds and executes the command (either built-in or from a separate file)
• Different shells: Bourne shell, C shell, Bash, Korn shell (UNIX/Linux)
• Windows uses [Link] or PowerShell

B) Graphical User Interface (GUI)


• Point-and-click with mouse on icons representing files, programs, folders
• Windows: uses GUI by default, also has cmd shell
• Mac OS: Aqua GUI, Z shell for CLI
• Linux: KDE or GNOME desktop for GUI, bash/csh/ksh for CLI

20. System Calls — The Bridge Between Programs and


OS

Page 23
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Fig 2.3 — System call sequence for copying a file from input to output

A system call is how a user program requests a service from the OS. It's the ONLY official way to
get OS services. Think of it as calling customer service — you (user program) can't go to the
warehouse (hardware) yourself; you have to call customer service (OS) to do it for you.
• Usually written in C or C++
• Each system call has a number — stored in a system call table in the kernel
• When a library function like open() is called, the CPU switches to kernel mode and executes
the corresponding system call

Fig 2.4 — System Call Implementation flow between user mode and kernel mode

System Call Parameter Passing — 3 Methods:


• Registers: Pass parameters directly in CPU registers (simplest, limited by register count)

Page 24
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

• Memory Block: Parameters stored in memory, address of that block passed in register (used
by Linux and Solaris for large parameter sets)
• Stack: Parameters pushed onto the program stack by the program, OS pops them off when
needed

Fig 2.5 — Three methods for parameter passing to OS system calls

21. Types of System Calls (6 Categories)

Fig 2.6 — System Call Categories

(1) Process Control:

Page 25
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

• Functions: end, abort, load, execute, create/terminate process, get/set attributes, wait for
time/event, signal event, allocate/free memory
• Examples: fork(), exec(), exit(), wait()

(2) File Management:


• Functions: create file, delete file, open, close, read, write, reposition, get/set file attributes
• Examples: open(), read(), write(), close(), stat()

(3) Device Management:


• Functions: request/release device, read, write, reposition, get/set device attributes,
attach/detach
• Examples: ioctl(), read(), write()

(4) Information Maintenance:


• Functions: get/set time, date, system data, process/file/device attributes; transfers info
between user and OS
• Examples: getpid(), gettimeofday()

(5) Communications:
• Functions: create/delete connection, send/receive messages, transfer status, attach/detach
remote devices; message-passing and shared memory models
• Examples: socket(), send(), recv()

(6) Protection:
• Functions: Control access to resources; get/set permissions for files and system resources
• Examples: chmod(), umask()

Communication Models:
• Message Passing: Processes send/receive packaged messages through the OS. Simpler, easier
to implement. Good for small data and inter-computer communication. More system calls
needed (for each read/write).
• Shared Memory: Processes share a common memory region. Faster — less OS involvement.
Good for large amounts of data. Harder to implement, fewer system calls.

Page 26
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER
2B SYSTEM PROGRAMS & OS DESIGN

22. System Programs


System programs are NOT the OS kernel — they are utility programs that come WITH the OS and
help users do common tasks. Most users interact with the OS through system programs, not system
calls directly.

Categories of System Programs:


• File Manipulation: Create, delete, copy, rename, print, list, manipulate files and directories.
Examples: ls, cp, mkdir, rm (Linux); Windows Explorer
• Status Information: Ask system for date, time, memory available, disk space, number of users.
Others give detailed performance/logging/debugging info. Some use a registry.
• File Modification: Text editors to create/modify files. Search/transform commands.
• Programming Language Support: Compilers, assemblers, debuggers, interpreters.
• Program Loading & Execution: Loaders, linkers, overlay-loaders, debugging systems.
• Communications: Create virtual connections between processes, users, computers. Email, web
browsing, remote login, file transfer.
• Background Services (Daemons): Launch at boot time. Provide services like disk checking,
process scheduling, error logging, printing. Run in user context (not kernel context). Known as
services, subsystems, or daemons.
• Application Programs: User programs like word processors, spreadsheets, games. Not part of
OS. Started by user.
System Call vs System Program: A system call is a low-level request to the kernel. A system program is a
higher-level tool that uses system calls to do useful things. mkdir (system program) uses create() (system call)
behind the scenes.

23. OS Design Goals & Implementation


Design Goals:
• User Goals: Easy to use, easy to learn, reliable, safe, fast
• System Goals: Easy to design, implement, and maintain; flexible, reliable, efficient

Mechanisms vs Policies:
This is a KEY principle in OS design! Separate the HOW from the WHAT.

• Policy: WHAT should be done. (e.g., How long should a process run before it's switched out?)
• Mechanism: HOW it is done. (e.g., The timer counter that actually measures time)
• Keeping them separate is powerful: policies can CHANGE without rewriting the mechanism
code
• Example: Timer mechanism (counter + clock) stays same; policy (time limit) can change easily

Page 27
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Implementation:
• Old days: OS written entirely in assembly language
• Modern OS: Written in C or C++ (faster to write, easier to port, easier to understand)
• Critical sections (like interrupt handlers) still in assembly for performance
• First OS not in assembly: MCP (Master Control Program)
• Higher-level language tradeoffs: Slightly slower & more storage, BUT much faster to develop
and debug

Page 28
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER
2C OS STRUCTURE TYPES

24. Operating System Structures


How is the OS internally organized? There are several approaches. The structure determines how
well the OS can be modified and maintained.

a) Simple Structure (Monolithic)

Fig 2.7 — MS-DOS Simple Structure (No clear separation of layers)

• No well-defined structure. Grew organically from small systems. Example: MS-DOS


• Interfaces and levels of functionality NOT well separated
• Application programs can directly access I/O routines and hardware
• Very dangerous: a user program crash can crash the entire system
• UNIX also started simple — kernel + system programs, with the kernel providing everything
(file system, CPU scheduling, memory management) through system calls

b) Layered Approach

Page 29
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Fig 2.8 — Layered OS Structure (Layer 0 = hardware, top = user interface)

• OS divided into numbered layers. Layer 0 = hardware. Top = user interface.


• Each layer can only use lower layers' services
• Advantage: Easier to debug — fix one layer at a time from bottom up
• Advantage: Each layer hides its implementation from higher layers
• Disadvantage: Must carefully define layers — can't use a higher layer's function!
• Disadvantage: Less efficient — a system call must pass through ALL layers

c) Microkernel

Fig 2.9 — Microkernel Structure — minimal kernel, services in user space

Developed at Carnegie Mellon University in the mid-1980s. The idea: make the kernel as small as
possible. Remove everything non-essential!

• Only keep the ESSENTIAL in the kernel: basic process management, memory management,
message passing

Page 30
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

• All other services (file system, device drivers, networking) run as user-space applications
• Communication between components via message passing
• Advantage: Easy to extend — just add a new user-space service program
• Advantage: More reliable — a failing service doesn't crash the kernel
• Disadvantage: Performance overhead from message passing between user-space services
• Famous microkernel: Mach — now forms the base of Mac OS X

d) Modules

Fig 2.10 — Solaris Loadable Kernel Modules Architecture

Modern approach. Small core kernel + dynamically loadable modules. Think of it as a plugin
architecture.

• Each module has clearly defined tasks and interfaces


• Any module can talk to any other module directly (unlike layered approach)
• Kernel stays small (like microkernel) but without message-passing overhead
• Examples: Solaris, Linux, macOS

Solaris has 7 types of loadable modules:


• Scheduling classes | File systems | Loadable system calls
• Executable formats | STREAMS modules | Miscellaneous | Device/bus drivers

e) Hybrid Systems
Real-world OSes combine multiple approaches:
i) Mac OS X:

Page 31
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Fig 2.11 — Mac OS X Layered Hybrid Architecture

• Layered system with Aqua GUI at the top


• Kernel environment: Mach microkernel (memory management, IPC, message passing, thread
scheduling)
• BSD UNIX kernel (networking, file systems, POSIX APIs, BSD CLI)
• I/O kit for device drivers + dynamically loadable kernel extensions
ii) iOS:

Fig 2.12 — iOS Architecture

• Based on Mac OS X but designed for mobile (no direct Mac OS X apps)
• Cocoa Touch: API for Objective-C — supports touch screens
• Media Services: Graphics, audio, video
• Core Services: Cloud computing, databases
• Core OS: Based on Mac OS X kernel environment
iii) Android:

Page 32
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Fig 2.13 — Android Architecture (Google's Mobile OS Stack)

• Designed by Open Handset Alliance (led by Google) for smartphones/tablets


• Uses Linux kernel for process, memory, and device-driver support
• Applications written in Java using Android API (not standard Java API)
• Java bytecode compiled to Dalvik Virtual Machine format (optimized for mobile)
• lib c: Smaller, optimized C library for slower mobile CPUs
• Libraries: webkit (web), SQLite (database), multimedia

Page 33
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER
2D
VIRTUAL MACHINES & SYSTEM
BOOT

25. Virtual Machines (VMs)

Fig 2.14 — Virtual Machine concept (one physical machine hosts multiple guest OSes)

A Virtual Machine creates the illusion that one physical computer is actually MANY computers.
Each virtual machine thinks it has its own private hardware!

• Host OS: The main OS on the physical machine


• Guest OS: OS instances running inside virtual machines
• VMM (Virtual Machine Monitor / Hypervisor): Software that creates and manages VMs
(Examples: VMware, VirtualBox, Hyper-V)
• Resources (CPU, memory) of physical machine are shared among all VMs

Benefits of Virtual Machines:


• Run multiple OSes simultaneously on ONE machine
• Isolation: A virus in Guest OS 1 won't affect Guest OS 2 or Host
• Software development: Test your code on different OSes without buying multiple machines
• System consolidation: Run many servers on one physical machine (saves cost, energy)
• No need to stop the system for OS development — do it in a separate VM!

Sharing Resources Between VMs:


• Share a file system volume (shared disk partition)
• Use a virtual network between VMs for communication

Emulation vs Virtualization:
• Virtualization: Guest runs the SAME CPU architecture as host (just isolated). Fast.

Page 34
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

• Emulation: Guest runs on DIFFERENT CPU type (e.g., running ARM app on x86). Slower
because every instruction must be translated.

26. Operating System Generation (SYSGEN)


An OS must be configured for the specific hardware it will run on. This process is called System
Generation (SYSGEN).

• OS designed to run on a class of machines, not just one specific machine


• SYSGEN utility collects info about hardware configuration and tailors the OS

SYSGEN needs to know:


• What CPU is to be used?
• How much memory is available?
• What devices are available?
• What OS options and parameter values are desired?

Configuration Approaches:
• Edit OS source code recompile link new kernel (most flexible, slowest)
• Modify configuration tables run make to generate new kernel
• System entirely defined by table data (fastest — just edit tables, no recompile)

27. System Boot


After an OS is generated, it must be loaded and started on the hardware. This is called booting.

Complete Boot Sequence:


Step 1: Power on interrupt generated loads address into program counter CPU starts
executing at that address
Step 2: That address points to bootstrap program in ROM on the motherboard
Step 3: ROM bootstrap runs POST (Power-On Self Test) — checks all hardware
Step 4: User can press special key to enter BIOS configuration utility
Step 5: Bootstrap looks for OS on non-volatile storage (checks floppy, CD, hard drive, in
BIOS-specified order)
Step 6: First disk block has small code that knows how to access the hard drive and load a bigger
boot program
Step 7: Single-boot: Boot program loads kernel into memory, transfers control to kernel
Step 8: Multi-boot: Boot program lets user choose OS, then loads chosen OS's boot loader
Step 9: Kernel may let user enter single-user mode (maintenance mode) — limited, no network
logins
Step 10: Full boot: kernel initializes daemons start OS ready for use!
• Why keep old kernels? When a new kernel is generated and doesn't work, the system provides
a fallback to boot the older, working kernel.

Page 35
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

CHAPTER
Q PREDICTED EXAM QUESTIONS
10 Questions × 5 Marks Each — With Detailed Answers

These questions are predicted based on common exam patterns for this subject. Each answer is written to score
full 5 marks. Study these carefully!

Q1. What is an Operating System? Explain its functions in detail. (5 Marks)


Answer:
Definition: An Operating System (OS) is system software that acts as an intermediary between the
user and computer hardware, managing all resources of the computer system.

Function 1 — Process Management: OS manages all running programs (processes). It allocates


CPU time to processes, creates/deletes processes, provides synchronization and communication
mechanisms between processes.

Function 2 — Memory Management: OS keeps track of which parts of RAM are in use and by
whom. It allocates and deallocates memory space and decides what moves in/out of memory.

Function 3 — File System Management: OS creates/deletes files and directories, supports reading,
writing, mapping files to disk, and backs up data.

Function 4 — Device Management: OS controls hardware devices via device drivers. It manages
I/O operations through device controllers and uses DMA for bulk transfers.

Function 5 — Security & Access Control: OS protects data using user IDs, group IDs, and access
permissions. It defends against external attacks (viruses, hackers) and ensures processes don't
interfere with each other.

Q2. Explain Dual-Mode Operation in Operating Systems. Why is it necessary? (5 Marks)


Answer:
Need for Dual-Mode: Without protection, a buggy user program could overwrite OS memory or
crash the entire system. Dual-mode prevents this by separating OS code from user code.

User Mode (mode bit = 1): Normal programs execute here with limited privileges. Cannot execute
privileged instructions (direct hardware access). If attempted, hardware traps it as illegal.
Kernel Mode (mode bit = 0): OS itself executes here with full privileges. Can execute any
instruction, access all memory, and control hardware directly. Also called supervisor or privileged
mode.

Mode Bit: A single hardware bit controls the current mode. The CPU checks this bit before
executing privileged instructions.
Switching Mechanism: At boot kernel mode. OS starts user app user mode. System call /
interrupt occurs switches to kernel mode. OS completes service returns to user mode.

Importance: Dual-mode protects the OS from user programs, prevents one user's bug from crashing
another user's programs, and ensures OS maintains control of the system at all times.

Page 36
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Q3. Explain different types of Computer System Architectures — Single Processor,


Multiprocessor, and Clustered Systems. (5 Marks)
Answer:
Single-Processor Systems: One main general-purpose CPU executing user programs. May have
special-purpose processors (for disk, keyboard) but these don't run user code. Simple, cost-effective
for basic use.
Multiprocessor Systems (Parallel/Tightly Coupled): Two or more CPUs sharing bus, memory, and
peripherals. Advantages: (1) Increased throughput — N CPUs handle N processes simultaneously. (2)
Economy of scale — cheaper than N separate computers. (3) Increased reliability — if one CPU fails,
others continue (graceful degradation / fault tolerant).

Types of Multiprocessing: Asymmetric — master CPU assigns work to slave CPUs. Symmetric
(SMP) — all CPUs are peers, share only memory, all run OS code. SMP used in Windows, Linux,
macOS.

Clustered Systems: Two or more complete computers (nodes) connected via network sharing
software resources. Goal: high availability.

Asymmetric Clustering: One node in hot-standby mode. If active server fails, standby takes over
immediately.
Symmetric Clustering: All nodes run applications and monitor each other. More efficient. Uses SAN
(Storage Area Networks) for shared storage across distributed nodes.

Q4. What are system calls? Explain the different types of system calls with examples. (5
Marks)
Answer:
System Call Definition: A system call is the programmatic interface between user programs and
the OS kernel. It's the only official way for a user program to request OS services. Usually written in
C/C++.

Process Control: end(), abort(), fork(), exec(), wait() — create/terminate processes, wait for events,
set process attributes.

File Management: open(), read(), write(), close(), stat() — create, delete, open, read, write,
reposition files and get/set file attributes.
Device Management: ioctl(), read(), write() — request/release devices, read/write to devices,
get/set device attributes.

Information Maintenance: getpid(), gettimeofday() — get/set time, date, system info,


process/file/device attributes. Transfers info between user and OS.

Communications: socket(), send(), recv() — message passing model (create connection,


send/receive messages) or shared memory model (create/access shared memory regions). Protection:
chmod(), umask() — control access permissions to resources.

Page 37
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Q5. Explain the different types of Operating System Structures: Simple, Layered,
Microkernel, and Module-based. (5 Marks)
Answer:
Simple Structure: No well-defined structure. Grew organically (e.g., MS-DOS). Application
programs can directly access hardware. Vulnerable — one user program crash can crash entire
system. UNIX also started similarly.
Layered Approach: OS divided into numbered layers (Layer 0 = hardware, top = user interface).
Each layer uses only lower-layer services. Advantage: Easy debugging (fix one layer at a time).
Disadvantage: Strict layer ordering limits flexibility; performance overhead as system calls pass
through all layers.

Microkernel: Keep only essentials in kernel (process management, memory, message passing). All
other services run as user-space programs. Communication via message passing. Advantage: Easy to
extend, more reliable. Disadvantage: Performance overhead. Example: Mach (now in macOS).

Modules: Modern approach. Small core kernel + dynamically loadable modules (plug-in
architecture). Any module can communicate directly with any other — no layering restrictions, no
message-passing overhead. Examples: Solaris, Linux, macOS.

Hybrid Systems: Real OSes combine approaches. Mac OS X = layered + microkernel (Mach) +
BSD + modules. Android = Linux kernel + Java runtime (Dalvik VM) + Android API. iOS = Mac OS X
base + Cocoa Touch for mobile.

Q6. Explain Multiprogramming and Time-Sharing Operating Systems. How do they


improve CPU utilization? (5 Marks)
Answer:
CPU Utilization Problem: A single user cannot keep the CPU busy all the time. When waiting for
I/O, the CPU would sit idle without multiprogramming.

Multiprogramming: OS keeps multiple programs (job pool) in memory simultaneously. When one
program waits for I/O, OS switches CPU to execute another program. CPU is always busy — no idle
time. Result: much better CPU utilization.

Job Pool: The set of all jobs waiting to run is in secondary storage (job pool). OS picks a subset to
load into main memory. When current job waits for I/O, CPU switches to next job.
Time-Sharing (Multitasking): Extends multiprogramming for interactive use. CPU switches among
jobs so FREQUENTLY that users can interact with each program while it runs. User feels the system
is dedicated to them alone.
Interactive System: User communicates directly via keyboard/mouse and expects immediate
response (< 1 second response time). Each user gets a tiny time slice of CPU.

Key Difference: Multiprogramming optimizes CPU utilization for batch processing. Time-sharing
optimizes for user interaction and response time. Time-sharing is real-time enough for conversation
with the computer.

Page 38
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Q7. Explain the concept of Virtual Machines. What are their benefits? (5 Marks)
Answer:
Virtual Machine Concept: Abstracts the hardware of one physical computer into several execution
environments, giving each the illusion it has its own private computer. Physical resources (CPU,
memory, disk) are shared among all VMs.

Host OS: The main OS running on the physical hardware. Guest OS: OS instances running inside
virtual machines. VMM (Virtual Machine Monitor/Hypervisor): Software managing VMs (e.g.,
VMware, VirtualBox).

Benefit 1 — Multiple OSes: Run Windows and Linux simultaneously on one machine. Useful for
testing compatibility or using OS-specific software.

Benefit 2 — Protection/Isolation: VMs are completely isolated. A virus or crash in one guest OS
does NOT affect other guests or the host. System security is improved.

Benefit 3 — Development and Testing: Developers can test code on different OS environments
without multiple physical machines. No need to stop the system — do development in a separate VM.

Benefit 4 — System Consolidation: Run multiple server applications (each needing different OS)
on one physical machine. Saves hardware cost, power, and space. Software sharing between VMs via
shared file volumes or virtual networks.

Q8. What is an Interrupt? Explain Hardware and Software Interrupts with Interrupt
Handling. (5 Marks)
Answer:
Interrupt Definition: A signal to the CPU to immediately suspend its current program and handle
an urgent, higher-priority event. An OS is interrupt-driven — it waits for interrupts to respond to
events.

Hardware Interrupt: Generated by hardware devices (keyboard, mouse, disk, network). Device
sends signal to CPU via system bus at any time. Example: When you press a key, the keyboard
controller sends a hardware interrupt.
Software Interrupt (Trap/Exception): Generated by software. Two types: (1) System call — user
program intentionally requests OS service. (2) Exception — error in user program (division by zero,
illegal memory access, page fault).
Interrupt Vector: A table storing addresses of all Interrupt Service Routines (ISRs). When interrupt
occurs, CPU looks up the vector to find where to jump.

Interrupt Handling Steps: (1) Device sends interrupt signal. (2) CPU saves current state (registers,
program counter). (3) CPU identifies interrupt type (polling or vectored). (4) CPU jumps to ISR via
interrupt vector. (5) ISR handles the interrupt. (6) CPU restores saved state and resumes original
program.

Interrupt-Driven OS: Without interrupts, OS would have to constantly poll (check) each device —
wasteful. With interrupts, CPU does real work and only responds when a device actually needs
attention.

Page 39
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

Q9. Explain the concept of Caching and its importance in a computer system. (5 Marks)
Answer:
Caching Definition: Caching is copying frequently used data from a slower storage to a faster
storage (cache) so future accesses are faster. The cache acts as a high-speed buffer between the
CPU and slower memory/disk.

Cache Hit vs Cache Miss: When requested data is IN the cache cache hit use it directly (fast!).
When NOT in cache cache miss fetch from slower source, copy to cache, then use it.

Storage Hierarchy: Registers (fastest) Cache RAM SSD HDD Tape (slowest). Data moves
up the hierarchy as it becomes more frequently used.

Cache Management Challenge: Cache is small, so OS must decide what to keep (replacement
policy). If cache is full, something must be evicted to make room for new data.
Cache Coherency: In multiprocessor systems, each CPU has its own local cache. If CPU1 updates
data in its cache, CPU2's cache might have a stale (old) copy. All caches must be updated — this is
cache coherency. Usually handled by hardware.

Importance: Without caching, every CPU instruction fetch and data access would go to slow RAM
or disk. Caching makes modern systems hundreds of times faster. The OS manages cache at multiple
levels (RAM acts as cache for disk; CPU cache handles RAM).

Q10. Explain the different types of Computing Environments: Distributed, Client-Server,


Peer-to-Peer, and Cloud Computing. (5 Marks)
Answer:
Distributed Systems: Multiple independent computers connected via a network, sharing resources.
Benefits: increased computation speed, functionality, data availability, reliability. Networks vary by
distance: LAN (building), MAN (city), WAN (countries).

Client-Server Computing: Dedicated servers provide services to client machines. Compute servers
execute actions for clients (client sends request server executes returns result). File servers provide
file system interface (clients can create, read, write, delete files). Example: web server delivering
pages to browsers.

Peer-to-Peer (P2P): No distinction between client and server. All nodes are peers. Each can request
(act as client) or provide (act as server) services. No central bottleneck. Service discovery: either
register with centralized lookup, or broadcast requests to all peers. More resilient than client-server.

Cloud Computing: Computing, storage, and applications delivered as services over the network.
Types: Public cloud (anyone pays to use — AWS, Google Cloud), Private cloud (company's own cloud),
Hybrid cloud (mix of both), SaaS (software like Google Docs), PaaS (platform like database server),
IaaS (raw servers/storage like AWS EC2).

Mobile Computing: Smartphones and tablets using iOS or Android. Connect via IEEE 802.11 WiFi
or cellular data. Optimized for battery life, touch interface, and portability.

Virtualization: Running multiple OSes on one physical machine. Enables cloud services (many
virtual servers on one physical server). Host OS runs VMM which manages guest OSes. Each guest is
fully isolated.

Page 40
24CS410 — OPERATING SYSTEM | MODULE 1 NOTES JSS Science & Technology University

QUICK REFERENCE CARD


Term Meaning

OS System software — intermediary between user and hardware

Kernel Core of OS — always running, talks to hardware

Shell User-facing interface (CLI or GUI)

Bootstrap First program run at power-on (from ROM)

Interrupt Signal to CPU to immediately handle an event

Trap Software-generated interrupt (system call or error)

ISR Interrupt Service Routine — code that handles an interrupt

System Call Official way for user program to request OS service

DMA Direct Memory Access — bulk I/O without CPU per byte

Dual-Mode Kernel mode (full access) + User mode (limited access)

Mode Bit Hardware bit: 0 = kernel, 1 = user

Timer Prevents processes from hogging CPU forever

Process Program in execution (active)

SMP Symmetric Multiprocessing — all CPUs are equal peers

Cache Fast temporary storage for frequently used data

Cache Coherency All CPU caches must agree on current data values

Multiprogramming Multiple programs in memory; CPU switches on I/O wait

Time-Sharing CPU switches so fast users can interact with all programs

Microkernel Minimal kernel; services run in user space

VMM Virtual Machine Monitor — manages guest OSes

SYSGEN System Generation — configuring OS for specific hardware

SaaS/PaaS/IaaS Cloud service models (Software/Platform/Infrastructure)

All the best for your exams! You've got this.


24CS410 — Operating System | Module 1 | JSS Science & Technology University

Page 41

You might also like