Orientation to Computing-I
L T P :2 0 0
1
Unit-2 (Operating System)
• Operating Systems and its components
• Types of Operating System
• Functions of Operating System
• Directory Hierarchy
• Bootloader
• Kernal and types of kernels
2
What is an Operating System?
What is an Operating system?
– A system software that acts as an intermediate/ interface between a user
and the computer hardware.
– Resource allocator
– Control Program
– Manages computer hardware
Operating system goals:
– Ensure System Stability and Security
– Efficient Resource Management
– Enable Multitasking and Multiprogramming
– Provide Abstraction and Simplify Hardware
– User Convenience
– File Management
Architecture of Operating System
4
System Software VS Application Software
5
MCQs
Q1. Which of the following best defines an Operating System?
a) A hardware device
b) A program that manages computer hardware and software
resources
c) A programming language
d) An antivirus software
MCQs
Q1. Which of the following best defines an Operating System?
a) A hardware device
b) A program that manages computer hardware and
software resources
c) A programming language
d) An antivirus software
MCQs
Q2. In a layered operating system architecture, which layer
directly interacts with the hardware?
a) Application layer
b) Kernel
c) System utilities
d) User interface
MCQs
Q2. In a layered operating system architecture, which layer
directly interacts with the hardware?
a) Application layer
b) Kernel
c) System utilities
d) User interface
Types of Operating System
1. Batch Operating System
2. Time-Sharing Operating System
3. Distributed Operating System
4. Real-Time Operating System (RTOS)
5. Network Operating System
6. Mobile Operating System
10
Batch Operating System
• Processes jobs in groups or batches.
• No user interaction during job execution.
• Jobs queued and processed one by one.
• Example: IBM OS/360
• Efficient for repetitive and long tasks.
• Poor interactivity, but good automation support.
11
Time-Sharing Operating System
• Multiple users share system simultaneously.
• CPU time divided among active users.
• Quick switching gives illusion of concurrency.
• Interactive system with fast response time.
• Example: Unix, Multics
• Supports multitasking and real-time computing needs.
12
Distributed Operating System
• Controls multiple computers as one system.
• Resources shared across networked connected machines.
• Provides unified view to all users.
• Enables better performance and load balancing.
• Used in network environments. E.g. Locus, Amoeba.
• Improves reliability through resource distribution redundancy.
13
Real-Time Operating System (RTOS)
• Responds immediately to input or events.
• Used where timing is most critical.
• Examples include robots, aircraft, and medical systems.
• Hard real-time guarantees strict timing deadlines.
• Soft real-time allows slight timing flexibility.
• Very efficient, minimal response time required.
14
Network Operating System
• Manages networked computers and shared resources.
• Provides access to printers, files, applications.
• Supports networking protocols and user authentication.
• Central server controls client machine operations.
• Used in LANs and enterprise environments.
• Example: Windows Server, UNIX-based systems.
15
Mobile Operating System
• Optimized for touch and battery efficiency.
• Supports apps, sensors, and wireless features.
• Includes Android, iOS, HarmonyOS, etc.
• Lightweight and energy-aware for mobile usage.
• Combines performance with strong user experience
16
MCQs
Q3. Which type of operating system allows multiple users to
access a single system simultaneously?
a) Real-time OS
b) Distributed OS
c) Time-sharing OS
d) Batch OS
MCQs
Q3. Which type of operating system allows multiple users to
access a single system simultaneously?
a) Real-time OS
b) Distributed OS
c) Time-sharing OS
d) Batch OS
Function of Operating System
1. Process Management
2. File Management
3. Network Management
4. Main Memory Management
5. Secondary Storage Management
6. I/O Device Management
7. Security Management
8. Command Interpreter System
19
MCQs
Q4. A real-time operating system is most suitable for which
scenario?
a) Editing a Word document
b) Playing a movie
c) Air traffic control system
d) Browsing the internet
MCQs
Q4. A real-time operating system is most suitable for which
scenario?
a) Editing a Word document
b) Playing a movie
c) Air traffic control system
d) Browsing the internet
22
Process Management
• Creates, schedules, and terminates running processes.
• Manages multitasking and process synchronization.
• Allocates CPU time to active programs.
• Tracks process states and handles transitions.
• Supports inter-process communication and coordination.
• Ensures fair resource sharing among processes.
Process
o A process is a series of steps.
o It transforms inputs into desired outputs.
23
Functions of process management
1. Process creation and deletion.
2. Suspension and resumption.
3. Synchronization process
4. Communication process
Architecture of PCB
• Process Control Block (PCB) created for each process.
• Deletes when process terminates.
Process in main memory 24
Process Life Cycle
25
File Management
• File
– A file is a collection of data,
– Stored on a device for later use.
– It can hold text, images, or code,
– Used by users or software to operate.
• Function of File Management
1. File and directory creation and deletion.
2. For manipulating files and directories.
3. Mapping files onto secondary storage.
4. Backup files on stable storage media.
26
27
Network Management
Network
• A network is a group of connected devices.
• That share data and resources efficiently.
• It can be wired or wireless in form.
28
Functions of Network Management
1. Handles network operation,
2. Including faults, performance, and provisioning.
3. It ensures service quality and reliability,
4. With tools to monitor and optimize systems.
5. Distributed systems use separate local memories,
6. Connected via cables for secure communication.
29
Main Memory management
Main Memory
• Main memory stores data in bytes.
• Each byte has a unique address location.
• Programs use read/write memory instructions.
• Execution needs mapping to absolute addresses.
• Memory choice depends on hardware design.
• Main memory is fast, limited storage.
30
Functions of Memory Management
• Manages primary memory usage.
• Tracks which parts are in use.
• Decides memory allocation for processes.
• Allocates memory upon process requests.
• De-allocates memory when processes finish.
• Manages memory in multiprogramming systems.
31
Secondary-Storage Management
Secondary Storage
• Computers execute programs accessing main memory.
• Main memory is limited in size.
• Secondary storage backs up main memory.
• Hard drives and SSD store data.
• USB and CD/DVD are secondary devices.
• Programs load from disk to memory.
32
Functions of Secondary storage management
Here are some major functions of secondary storage management in the
operating system:
• Storage allocation
• Free space management
• Disk scheduling
33
HDD VS SSD
34
I/O Device Management
Functions of I/O management
• Provides buffer caching for efficient data.
• Supplies general device driver code support.
• Includes drivers for specific hardware devices.
• Helps understand device individual characteristics.
• Manages communication between system and hardware.
35
Security Management
Why Security is Needed:
• Processes must be secured from others.
• Prevent unauthorized resource access always.
• Protect files, memory, CPU, hardware.
• Ensure safe, controlled system operation.
What Security Is:
• Controls access to programs, users.
• Enforces rules through computer mechanisms.
• Memory hardware checks address space.
• CPU control managed and shared.
36
Function of Security Management
• Processes can’t perform own I/O operations.
• Protects integrity of peripheral devices.
• Security detects errors between subsystems.
• Early error detection prevents system damage.
• Prevents misuse by unauthorized users.
• Ensures reliable, safe resource usage
37
Security Management Process
38
Command Interpreter System
• Primary interface between the user and the rest of the system.
• Automatically executed when a
• new job is started in a batch system
• user logs in to a time-shared system.
• This program is also called:
– The control card interpreter,
– The command-line interpreter,
– The shell (in UNIX), and so on.
• Function : get the next command statement => execute it.
39
40
Windows Operating Systems
Versions
41
Directory Structure
• Symbol table of files that stores all related information about a file, but
not its contents
F F F
F
File 1 2 4 F
3
s n
• Both the directory structure and the files reside on disk
• Backups of these two structures are kept on tapes
Operations Performed on Directory
Directory: collection of files or directories
• A Symbol Table that translates file names into their directory entry.
Operations:
List Search
• Search for a file
• Create a file
• Delete a file Create Traverse
• List a directory
• Rename a file
• Traverse the file system Rename Delete
Directory Schemes
1. Single Level Directory
One directory many files
Single-Level Directory
Easy to support and understand.
Disadvantage:
Limitation:
1.When
Difficult to remember
number of filesthe name of or
increases files whenthe
when files increases
system has
2.more
Single directory
than for allthen
one user, usersNaming problem occurs. All files
3.should have created
File names unique bynames.
different users should be different.
MCQs
In Linux directory hierarchy, which directory typically contains
system configuration files?
a) /home
b) /etc
c) /bin
d) /var
MCQs
In Linux directory hierarchy, which directory typically contains
system configuration files?
a) /home
b) /etc
c) /bin
d) /var
Two Level
• 2. Two level directory, each user has his own user file
directory(UFD).
• UFDs have the similar structure, but each lists files of a single user.
Tree Structure
• Users can create their sub directories to manage the files.
• Three has Root directory and files have unique file names
Acyclic-Graph Directories
• Users have personal and shared directories
• Shared files visible to all users
• One user creates shared subdirectory access
• Shared items appear in multiple locations
• Multiple absolute paths for one file
• Different names point to same file
General Graph Directories
• Links added to existing directory structure
• Allows cycles within same directory path
• Deleting main file risks linked files
• All files linked, causing dependency risk
• First pass: mark all accessible files
• Second pass: collect unmarked free space
Bootloader
• A boot loader, also called a boot manager, is a small program that places
the operating system (OS) of a computer into memory.
• BIOS runs tests after power-up
• Control passes to Master Boot Record
• Boot loader starts from MBR location
• Windows or Mac boot loader default
• Linux needs special boot loader installed
51
Bootloader
• The two most common boot loaders are known as:
– LILO (LInux LOader) and
– LOADLIN (LOAD LINux).
• GRUB (GRand Unified Bootloader), is used with Red Hat Linux.
• LILO is the most popular boot loader.
• For multiple operating systems, LOADLIN is used.
• LOADLIN as a backup boot loader when LILO fails.
52
MCQs
What is the primary function of a bootloader?
a) To manage system calls between applications and hardware
b) To initialize the hardware and load the kernel into memory
c) To provide user interface for the operating system
d) To manage file system hierarchy
MCQs
What is the primary function of a bootloader?
a) To manage system calls between applications and hardware
b) To initialize the hardware and load the kernel into
memory
c) To provide user interface for the operating system
d) To manage file system hierarchy
Kernel
• Kernel is core of operating system
• Manages system resources and hardware communication
• Acts between hardware and application software
• Controls processes, memory, and device access
• Ensures security and efficient task execution
• Loads first when computer is started
55
Kernel
Functions of Kernel
56
Types of Kernel
Monolithic Kernel
• Definition: Entire operating system
works in kernel space.
• Features:
– All services (file system, memory,
drivers) run in one large block.
– Fast performance, but harder to
maintain/debug.
• Examples: Linux, Unix, MS-DOS
57
Types of Kernel
Microkernel
• Definition: Only essential services
run in kernel space.
• Features:
– Handles only core functions (CPU,
memory, IPC).
– Other services run in user space.
– More stable and secure but slower.
• Examples: QNX, Minix, early
Mac OS X
58
Types of Kernel
Hybrid Kernel
• Definition: Mix of monolithic and
microkernel designs.
• Features:
– Core services in kernel space; others
modular.
– Aims to balance performance and
modularity.
• Examples: Windows NT, modern
macOS
59
Types of Kernel
Nano Kernel
• Definition: Extremely small kernel with very minimal
services.
• Features:
– Often used in research or specialized real-time systems.
– Provides lowest-level abstraction only.
• Examples: Some versions used in embedded systems
60
Types of Kernel
Exo Kernel
• Definition: Gives applications direct access to hardware.
• Features:
– Very thin layer over hardware.
– Applications manage their own resources.
– High flexibility and performance.
• Examples: MIT Exokernel (experimental)
61
Types of Kernel
Modular Kernel
• Definition: Monolithic structure with dynamically loadable
modules.
• Features:
– Allows adding/removing features at runtime.
– Easier to update and manage.
• Examples: Modern Linux (with kernel modules)
62
MCQs
Which of the following types of kernels allows parts of the
operating system (like device drivers and file systems) to run in
user space while keeping the kernel core minimal?
a) Monolithic Kernel
b) Hybrid Kernel
c) Microkernel
d) Exokernel
MCQs
Which of the following types of kernels allows parts of the
operating system (like device drivers and file systems) to run in
user space while keeping the kernel core minimal?
a) Monolithic Kernel
b) Hybrid Kernel
c) Microkernel
d) Exokernel
MCQs
Which is a key difference between a Monolithic Kernel and a
Microkernel?
a) Monolithic kernel runs device drivers in user space, while
microkernel runs them in kernel space.
b) Monolithic kernel has poor performance compared to
microkernel.
c) Monolithic kernel executes most OS services in kernel
space, while microkernel executes most services in user
space.
d) Microkernel does not support inter-process communication
(IPC).
MCQs
Which is a key difference between a Monolithic Kernel and a
Microkernel?
a) Monolithic kernel runs device drivers in user space, while
microkernel runs them in kernel space.
b) Monolithic kernel has poor performance compared to
microkernel.
c) Monolithic kernel executes most OS services in kernel
space, while microkernel executes most services in user
space.
d) Microkernel does not support inter-process communication
(IPC).
MCQs
During the Linux boot process, the sequence is generally:
a) BIOS/UEFI → Bootloader → Kernel → Init/Systemd
b) Kernel → BIOS → Bootloader → Init/Systemd
c) Init/Systemd → Kernel → Bootloader → BIOS/UEFI
d) Bootloader → Kernel → BIOS → Init/Systemd
MCQs
During the Linux boot process, the sequence is generally:
a) BIOS/UEFI → Bootloader → Kernel → Init/Systemd
b) Kernel → BIOS → Bootloader → Init/Systemd
c) Init/Systemd → Kernel → Bootloader → BIOS/UEFI
d) Bootloader → Kernel → BIOS → Init/Systemd