3. What is Operating System?
• An operating system (OS) is system
software that manages computer
hardware, software resources, and
provides various services for computer
programs. It acts as an intermediary
between the hardware and software,
allowing users and applications to
interact with the computer's hardware
without needing to understand the
intricate details of the hardware.
4. • Definition and Purpose: An
operating system (OS) is a collection
of software that manages computer
hardware and software resources. It
serves as a platform for applications
to run and facilitates user
interactions with the hardware.
• Role in Managing Resources: The
OS manages resources like the CPU,
memory, disk space, and I/O devices.
It ensures efficient execution of
processes, allows multitasking, and
provides a stable environment where
applications can run.
5. .
Evolution of
Operating
Systems
• History:
• Batch Processing Systems (1950s): Early
computers operated on batch processing,
where jobs were executed in groups without
user interaction.
• Time-Sharing Systems (1960s): Introduction
of time-sharing allowed multiple users to
interact with the computer simultaneously,
improving resource utilization.
• Personal Computing (1980s): The emergence
of personal computers led to the
development of user-friendly OS like MS-DOS
and later Windows.
• Modern OS (1990s-Present): Today's
operating systems support advanced features
like multitasking, networking, security, and
user-friendly interfaces.
6. Modern operating systems (OS)
provides a stable environment for
applications to run and offer a variety of
services to users and developers. Here
are some key characteristics of modern
operating systems:
7. 1. Multitasking
Definition: The ability to run multiple
processes simultaneously.
Types: Preemptive (OS controls CPU
allocation) and cooperative (processes
voluntarily yield control).
2. Multi-user Support
Definition: Allows multiple users to access
the system concurrently.
Features: User account management,
permissions, and resource allocation to
maintain security and isolation.
3. Virtual Memory
Definition: Extends physical memory onto
disk storage, allowing more applications to
run than physical memory would allow.
Benefits: Improved system responsiveness
and efficient memory management.
8. 4. Device Management
Function: Manages hardware devices through
drivers and provides abstraction layers.
Types: Supports various devices, including
printers, disk drives, and network interfaces.
5. File System Management
Features: Organizes data into files and directories,
manages permissions and access rights.
Types: Supports various file systems (e.g., NTFS,
ext4, FAT32).
6. Security and Access Control
Aspects: Implements user authentication, data
encryption, and access control mechanisms to
protect resources.
Importance: Safeguards against unauthorized
access and data breaches.
7. Networking Capabilities
Definition: Allows communication between
computers and devices over networks.
Protocols: Supports various networking protocols
(e.g., TCP/IP) and services (e.g., web servers, file
sharing).
9. 8. User Interface
Types: Can be command-line (CLI) or graphical (GUI).
Importance: User experience and accessibility for different
types of users.
9. Resource Management
Function: Efficiently allocates CPU time, memory space, and
I/O devices among processes.
Techniques: Includes scheduling algorithms and load
balancing.
10. Inter-process Communication (IPC)
Definition: Mechanisms that allow processes to
communicate and synchronize their actions.
Methods: Pipes, message queues, shared memory, and
sockets.
11. Modularity and Extensibility
Features: Modern OS are often designed with a modular
architecture, allowing for easy updates and integration of
new features.
Advantages: Facilitates maintenance and development of
new functionalities.
12. Virtualization Support
Definition: Enables the creation of virtual machines,
allowing multiple OS instances to run on a single physical
machine.
Use Cases: Enhances resource utilization and isolation for
development and testing environments.
10. File
Systems
What is a File System?: A file system is a
method for storing and organizing files on a
storage device. It provides a way to manage
files, directories, and permissions.
Types of File Systems:
• NTFS (New Technology File
System): Developed by Microsoft,
NTFS supports large files, file
permissions, compression, and
encryption.
• FAT32 (File Allocation Table 32): A
simpler file system that supports
smaller volumes and files up to 4GB,
widely used for USB drives.
• ext4 (Fourth Extended File System):
Commonly used in Linux, ext4
supports large volumes and files,
journaling, and improved performance.
11. • File System Structure: File systems are organized
hierarchically with directories (folders) containing
files. The root directory is the top-level directory, and
all other directories branch from it.
• File System Operations:
– Create: Making new files or directories.
– Read: Accessing files to retrieve data.
– Write: Modifying existing files or adding new
data.
– Delete: Removing files or directories.
– Rename: Changing the name of files or
directories.
• Metadata in File Systems: Metadata includes details
about files such as size, type, permissions, owner, and
timestamps (creation, modification, last access).
• Journaling File Systems: These file systems log
changes before committing them, which helps
prevent corruption from system crashes. If a crash
occurs, the system can recover to a consistent state
using the journal.
• Distributed File Systems: These allow users to
access and share files across multiple machines over
a network. Examples include NFS (Network File
System) and AFS (Andrew File System), enabling
seamless file access in distributed computing
environments
12. Memory
Management
Techniques
Introduction to Memory Management: Memory
management is the process of coordinating and handling
computer memory resources. It ensures that programs have
enough memory to execute, and that memory is allocated and
freed efficiently.
• Memory Hierarchy: Memory is structured in a hierarchy
to balance speed and cost:
– Registers: Small, fast storage locations within the
CPU.
– Cache: High-speed memory that stores frequently
accessed data.
– RAM (Random Access Memory): Volatile memory
used by the CPU to store data temporarily while
programs run..
– Secondary Storage: Non-volatile storage (e.g.,
HDD, SSD) that retains data even when powered off.
• Paging: Paging divides memory into fixed-size blocks
called pages. When a program is executed, its pages are
loaded into any available physical memory frames. This
allows non-contiguous memory allocation and simplifies
memory management.
• Segmentation: Unlike paging, segmentation divides
memory into variable-sized segments based on logical
divisions of a program (e.g., code segment, stack
segment). Each segment can grow or shrink
independently.
13. • Virtual Memory: Virtual memory extends the apparent
memory capacity of a system by using disk space as
additional memory. The OS swaps pages between physical
memory and disk storage, allowing programs to run even if
they exceed physical memory limits.
• Memory Allocation Strategies:
– Contiguous Allocation: Assigns a single contiguous
block of memory to a process
– Paging: Allocates fixed-size pages from a pool of
available memory.
– Segmentation: Allocates variable-size segments based
on program requirements.
• Fragmentation:
– Internal Fragmentation: When allocated memory is
larger than needed, causing wasted space within
allocated blocks.
– External Fragmentation: Occurs when free memory
is divided into small, non-contiguous blocks, making it
difficult to allocate larger requests.
• Memory Management in Modern OS: Modern operating
systems implement advanced techniques like demand
paging, page replacement algorithms (e.g., LRU, FIFO), and
memory compaction to optimize memory usage and reduce
fragmentation.
14. Process
Scheduling
• Introduction to Process Scheduling:
Process scheduling is the method by
which the OS decides the order of
execution for processes. It is crucial for
multitasking environments to ensure
responsiveness and efficient CPU
utilization.
• Process States: Processes go through
various states during their lifecycle:
– New: The process is being created.
– Ready: The process is waiting for CPU time.
– Running: The process is currently being
executed by the CPU.
– Waiting: The process is waiting for an event
(e.g., I/O operation) to complete.
– Terminated: The process has completed
execution.
15. Scheduling Algorithms:
• FCFS (First-Come, First-
Served): The simplest scheduling
algorithm where processes are
executed in the order they arrive. It
can lead to the "convoy effect,"
where short processes wait for long
ones.
• SJF (Shortest Job First):
Prioritizes processes with the
shortest execution time, reducing
average waiting time but can lead
to starvation for longer processes.
16. • Round Robin: Each process is given a fixed time
slice (quantum); if it does not complete within that
time, it is moved to the back of the queue. This
approach provides fairness and responsiveness.
• Priority Scheduling: Processes are assigned priority
levels, and the scheduler selects processes based on
priority, potentially leading to starvation of lower-
priority processes.
• Multilevel Queue Scheduling: Processes are divided
into multiple queues based on different criteria (e.g.,
priority, type), each with its scheduling algorithm.
This allows for differentiated treatment of processes.
• Real-time Scheduling: Used in systems where timely
processing is critical (e.g., embedded systems). Real-
time scheduling ensures that high-priority tasks are
completed within specified time constraints.
• Context Switching: The process of saving the state of
a currently running process and loading the state of
the next scheduled process. Context switching
introduces overhead, but it is essential for
multitasking.
17. Resource
Management
• Resource management involves
coordinating the use of hardware and
software resources efficiently among
competing processes.
Types of Resources:
• CPU: The central processing unit, which
executes instructions and manages tasks.
• Memory: Temporary storage for running
processes, including RAM and cache.
18. • I/O Devices: Hardware used for input (e.g.,
keyboards, mice) and output (e.g., monitors,
printers).
• Network Resources: Bandwidth and network
connections that facilitate data transfer.
• Resource Allocation Strategies: Techniques
to allocate resources include:
• Fixed Allocation: Predefined allocation of
resources to specific processes.
• Dynamic Allocation: Resources are allocated
on-the-fly based on current demand and
availability.
• Deadlock: A deadlock occurs when two or
more processes are unable to proceed because
each is waiting for a resource held by another.
The classic deadlock conditions include:
• Mutual Exclusion: At least one resource must
be held in a nonshareable mode.
19. • Hold and Wait: Processes holding resources are
waiting for additional resources.
• No Preemption: Resources cannot be forcibly taken
from processes holding them.
• Circular Wait: A circular chain of processes exists
where each process is waiting for a resource held by
the next process in the chain.
Deadlock Prevention and Avoidance: Strategies to
handle deadlocks include:
• Resource Allocation Graph: A graphical
representation of processes and resources to detect
potential deadlocks.
• Banker’s Algorithm: A deadlock avoidance algorithm
that checks resource availability before allocation to
ensure that a safe state is maintained.
• Resource Monitoring: Tools and techniques (like
performance monitoring software) are used to track
resource usage, identify bottlenecks, and ensure
efficient operation.
20. Advanced
Topics
• Virtualization: Virtualization technology
allows multiple virtual machines (VMs)
to run on a single physical machine, each
with its own OS and resources. This
improves resource utilization and
isolation.
• Cloud Computing and OS: In cloud
computing, OS play a crucial role in
managing virtualized resources, ensuring
that applications can scale dynamically
based on demand.
21. Security in Modern Operating Systems:
Modern OS implement various security
measures, including:
• Access Controls: Permissions that
determine which users can access or
modify files.
• Encryption: Protecting data stored
on disk or transmitted over
networks.
• Regular Updates: Patching security
• vulnerabilities to protect against
exploits.
22. • Mobile Operating Systems: Mobile OS
are designed for smartphones and tablets,
focusing on touch interfaces, energy
efficiency, and app ecosystems. They often
include features like:
• App Sandboxing: Isolating apps to
prevent unauthorized access to system
resources.
• Battery Management: Optimizing
power consumption for extended
battery life.
23. • Real-time Operating Systems: RTOS are
designed for applications that require
immediate processing and response times,
such as in embedded systems for
automotive or industrial applications.
Open Source vs. Proprietary Operating
Systems:
• Open Source: Software whose source
code is available for anyone to view,
modify, and distribute, fostering
community collaboration (e.g., Linux).
• Proprietary: Software developed and sold
by companies, with restrictions on use and
modification (e.g., Windows, macOS).
25. Types of
Operating
Systems
• Desktop Operating
System
• Server Operating
System
• Mobile Operating
System
• Embedded Operating
System
• Network Operating
System
• Mainframe
Operating System
• Distributed
Operating System
• Multi-User Operating
System
• Real-Time Operating
System
• Single User
Operating System
26. Desktop
Operating
Systems:
Windows: Developed by Microsoft,
Windows is one of the most widely used
desktop operating systems. Versions include
Windows 10, Windows 11, and others.
macOS: Developed by Apple Inc., macOS is
the operating system used on Macintosh
computers.
Linux: Linux is an open-source operating
system with various distributions (distros)
like Ubuntu, Fedora, CentOS, and Debian.
It's popular for both desktop and server use.
27. Server
Operating
Systems
Windows Server: Microsoft offers a range of
server operating systems for enterprise use,
such as Windows Server 2019 and Windows
Server 2022.
Linux Server: Linux distributions like Ubuntu
Server, Red Hat Enterprise Linux (RHEL), and
CentOS are commonly used for server
environments.
Unix: Unix-based operating systems like AIX
(IBM), Solaris (Oracle), and HP-UX (Hewlett
Packard) are used in enterprise and high-
performance computing environments
30. Mobile
Operating
Systems:
Android: Developed by
Google, Android is the most
widely used mobile
operating system, primarily
running on smartphones and
tablets.
iOS: Developed by Apple, iOS
is the operating system
exclusively used on iPhones,
iPads, and iPod Touch
devices.
31. Embedded
Operating
Systems:
RTOS (Real-Time Operating
Systems): real-time and
embedded systems, including
automotive, industrial, and IoT
devices.
Embedded Linux: A
customized version of the
Linux kernel, often used in
embedded systems due to its
flexibility and open-source
nature.
32. Network
Operating
Systems:
Cisco IOS: Used in
Cisco networking
equipment like routers
and switches.
Juniper Junos: The
operating system for
Juniper Networks'
networking devices.
34. Distributed
Operating
Systems:
• Linux Cluster and Distributed
Computing: Various Linux
distributions support clustering
and distributed computing for
high-performance and fault-
tolerant systems.
#11:The Andrew File System (AFS) is a distributed file system that was originally developed at Carnegie Mellon University in the 1980s. It is designed to provide a scalable and efficient way to manage file storage across multiple servers and clients in a networked environment. Here’s a detailed overview of AFS, including its features, architecture, and use cases.
#13:Fragmentation refers to a condition in computer systems where storage space is used inefficiently, leading to a decrease in performance and utilization. It can occur in both memory management and file systems.
#16:Embedded systems are specialized computing systems that perform dedicated functions or tasks within larger mechanical or electrical systems. Unlike general-purpose computers, embedded systems are designed to operate with specific hardware and software to accomplish particular objectives efficiently.
engine control units (ECUs), anti-lock braking systems (ABS), pacemakers, blood glucose monitors, and imaging systems. Integrated into networking equipment, mobile phones, and satellite systems.
Context:
The context of a process refers to all the information that describes the process's current state. This includes:
Program Counter: Indicates the next instruction to execute.
Registers: Temporary storage locations used by the CPU during execution.
Memory Management Information: Indicates the process’s memory allocation (page table, segment registers, etc.).
Process Control Block (PCB): A data structure that holds all the information about a specific process, including its state, priority, and scheduling information.
#23:Real-time OS
Flight control systems
Medical devices
Industrial automation systems
Multimedia systems
Telecommunications
Online transaction processing systems
#24:Operating systems come in various types, each designed to serve specific computing environments and purposes. Here are some of the most common types of operating systems:
#26:Each type of operating system has its own set of features and capabilities tailored to the specific needs of the devices and environments they serve. The choice of an operating system depends on factors like hardware, software requirements, and the intended use of the computer or device.
#31:Example Real Time Operating System is (Biometric Systems, Timer(Smartwashing wachines)
Example ht Embedded linux is Smart devices (smartwatch,BP Monitoring System)
#32:uniper Junos is a network operating system developed by Juniper Networks, primarily used in their routing, switching, and security devices. Known for its reliability, scalability, and modular architecture, Junos is designed to support high-performance networking for enterprise, service provider, and data center environments. Here’s a detailed overview of Junos, including its features, architecture, and use cases.
#35:Ubuntu, CentOS, Fedora, Debian, and Arch Linux.
#37:Example hni is Calculator or early game console(before han Gameboy)
DOS(disk operating system) Kiosk system(ha Shoping malls or ha McDO/Jolibee)