0% found this document useful (0 votes)
32 views52 pages

Unit 1 Operatig System 2024

notes related to os

Uploaded by

Fake Identity
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views52 pages

Unit 1 Operatig System 2024

notes related to os

Uploaded by

Fake Identity
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 52

Department of Applied Computational Science & Engineering

Course Code: BCS401


Course Name: Operating System
Topics to be Covered

 Introduction to the operating system :

1. Introduction: Operating system and functions,

2. Classification of Operating systems- Batch, Interactive, Time sharing,

3. Real-Time Systems, Multiprocessor Systems, Multiuser Systems,

4. Multiprocessor Systems, Multithreaded Systems,

5. Operating System Structure- Layered structure, System Components,

6. Operating System services,

7. Reentrant Kernels, Monolithic, and Microkernel Systems.


Department of Applied Computational Science & Engineering

Introduction to Operating
Systems
Operating systems are the essential software that manage the hardware and
software resources of a computer. They act as the intermediary between users and
the computer's components, enabling seamless interaction and efficient
utilization of system resources.
Department of Applied Computational Science & Engineering

Definition and Purpose of Operating


Systems
An operating system (OS) is the software that manages a
computer's hardware and software resources, providing a platform
for applications to run. It serves as the intermediary between users,
programs, and the underlying computer components.
The primary purpose of an OS is to ensure efficient and reliable
operation of a computer system, allowing users to interact with the
hardware and execute various tasks and programs.
Department of Applied Computational Science & Engineering

Evolution of Operating Systems


1 Early Computing
In the 1940s and 1950s, early computers relied on batch processing and required
manual operator intervention to execute programs.

2 Mainframe Era
The 1960s saw the rise of mainframe computers, which introduced concepts like time-
sharing and multiprogramming to improve resource utilization.

3 Personal Computing
The 1970s and 1980s brought the personal computer revolution, with the
development of graphical user interfaces and affordable home systems.
Department of Applied Computational Science & Engineering

Example of Operating Systems


Windows macOS Linux Mobile OSes

The most widely Developed by Apple, Linux is a open- Mobile operating


used desktop macOS is known for source operating systems, such as iOS
operating system, its sleek design, tight system that offers a and Android, are
Windows offers a integration with high degree of designed for
familiar and user- Apple hardware, and customization and smartphones and
friendly graphical robust security flexibility. It is widely tablets. They offer a
interface. It powers a features. It is a used in servers, touch-based
vast ecosystem of popular choice supercomputers, and interface and a wide
software and among creative embedded systems, range of apps and
devices, making it a professionals and and is gaining services optimized
popular choice for those who prefer a popularity among for on-the-go use.
both personal and streamlined developers and IT
enterprise use. computing professionals.
experience.
Department of Applied Computational Science & Engineering

Key Functions of Operating Systems

1 Process Management 2 Memory Management


Coordinates the execution of multiple Efficiently allocates and manages the
programs and allocates system resources computer's limited memory resources to
like CPU, memory, and I/O devices. ensure optimal performance.

3 File Management 4 Input/Output Management


Organizes files and folders, provides access Handles the communication between the
control, and manages the storage and computer and external devices like
retrieval of data. keyboards, mice, printers, and displays.
Department of Applied Computational Science & Engineering

Process Management
Process management is a key function of operating systems. It involves
creating, scheduling, and managing the execution of individual
processes, which are instances of running programs.

The operating system allocates system resources to processes, such as


CPU time, memory, and I/O access, ensuring efficient and fair utilization
of the hardware.
Department of Applied Computational Science & Engineering

Memory Management
Memory management is a crucial function of operating systems,
responsible for efficiently allocating and controlling the computer's
memory resources. It ensures that programs and data are loaded and
executed correctly.
Key aspects of memory management include virtual memory, paging,
and segmentation, which allow the OS to provide each process with its
own protected address space.
Department of Applied Computational Science & Engineering

File Management
File management is a critical function of modern operating systems,
allowing users to organize, access, and manipulate digital files and
directories. This includes creating, deleting, modifying, and searching
for files and folders across the system's storage devices.

