0% found this document useful (0 votes)
14 views

Operating System

Uploaded by

AAMIR YOUSUF
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Operating System

Uploaded by

AAMIR YOUSUF
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Operating System: Comprehensive Notes

Definition of Operating System (OS)

An Operating System (OS) is a software that acts as an intermediary between computer


hardware and users. It enables users to interact with the computer system while managing the
hardware and software resources effectively. The OS performs various essential functions,
making it possible for users to run applications, manage files, and utilize hardware
components seamlessly.

Functions of an Operating System

1. Process Management
o Definition: The OS manages processes, which are programs in execution. This
includes starting, stopping, and coordinating multiple processes.
o Key Functions:
 Process Creation: When you open a program, the OS creates a process,
allocating necessary resources like memory and CPU time.
 Scheduling: The OS uses scheduling algorithms (like Round Robin or
Shortest Job First) to decide which process runs at any given moment.
This ensures fair and efficient use of CPU time.
 Process Termination: Once a process completes its task, the OS
terminates it and releases its resources for use by other processes.
 Inter-Process Communication (IPC): The OS allows processes to
communicate and synchronize their actions when needed.
2. Memory Management
o Definition: The OS is responsible for managing the computer's memory, which
includes both primary memory (RAM) and secondary storage (hard drives).
o Key Functions:
 Memory Allocation: When a program runs, the OS allocates memory
blocks to it. It keeps track of which memory is allocated and which is
free.
 Memory Deallocation: After a process ends, the OS frees its allocated
memory, making it available for new processes.
 Virtual Memory: To extend the available memory, the OS uses
techniques like paging and segmentation, allowing larger applications to
run even if they exceed physical RAM capacity.
3. File System Management
o Definition: The OS organizes and manages how data is stored and retrieved on
storage devices.
o Key Functions:
 File Creation and Deletion: Users can create and delete files, and the OS
maintains this information in its file system.
 File Organization: The OS organizes files in directories (folders), creating
a hierarchical structure for easy access and management.
 Access Control: The OS manages permissions for files, ensuring only
authorized users can read, write, or execute files.
 Backup and Recovery: The OS often includes features for data backup to
protect against loss due to hardware failure or accidental deletion.
4. Device Management
o Definition: The OS controls and manages hardware devices connected to the
computer, such as printers, keyboards, and hard drives.
o Key Functions:
 Device Drivers: The OS uses drivers—specific programs that allow the
OS to communicate with hardware devices. Each device requires its
driver to function correctly.
 Input/Output (I/O) Management: The OS manages I/O operations,
coordinating data transfers between the computer and its peripherals.
 Resource Allocation: It allocates the necessary resources (like bandwidth
and processing time) to each device, ensuring they operate efficiently and
without conflict.
5. Security and Access Control
o Definition: The OS provides security measures to protect data and resources
from unauthorized access.
o Key Functions:
 User Authentication: The OS requires users to log in with a username and
password, verifying their identity before granting access.
 Access Permissions: The OS sets permissions for files and resources,
determining which users can read, write, or execute them.
 Data Protection: The OS uses encryption and firewall technologies to
protect data from malware and unauthorized access, ensuring system
integrity.
6. User Interface (UI)
o Definition: The OS provides a way for users to interact with the computer
system, making it user-friendly.
o Key Functions:
 Graphical User Interface (GUI): Many operating systems use a GUI that
includes windows, icons, and menus, allowing users to navigate easily.
 Command-Line Interface (CLI): Some systems allow advanced users to
interact with the OS using text commands, providing more control over
operations.
 Accessibility Features: The OS includes features to assist users with
disabilities, such as screen readers, magnifiers, and voice recognition.

Types of Operating Systems

1. Batch Operating System


o Definition: This type of OS groups jobs with similar needs and processes them
in batches without user interaction.
o Key Features:
 Job Scheduling: Jobs are collected in batches and processed one after the
other.
 Spooling: Input and output data are stored temporarily in buffers to
optimize processing.
o Examples: IBM’s OS/360.
o Advantages:
 Efficient for large-scale data processing tasks.
 Reduces idle time, as jobs are processed automatically.
o Disadvantages:
 Lack of interaction makes it hard to correct errors during processing.
 Troubleshooting can be challenging if an error occurs in a batch.
2. Time Sharing Operating System
o Definition: A time-sharing OS allows multiple users to access the system
simultaneously by sharing its resources.
o Key Features:
 Time Slices: The CPU divides its time among different users, allowing
for simultaneous usage.
 Multi-user Support: The OS manages multiple user sessions, enabling
concurrent use of applications.
o Examples: Unix, Linux, Windows.
o Advantages:
 Efficient resource utilization as multiple users can interact
simultaneously.
 Reduces idle time for the CPU, maximizing productivity.
o Disadvantages:
 Complex scheduling algorithms are needed to manage requests from
multiple users.
 Performance may degrade if too many users are active at once.
3. Multiprocessing Operating System
o Definition: A multiprocessing OS uses multiple CPUs to perform tasks
simultaneously, enhancing performance.
o Key Features:
 Parallel Processing: The OS can run multiple processes at the same time
on different CPUs, significantly speeding up execution.
 Load Balancing: The OS distributes tasks among processors to optimize
resource use.
o Examples: Modern versions of Windows, Linux, and Unix.
o Advantages:
 Faster execution of tasks due to concurrent processing.
 Better resource utilization, leading to improved overall system
performance.
o Disadvantages:
 Requires specialized hardware and may involve higher costs for
implementation.
 More complex to design and manage due to the need for synchronization
between processes.
4. Real-Time Operating System (RTOS)
o Definition: An RTOS is designed for applications that require immediate
processing and responses, often found in embedded systems.
o Key Features:
 Deterministic Behavior: It guarantees that tasks are completed within
strict timing constraints.
 Priority Scheduling: Critical tasks are given higher priority to ensure
timely execution.
o Examples: VxWorks, QNX, FreeRTOS.
o Advantages:
 Immediate response times are crucial for safety-critical applications (like
medical devices).
 Highly reliable for applications where timing is essential.
o Disadvantages:
 Complex to design and implement due to strict timing requirements.
 Limited multitasking capabilities since the focus is on meeting real-time
deadlines.
5. Distributed Operating System
o Definition: A distributed OS runs on multiple interconnected computers that
appear to users as a single coherent system.
o Key Features:
 Resource Sharing: Allows multiple machines to work together, sharing
resources and workloads.
 Transparency: The OS hides the complexity of the distributed
environment from users, making it easy to work with.
o Examples: Google’s Android, Microsoft Azure, and Amazon Web Services.
o Advantages:
 Improved performance as workloads are distributed across many
machines.
 Enhanced reliability and fault tolerance since the system can continue
functioning even if one node fails.
o Disadvantages:
 Requires a complex networking setup and infrastructure.
 Security concerns arise as data is shared over a network, necessitating
robust security measures.

You might also like