Unit-1
Unit-1
Unit-1
Operating system:
An operating system acts as an intermediary between the user of a computer and the
computer hardware. The purpose of an operating system is to provide an environment in
which a user can execute programs in a convenient and efficient manner.
2. Secondary goals
• Efficient use of resources
• Reliability
• Maintainability
Examples of operating system: Windows, Unix, Linux, Mac, Android, iOS etc.
Functions of operating system:
1. Process management: Involves handling the creation, scheduling and termination of
processes.
3. I/O device management: Handles I/O operations of peripheral devices like keyboards etc.
4. File management: Manages files on storage devices, including their information, naming,
permissions and hierarchy.
6. Security and protection: Ensures system protection against unauthorised access and
other security threats through authentication, authorization and encryption.
Major components of operating system:
1. Kernal: It is a central component of an OS that manages the system’s resources and
communication between hardware and software.
2. Process management
• Process scheduler: Determines the execution of processes.
• Process Control Block: Contains various process details such as process ID, priority,
status, etc.
• Concurrency control: Manages simultaneous execution of two or more processes.
3. Memory management
• Physical memory management: Manages RAM allocation.
• Virtual memory management: Simulates additional memory using disk space.
• Memory allocation: Assigns memory to different processes.
4. File system management
• File handling: Manages the creation, deletion and access of files and directories.
• File Control Block: Stores file attributes and control information.
• Disk scheduling: Organizes the order of reading or writing to disk.
5. Device management
• Device drivers: Interface between the hardware and the operating system.
• I/O controllers: Manage data transfer to and from peripheral devices.
6. Security and Access control
• Authentication: Verifies user credentials.
• Authorization: Controls access permissions to files and directories.
• Encryption: Ensures data confidentiality and integrity.
7. User interface
• Command Line Interface (CLI): Text-based user interaction.
• Graphical User Interface (GUI): Visual, user-friendly interaction with the OS.
8. Networking
• Network protocols: Rules for communication between devices on a network.
• Network interface: Manages connection between the computer and the network.
Classification of operating systems:
Key Characteristics:
Advantages:
• Efficient resource utilization.
• Fast response time for users.
• Supports multiple users simultaneously.
• Simplifies system management for large networks.
Disadvantages:
• Overhead from context switching between processes.
• Complex to design and manage.
• Security concerns due to resource sharing.
Real Time operating system:
A Real-Time Operating System is an operating system designed to process data and events
within a specific time constraint, ensuring predictable and deterministic responses. It is
commonly used in systems where timing is critical.
Disadvantages:
• Complexity: Difficult to design, implement, and debug.
• Resource Contention: Potential conflicts over shared
resources.
• Cost: Expensive hardware and infrastructure.
• Overhead: Additional processing for synchronization and
communication.
Characteristics:
• No clear separation between user and kernel modes.
• Application programs can directly access hardware.
• Not organized into layers or modules.
• Layered structure of an Operating system:
A layered operating system is structured as a hierarchy of layers, with each layer built on
top of lower layers. Each layer can interact only with the layer directly below it and
provides services to the layer above it.
Each layer serves a specific function and is responsible for only that function, minimizing
complexity and increasing reliability.
Example: Unix, Windows NT, Multics.
Characteristics:
• Modular Design: Each layer is independent and focused.
• Abstraction: Each layer hides internal implementation.
• Encapsulation: Internal workings of one layer are hidden from others.
• Clear Interfaces: Only specific calls are allowed between layers.
• Monolithic Structure of an Operating system:
The monolithic structure is one of the earliest and simplest architectures used in operating
system design. In this structure, the entire OS works in a single layer in kernel mode, with
all core services bundled together into one large block of code.
Example: MS DOS, UNIX, Linux.
Characteristics:
Characteristics:
• Only critical functions in the kernel.
• More secure and stable due to isolation.
• Slightly slower due to context switches and IPC overhead.
Reentrant kernel:
A reentrant kernel in an operating system refers to a type of kernel that can safely be
interrupted while it is executing, and then called again ("re-entered") before its previous
executions are complete. This property is essential for multitasking and interrupt
handling, especially in real-time and multi-threaded systems.