Effective file management enables efficient data organization, retrieval,


and backup, allowing users to seamlessly work with their digital
content. Operating systems provide intuitive file management
interfaces, empowering users to manage their files and directories with
ease.
Department of Applied Computational Science & Engineering

Input/Output Management
Operating systems play a crucial role in managing the flow of data
between computers and external devices. This includes managing input
from keyboards, mice, and other input peripherals, as well as directing
output to displays, printers, and storage devices.

Efficient I/O management ensures data is seamlessly transferred, with


the OS handling communication protocols, buffering, and error
handling to provide a smooth user experience.
Department of Applied Computational Science & Engineering

Security and Protection Mechanisms


1. Implement access control policies to restrict unauthorized access to system resources.
2. Utilize encryption techniques to protect sensitive data during storage and transmission.
3. Implement firewalls to monitor and control network traffic, blocking potential threats.
4. Employ antivirus and malware protection software to detect and remove malicious code.
5. Regularly backup critical data and maintain secure offsite storage for disaster recovery.
Department of Applied Computational Science & Engineering

Introduction to Operating
Systems
Operating systems are the fundamental software that manage a
computer's hardware and software resources, providing a platform for
applications to run. They play a crucial role in determining how a
computer functions and interacts with users and other devices.
Department of Applied Computational Science & Engineering

Batch Processing Systems


Batch processing systems are a type of operating system where tasks are executed in a
predetermined order, without user interaction. Programs are submitted in groups or "batches"
and processed automatically, with no immediate feedback to the user.

• Efficient for high-volume, repetitive tasks like payroll or billing


• Allows for optimized resource utilization and scheduling of jobs
• Ideal for large-scale, non-interactive tasks that can be executed overnight or during off-peak hours
Department of Applied Computational Science & Engineering

Characteristics of Batch
Processing Systems
Batch processing systems are designed to handle large volumes of data
and tasks in a sequential, non-interactive manner. They execute jobs in
a predefined order, with no user intervention required during runtime.

Batch systems are highly efficient for repetitive, high-volume tasks such
as payroll processing, inventory management, and report generation.
They minimize human interaction and provide consistent, reliable
results.
Department of Applied Computational Science & Engineering

Interactive Systems

Interactive systems are computer programs that allow direct user interaction and immediate
response. Users can input data, make selections, and receive output in real-time. These systems
provide a more engaging and efficient user experience compared to batch processing. Examples
include web browsers, graphic design software, and video games.
Department of Applied Computational Science & Engineering

Characteristics of Interactive
Systems
Interactive systems allow users to directly input commands and receive
immediate feedback. They enable real-time interaction, enabling users
to control and manipulate the system dynamically.

These systems are designed for individual users, providing a


personalized experience. They facilitate prompt responses and enable
users to make on-the-fly adjustments based on the system's output.
Department of Applied Computational Science & Engineering

Time-Sharing Systems
Time-sharing systems allow multiple users to access a single computer simultaneously. They
divide the computer's resources, such as CPU time and memory, among the users, providing
each with the illusion of having the system to themselves. This enables efficient utilization of
computing power and allows for interactive, multi-user applications.

• Enables concurrent access to a single computer by multiple users


• Divides system resources like CPU time and memory among users
• Provides the perception of exclusive access for each user
• Allows for interactive, multi-user applications and efficient resource utilization
Department of Applied Computational Science & Engineering

Characteristics of Time-Sharing
Systems
Time-sharing systems allow multiple users to access a single computer
simultaneously, dividing processing time and resources among them.
This enables efficient and interactive usage, with users able to run
programs and access data in real-time.

These systems often feature advanced scheduling algorithms, virtual


memory management, and robust security measures to ensure fair and
secure access for all users.
Department of Applied Computational Science & Engineering

Real-Time Systems
Real-time systems are designed to process data and respond within a specified time frame,
often in milliseconds. These systems prioritize immediate and predictable responses, making
them critical for applications like flight control, medical monitoring, and industrial automation.

