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

What is an Operating System

Uploaded by

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

What is an Operating System

Uploaded by

ritiksaini7486
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

What is an Operating System?

An Operating System (OS) is a software layer A Real-Time Operating System (RTOS) is a specialized OS designed to handle
that manages computer hardware and software resources while providing a user- tasks with strict timing constraints. It ensures that critical operations are completed
friendly interface. It ensures the efficient operation of the system and serves as a within a specified deadline. RTOS is commonly used in systems where delay or
platform for running applications.How Does an Operating System Take Control failure can lead to significant consequences, such as in medical devices,
Over the Computer System? aerospace systems, or industrial automation.Key Features of RTOS:
The operating system manages the computer system through various layers of Deterministic Behavior: Ensures predictable execution of tasks within defined
control, ensuring smooth coordination between the hardware, software, and users. time limits.
System Boot Process: Priority-Based Scheduling: Executes tasks based on their priority levels.
When the computer is powered on, the Basic Input/Output System (BIOS) or Low Latency: Minimizes delays in task execution and interrupt handling.
Unified Extensible Firmware Interface (UEFI) loads the OS into the main Reliability and Stability: Designed to function without failure under continuous
memory (RAM) from the storage device.The OS kernel (core part) initializes and operation.
starts managing resources. Resource Management: Efficiently manages CPU, memory, and I/O for time-
Hardware Abstraction: critical tasks.
The OS abstracts hardware complexity by providing drivers and system calls. Multitasking OS Multiuser OS
It allows programs to interact with hardware (like the CPU, memory, and Allows a single user to run Allows multiple users to access
input/output devices) without needing to understand the specifics of the hardware. multiple tasks or processes and use the computer system
Resource Management: simultaneously. simultaneously.
Processor Management: The OS schedules tasks using algorithms (e.g., round- Maximizes CPU utilization by Provides resources and services to
robin, priority scheduling) to efficiently utilize the CPU. managing multiple tasks for one multiple users while maintaining
Memory Management: Allocates and deallocates RAM to processes, ensuring user. isolation between them.
efficient memory usage and preventing conflicts.
Running a web browser, media Multiple users accessing a server
Device Management: Controls peripheral devices through drivers, facilitating
player, and word processor via terminals or remote
communication between hardware and software.
simultaneously on one system. connections.
File System Management: Organizes, stores, and retrieves data on storage
devices using a structured file system (e.g., FAT32, NTFS, ext4). Designed for a single user Designed for multiple users
Process and Task Management: managing multiple processes. interacting with the system, often
The OS manages multiple processes (programs in execution) using: remotely.
Multitasking: Runs multiple tasks by switching between them quickly. Allocates resources among tasks Allocates resources among
Process Synchronization: Ensures processes do not conflict or corrupt shared or processes of a single user. multiple users, ensuring fairness
resources. and isolation.
Inter-Process Communication (IPC): Allows processes to exchange information Windows, macOS, Linux (desktop). UNIX, Linux (server environments),
efficiently. Windows Server.
User Interaction: Personal computers, smartphones, Servers, mainframes, database
Provides a User Interface (e.g., Command-Line Interface like Linux terminal or gaming consoles. systems, cloud computing
Graphical User Interface like Windows desktop) for users to interact with the environments.
computer.
Translates user commands into machine instructions.
. Security and Access Control: Process synchronization ensures that multiple processes can execute concurrently
Ensures secure access by implementing: without interfering with each other. It is crucial in scenarios where processes share
Authentication: Verifies user identity through passwords or biometrics. resources like memory, files, or devices. Synchronization helps avoid issues like race
Access Control: Limits user permissions for files and resources. conditions, where the outcome of execution depends on the sequence of events.
Encryption: Protects data from unauthorized access. Inter-Process Communication (IPC) is a mechanism that allows processes to exchange
. Error Detection and Recovery: data and coordinate their actions. It is vital in systems where multiple processes need to
Monitors hardware and software operations to detect errors (e.g., memory collaborate to complete a task. IPC can be implemented through mechanisms like pipes,
overflow, disk failure). which provide unidirectional communication channels, message queues that manage
Takes corrective actions, such as restarting a process or alerting the user. messages between processes, shared memory for direct data access, sockets for
. Networking: communication over networks, and signals for notifying processes about specific events.
Manages network connections, enabling communication between computers and A thread is the smallest unit of execution within a process and allows for parallelism
devices. within the same process. Unlike processes, threads share the same memory space and
Facilitates internet access and resource sharing. resources, making them more lightweight and faster. Threads execute independently but
are coordinated by the operating system. They can be user-level threads managed by
libraries or kernel-level threads managed directly by the OS.
A deadlock occurs in a system when two or more processes are unable to proceed because Semaphores are synchronization tools used to control access to shared resources. They
they are each waiting for a resource that the other holds. In this state, no process can help manage concurrent processes and prevent issues like race conditions. A semaphore
complete its execution, and the system comes to a standstill. Deadlocks are a common uses a counter to track resource availability. Binary semaphores (or mutexes) allow only
problem in multitasking systems where processes share resources like memory, files, or one process to access a resource at a time, while counting semaphores permit multiple
devices. processes up to a specified limit. Semaphores work through two operations: Wait (P),
Necessary Conditions for Deadlock which decreases the semaphore value and makes a process wait if the value is zero, and
A deadlock can occur only if the following four necessary conditions are met Signal (V), which increases the semaphore value, indicating the resource is available. For
simultaneously, as described by Coffman’s conditions: example, in a print queue, a semaphore ensures that only one process sends data to the
Mutual Exclusion: printer at a time.
At least one resource must be held in a non-shareable mode, meaning only one process can
use the resource at a time. If another process requests the resource, it must wait until the Virtual Memory is a memory management technique that creates an illusion for the user
resource is released. that there is virtually unlimited memory available, even if the actual physical memory
Hold and Wait: (RAM) is limited. It achieves this by temporarily transferring data between the physical
A process holding at least one resource is waiting to acquire additional resources held by memory and secondary storage (e.g., a hard disk or SSD).
other processes, without releasing its currently held resources. Address Translation: Programs use virtual addresses, which the operating system maps
No Preemption: to physical addresses.
Resources cannot be forcibly taken away from a process; they can only be released
Efficient Use of Memory: Allows running large programs or multiple programs
voluntarily by the process holding them after the process has completed its task.
simultaneously, even if they exceed the available RAM.
Circular Wait:
A set of processes exist such that each process is waiting for a resource held by the next Isolation and Security: Each process gets its own virtual address space, ensuring isolation
from others.
process in the chain, forming a circular chain of dependency . Virtual memory is implemented using techniques like demand paging and segmentation:
The Input/Output (I/O) system in a computer is responsible for managing the flow of 1. Demand Paging
data between the computer's central processing unit (CPU) and external devices (e.g., Demand paging is a technique where pages of a program are loaded into memory only
when they are needed, rather than loading the entire program at once.
keyboard, mouse, disk drives, printers, etc.). The structure of the I/O system is designed
The memory is divided into fixed-size blocks called pages (in virtual memory) and page
to provide efficient communication between hardware and software while handling
frames (in physical memory).
different types of devices with varying data transfer speeds.
When a program accesses a page that is not in RAM, a page fault occurs.
The I/O system structure consists of several components that work together to ensure
smooth communication between the CPU and external devices: The operating system loads the required page from the secondary storage into RAM.
I/O Devices: Physical components for input and output. If the RAM is full, an existing page is replaced using a page replacement algorithm (e.g.,
I/O Controllers: Manage the interaction between the devices and the CPU. Least Recently Used (LRU)).
Device Drivers: Software that allows the OS to control hardware. 2. Segmentation
I/O Ports: Interfaces for connecting external devices. Segmentation divides a program into variable-sized logical segments based on its
Bus Systems: Data pathways that connect different system components. structure, such as code, data, and stack segments. Each segment is treated as a separate
I/O Interface: Hardware that manages data conversion and protocol handling. entity.
I/O Manager: OS component that coordinates and manages I/O operations. A segment table keeps track of each segment's base address (starting location in physical
memory) and limit (length).
When a program accesses an address, it is interpreted as a segment number and an
offset. The segment table is used to map this to a physical address.
Like demand paging, if a segment is not in RAM, it is loaded from secondary storage when
needed.

You might also like