Unit 1 Os Part 2
Unit 1 Os Part 2
Unit 1 Os Part 2
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 updated
specific set of services mode', handling presenting a consistent or replaced without
and abstractions to the critical system tasks. and standardized affecting the overall
layers above it. This The user applications interface to the upper system functionality,
modular design run in a less privileged layers. This allows enabling the OS to
promotes isolation, 'user 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
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.
Inter-Process Communication
3
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
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
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
a
Department of Applied Computational Science & Engineering
What is a Reentrant
Kernel?
Concurrency Interruptibility Thread-Safe
Handling
A reentrant kernel is able The reentrant design Reentrant kernels are
to handle multiple enables the kernel to be designed to be thread-
threads or processes interrupted and resumed safe, meaning they can
concurrently, allowing the without corrupting its safely execute multiple
operating system to internal data structures threads of control within
efficiently utilize system or states. the same address space.
resources.
Department of Applied Computational Science & Engineering
Benefits of Reentrant
Kernels
1 Improved 2 Enhanced
Efficiency
Reentrant kernels can efficiently handle Reliability
Reentrant kernels are designed to be
multiple concurrent processes by interruptible and able to resume
allowing the kernel code to be shared, execution after an interrupt without
reducing memory usage and improving corrupting data or system state,
overall system performance. improving the overall reliability of the
operating system.
3 Scalability and 4 Optimized Memory
Flexibility
Reentrant kernels can scale to support Usage
By allowing multiple processes to share
more processors and handle increased the same kernel code, reentrant kernels
workloads without significant can reduce the overall memory footprint
performance degradation, making them of the operating system, leading to
suitable for a wide range of computing more efficient use of system resources.
environments.
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
2. Easier
times. Debugging: Since all kernel components are in a single
address space, debugging and troubleshooting issues is generally
3. Mature
simpler. 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.
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