Real-time systems must have the ability to:


1. Respond to events within a guaranteed time period
2. Maintain a high degree of reliability and availability
3. Prioritize critical tasks to ensure the most important operations are executed first
Department of Applied Computational Science & Engineering

Characteristics of Real-Time
Systems
Real-time systems are designed to handle time-critical tasks, ensuring
immediate response to events. They prioritize responsiveness over
efficiency, with strict deadlines for task completion.

These systems feature deterministic behavior, guaranteed execution


times, and the ability to handle interrupts and task preemption.
Reliability and fault tolerance are crucial, as real-time systems are often
used in safety-critical applications.
Department of Applied Computational Science & Engineering

Comparison and Conclusion


Interactive Time-Sharing Real-Time
Batch Processing
Systems Systems Systems
Batch systems are Interactive
Time-sharing Real-time systems
best suited for systems provide
systems enable are designed to
repetitive, high- immediate user
multiple users to respond to events
volume tasks that feedback and
access a single within strict time
can be processed allow for real-time
computer system constraints,
without user decision-making.
concurrently, ensuring critical
interaction. They They are well-
improving tasks are
offer efficient suited for tasks
efficiency and completed on
resource requiring user
resource time. They are
utilization but lack input and
utilization. essential for
flexibility and dynamic
However, they applications
responsiveness. responses, but
may suffer from where timing is
may have higher
longer response crucial, such as
resource
times compared medical devices
requirements.
to dedicated and industrial
Department of Applied Computational Science & Engineering

Introduction to
Multiprocessor, Multiuser,
Multiprocess, and
Multithreaded Systems
Explore the diverse world of modern computing systems, where
multiple processors, users, processes, and threads harmoniously
converge
Aa to unlock unprecedented levels of performance and
efficiency.
Department of Applied Computational Science & Engineering

Multiprocessor Systems: Architecture and


Advantages
Parallel Fault Tolerance Scalability Resource Sharing
Processing
If one processor Multiprocessor Processors in a
Multiprocessor fails, the system can architectures can be multiprocessor
systems leverage continue operating easily scaled by system share access
multiple CPUs by redistributing the adding more to common memory
working in parallel workload across the processors, allowing and I/O resources,
to tackle complex remaining the system to adapt enabling efficient
computational functional to growing data exchange and
tasks, dramatically processors, ensuring computational coordination.
increasing high availability. demands.
processing power
and efficiency.
Department of Applied Computational Science & Engineering

Multiuser Systems: Resource Sharing and


Access Control
In multiuser systems, multiple users share common system resources,
such as processor time, memory, and storage. Effective resource
allocation and access control mechanisms are crucial to ensure fair and
secure usage.

Access control policies define which users can perform


specific actions on resources, preventing unauthorized access
and protecting sensitive information. User authentication,
permission levels, and audit trails are essential components
of a robust access control system.
Department of Applied Computational Science & Engineering

Multiprocess Systems: Process


Management and Scheduling
Multiprocess systems involve the concurrent execution of multiple independent processes, each
with its own address space and resources. Efficient process management and scheduling are
crucial for optimizing system performance and ensuring fair resource allocation.

1. Process Creation and Termination: Processes are dynamically created and terminated to
handle user requests and system tasks.
2. Process Scheduling: Advanced scheduling algorithms, such as round-robin, priority-
based, and multilevel feedback, are used to determine the order of process execution.

3. Inter-Process Communication (IPC): Processes communicate and coordinate using


mechanisms like pipes, shared memory, and message queues.
Department of Applied Computational Science & Engineering

Multithreaded Systems: Concurrency and


Synchronization
1 Concurrency
Multithreaded systems allow multiple tasks to execute
concurrently, improving efficiency and responsiveness.
However, this introduces challenges around shared resources
and race conditions.

2 Synchronization
Synchronization mechanisms like locks, semaphores, and
monitors are used to coordinate access to shared resources and
ensure data integrity in multithreaded environments.

3 Deadlocks and Livelocks


Careful thread management is crucial to avoid deadlocks,
where threads are indefinitely blocked, and livelocks, where
threads continually interfere with each other without making
progress.
Department of Applied Computational Science & Engineering

Memory Management in Multiprocessor


and Multiuser Systems
In multiprocessor and multiuser systems, efficient
memory management is critical to ensure optimal
resource utilization and prevent conflicts. This
involves dynamic allocation, virtual memory
techniques, and advanced caching strategies to
balance the needs of multiple concurrent
processes and users.

Careful memory partitioning, page replacement


algorithms, and seamless memory paging are
essential for maintaining high performance and
preventing thrashing or deadlocks in these
complex environments.
Department of Applied Computational Science & Engineering

Input/Output and Device Management in


Multiprocessor and Multiuser Systems

Storage Printer and Network I/O Bandwidth


Management Peripheral Integration Optimization
Control
Efficient management Seamless integration Techniques to
Coordinating access
of storage devices like of network interfaces maximize I/O
and priority for shared
hard drives, SSDs, and and protocols to throughput and
printer and peripheral
network storage to enable data transfer minimize latency to
devices to ensure fair
meet the demands of and communication support the high-
and reliable usage
multiple users and between performance demands
across the system.
processes. multiprocessor and of multiprocessor and
multiuser systems. multiuser
environments.
Department of Applied Computational Science & Engineering
Security Considerations in Multiprocessor
and Multiuser Systems

Access Control Isolation and Sandboxing


Implement robust user authentication Utilize virtualization and containerization
and authorization mechanisms to restrict technologies to isolate processes and
access to sensitive resources and prevent users, limiting the impact of security
unauthorized actions. breaches.

Secure Communications Monitoring and Auditing


Ensure secure communication channels Implement comprehensive logging and
between system components and users auditing systems to detect and respond
to prevent eavesdropping and data to security incidents in a timely manner.
tampering.
Department of Applied Computational Science & Engineering
Performance Optimization and
Benchmarking

1 Workload Analysis 2 Resource Tuning


Analyze the system's workload to Optimize the allocation and utilization
identify bottlenecks and opportunities of system resources like CPU, memory,
for optimization. Understand the storage, and network. Fine-tune
resource demands and patterns of configurations to match the workload
your applications and users. and maximize efficiency.

3 Benchmark Testing 4 Iterative Improvements


Conduct comprehensive benchmark Apply learnings from benchmarking to
tests to measure and analyze the refine the system's configuration and
system's performance under various architecture. Continuously monitor
loads and conditions. Use industry- performance and make incremental
standard tools and methodologies. improvements over time.
Department of Applied Computational Science & Engineering

Emerging Trends and Future


Developments
As technology continues to evolve, the landscape of multiprocessor,
multiuser, multiprocess, and multithreaded systems is poised to
undergo transformative changes. Advancements in quantum
computing, artificial intelligence, and edge computing are expected
to revolutionize the way these systems are designed and deployed.

The rise of 5G and 6G networks will enable faster, more reliable data
transmission, paving the way for real-time, mission-critical
applications that require low latency and high bandwidth.
Neuromorphic computing and programmable hardware will also
play a crucial role in enhancing the efficiency and flexibility of these
systems.
Department of Applied Computational Science & Engineering

Operating System
Structure
The operating system is the foundation of a computer system,
providing a structure that manages hardware resources and facilitates
interaction between software and hardware. This layered architecture
ensures stability, security, and efficient use of system components.
Department of Applied Computational Science & Engineering
Layered Structure
Abstraction Kernel and User Hardware Interoperability
Layers Mode Abstraction
The layered structure
The operating system The kernel layer, the Lower layers of the facilitates
employs a layered core of the OS, OS abstract away the interoperability, as
architecture, where operates in a complexities of the each layer can be
each layer provides a privileged 'kernel underlying hardware, independently
specific set of mode', handling presenting a updated or replaced
services and critical system tasks. consistent and without affecting the
abstractions to the The user applications standardized interface overall system
layers above it. This run in a less to the upper layers. functionality,
modular design privileged 'user This allows enabling the OS to
promotes isolation, mode', accessing applications to run evolve and adapt to
flexibility, and system resources seamlessly across changing
efficient resource through well-defined diverse hardware requirements.
management. interfaces. platforms.
Department of Applied Computational Science & Engineering

System Components
Hardware Software
The physical components of a computer system, The programs and data that control the hardware,
such as the processor, memory, storage devices, including the operating system, applications, and
and input/output devices. system utilities.

Firmware Drivers
Low-level software that is embedded in the Software that enables the operating system to
hardware, providing basic control and communicate with and control the various
functionality for the system. hardware components.
Department of Applied Computational Science & Engineering

Operating System Services


Operating systems provide a variety of essential services to users and
applications. These include process management, memory management, file
management, I/O management, and security and protection services.

1. Process Management: Handles the creation, execution, and


termination of processes, ensuring efficient resource allocation and
scheduling.
2. Memory Management: Manages the allocation and deallocation of
memory, providing isolation and protection for running processes.

3. File Management: Provides a hierarchical file system for storing and


retrieving data, with access control and metadata management.
Department of Applied Computational Science & Engineering

Process Management
1 Process Creation
The operating system creates and manages processes, allocating resources like
CPU time, memory, and I/O to enable multiple programs to run concurrently.

2 Process Scheduling
The OS uses various scheduling algorithms to determine which processes get
CPU time, ensuring fair and efficient use of system resources.

3 Inter-Process Communication
Processes can communicate with each other through mechanisms like shared
memory, message queues, and sockets, allowing them to coordinate and
collaborate.
Department of Applied Computational Science & Engineering

Memory Management
Memory management is a critical component of operating systems, responsible
for efficiently allocating and controlling the use of computer memory. It
ensures programs have the required memory resources while preventing
conflicts and optimizing performance.

Key functions include virtual memory, paging, segmentation, and memory


protection, allowing the OS to provide each process with its own secure,
isolated memory space.
Department of Applied Computational Science & Engineering

File Management
The file management system is a crucial component of an operating system. It
provides services for creating, storing, retrieving, and organizing files in a
hierarchical directory structure. This allows users and applications to
efficiently manage their data, ensuring reliable and secure access to
information.

Key file management functions include file creation, deletion, renaming, and
permissions control. The file system also handles tasks like storage allocation,
access control, and file backup and recovery, ensuring the integrity and
availability of user data.
Department of Applied Computational Science & Engineering

I/O Management
The operating system manages a wide range of input and output (I/O) devices,
including keyboards, mice, displays, printers, storage devices, and network
interfaces. It provides a consistent interface for applications to access these
devices.

I/O management involves controlling data flow, scheduling requests, handling


interrupts, and providing device drivers to abstract the underlying hardware. This
ensures efficient and reliable I/O operations for the entire system.
Department of Applied Computational Science & Engineering

Security and Protection


Robust security measures are critical to safeguarding the integrity and
confidentiality of the operating system. This includes access control,
encryption, and monitoring mechanisms to prevent unauthorized access, data
breaches, and system disruptions.

Comprehensive protection also encompasses defensive strategies against


malware, intrusion attempts, and other cyber threats, ensuring the overall
resilience and trustworthiness of the operating environment.
Department of Applied Computational Science & Engineering

Conclusion
In conclusion, the operating system is the foundation of a computer system,
providing essential services and managing critical resources to enable
applications and users to function efficiently. By understanding the layered
structure, core components, and key services of an operating system, we can
appreciate the complexity and importance of this vital software layer.
Department of Applied Computational Science & Engineering

Introduction to Kernel
Architectures
Explore the different architectural approaches used in operating system kernels.
From monolithic designs to modular microkernel systems, understanding the
trade-offs is crucial for building robust and efficient systems.

a
Department of Applied Computational Science & Engineering

What is a Reentrant Kernel?


Concurrency Handling Interruptibility Thread-Safe
A reentrant kernel is able to The reentrant design Reentrant kernels are
handle multiple threads or enables the kernel to be designed to be thread-safe,
processes concurrently, interrupted and resumed meaning they can safely
allowing the operating without corrupting its execute multiple threads of
system to efficiently utilize internal data structures or control within the same
system resources. states. address space.
Department of Applied Computational Science & Engineering

Benefits of Reentrant Kernels

1 Improved Efficiency 2 Enhanced Reliability


Reentrant kernels can efficiently handle Reentrant kernels are designed to be
multiple concurrent processes by allowing interruptible and able to resume execution
the kernel code to be shared, reducing after an interrupt without corrupting data
memory usage and improving overall or system state, improving the overall
system performance. reliability of the operating system.

3 Scalability and Flexibility 4 Optimized Memory Usage


Reentrant kernels can scale to support By allowing multiple processes to share the
more processors and handle increased same kernel code, reentrant kernels can
workloads without significant performance reduce the overall memory footprint of the
degradation, making them suitable for a operating system, leading to more efficient
wide range of computing environments. use of system resources.
Department of Applied Computational Science & Engineering

Challenges of Reentrant Kernel


Design
Designing a reentrant kernel poses several key challenges. Ensuring thread-safe
access to shared resources, such as data structures and device drivers, is crucial
but complex. Managing concurrency and avoiding race conditions requires
advanced synchronization mechanisms.

Additionally, the kernel must maintain a consistent state even when multiple
threads are executing simultaneously. This can lead to increased code
complexity and potential vulnerabilities if not implemented carefully.
Department of Applied Computational Science & Engineering

Monolithic Kernel
Architecture
A monolithic kernel is a traditional operating system architecture where all core
system components are tightly integrated within a single, large program. This
includes the file system, device drivers, memory management, and other critical
functionality.
Department of Applied Computational Science & Engineering

Advantages of Monolithic
Kernels
1. High Performance: Monolithic kernels have a tightly integrated
architecture, allowing for efficient data exchange and fast response
times.
2. Easier Debugging: Since all kernel components are in a single address
space, debugging and troubleshooting issues is generally simpler.

3. Mature and Stable: Monolithic kernels like Linux and Windows have
been actively developed and refined for decades, making them robust
and reliable.
Department of Applied Computational Science & Engineering

Disadvantages of Monolithic
Kernels
1. Lack of Modularity: Monolithic kernels are tightly-coupled, making it
difficult to isolate and modify individual components without affecting the
entire system.

2. Limited Scalability: As the system grows in complexity, the monolithic


design can become unwieldy, leading to performance bottlenecks and
increased maintenance overhead.

3. Security Risks: A vulnerability in one part of the monolithic kernel can


potentially compromise the entire system, exposing the entire system to
security threats.
Department of Applied Computational Science & Engineering

Microkernel Architecture
The microkernel architecture is a design approach where the kernel is
minimized to only the essential functions, with most operating system services
running in user-mode processes. This modular design offers increased security
and reliability.
Department of Applied Computational Science & Engineering

Advantages of Microkernels
1. Improved reliability and stability since core OS components are
isolated and more easily debugged
2. Increased modularity and flexibility allowing for easy customization
and updates to specific OS components
3. Better security by containing damage from vulnerabilities to specific
modules rather than the entire OS
Department of Applied Computational Science & Engineering

Comparison and Tradeoffs


Performance Complexity Flexibility Reliability

Monolithic kernels Monolithic kernels Microkernels Due to their


generally offer better have a higher degree provide greater isolation,
performance due to of complexity as flexibility, as microkernels can be
their tight they contain all core individual more reliable, as a
integration and system components. components can be failure in one
reduced overhead. Microkernels, with swapped or component does
Microkernels, their modular upgraded without not bring down the
however, can be design, are generally affecting the entire entire system.
optimized for simpler and easier system. Monolithic Monolithic kernels,
specific tasks, to maintain. kernels have a more however, can be
trading off some rigid structure. more robust if
overall performance. properly designed.

You might also like