Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
564 views

OS Unit-1 Notes

An operating system manages computer resources and provides services to users and applications. It includes components like the kernel, user interface, device drivers, and file system. An OS performs functions like process management, memory management, file system management, and security. Types of OSes include single-user, multi-user, real-time, embedded, mobile, and virtualization operating systems.

Uploaded by

Jaykishor Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
564 views

OS Unit-1 Notes

An operating system manages computer resources and provides services to users and applications. It includes components like the kernel, user interface, device drivers, and file system. An OS performs functions like process management, memory management, file system management, and security. Types of OSes include single-user, multi-user, real-time, embedded, mobile, and virtualization operating systems.

Uploaded by

Jaykishor Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Operating Systems Unit-1

Notes

 An operating system (OS) is a software program or a set of software programs that manages
and controls the resources and operations of a computer system.
 It acts as an intermediary between hardware components, application software, and users,
providing a platform for executing programs, managing memory, handling input/output
operations, and ensuring system stability and security.

Basic Elements of an Operating System:


1. Kernel:
 The core component responsible for managing system resources and providing essential
services.
 It interacts directly with hardware components and abstracts low-level hardware
functionalities for use by higher-level software.
2. User Interface:
 Facilitates interaction between users and the operating system.
 Can be graphical (GUI) or command-line (CLI).
 GUI provides visual elements such as windows, icons, buttons, etc., while CLI allows users
to input commands via text.
3. Device Drivers:
 Software modules that enable the operating system to communicate with hardware
devices.
 They abstract hardware complexities and provide a standardized interface for the OS to
interact with devices.
4. File System:
 Manages storage resources and organizes data into files and directories.
 Provides mechanisms for file creation, deletion, reading, and writing.
 Ensures data integrity, access control, and efficient storage utilization.

Functions of an Operating System:


1. Process Management:
 Allocates system resources (CPU, memory) to processes.
 Schedules processes for execution based on priority, fairness, or other scheduling
algorithms.
 Manages process states (e.g., running, waiting, terminated) and facilitates inter-process
communication.
2. Memory Management:
 Allocates and deallocates memory to processes dynamically.
 Manages virtual memory, allowing processes to use more memory than physically
available.
 Implements techniques like paging, segmentation, and memory protection to ensure
efficient and secure memory utilization.
3. File System Management:
 Organizes and maintains files and directories on storage devices.
 Handles file operations such as creation, deletion, reading, and writing.
 Provides features like file permissions, access control lists (ACLs), and file system
journaling for data integrity and security.

Department of CSE, SOEIT Page 1


4. Device Management:
 Manages input/output (I/O) devices such as keyboards, monitors, printers, etc.
 Handles device initialization, allocation, and deallocation.
 Provides device drivers to abstract hardware details and standardize device interactions.
5. Security and Access Control:
 Enforces security policies to protect system resources and data.
 Authenticates users and controls their access rights.
 Implements mechanisms like user authentication, encryption, and firewalling to safeguard
against unauthorized access and malicious activities.
6. Networking:
 Provides networking services to facilitate communication between computers and devices.
 Implements network protocols (e.g., TCP/IP) and manages network configurations.
 Supports functionalities like file sharing, remote access, and distributed computing.
7. User Interface Management:
 Provides interfaces for user interaction and system control.
 CLI interfaces allow users to input commands directly, while GUI interfaces offer graphical
elements for intuitive interaction.
 Batch processing interfaces enable automated execution of commands or scripts.

Types of Operating Systems:

1. Single-User, Single-Tasking OS:


 Definition: Supports only one user and allows only one program to run at a time.
 Characteristics:
 Sequential execution of tasks.
 Limited multitasking capabilities.
 Example: MS-DOS (Microsoft Disk Operating System).
2. Single-User, Multi-Tasking OS:
 Definition: Allows a single user to run multiple programs concurrently.
 Characteristics:
 Supports multitasking, where multiple processes can run simultaneously.
 Time-sharing mechanism for CPU allocation.
 Examples: Windows, macOS, Linux distributions for desktop and personal computing.
3. Multi-User OS:
 Definition: Supports multiple users simultaneously, allowing each user to have their own
processes and resources.
 Characteristics:
 Time-sharing mechanism for CPU and resource allocation among multiple users.
 Provides user authentication and access control mechanisms.
 Examples: Unix, Linux variants, server versions of Windows.
4. Real-Time OS (RTOS):
 Definition: Designed to handle tasks with strict timing requirements.
 Characteristics:
 Predictable and deterministic response times.
 Prioritizes tasks based on deadlines.
 Examples: VxWorks, FreeRTOS, QNX.
5. Network Operating System (NOS):
 Definition: Specialized OS designed for networked environments, providing network services.

Department of CSE, SOEIT Page 2


 Characteristics:
 Facilitates file sharing, print sharing, and communication among networked devices.
 Examples: Novell NetWare, Windows Server.
6. Distributed OS:
 Definition: Coordinates and manages multiple independent computers to appear as a single
integrated system.
 Characteristics:
 Provides transparency and uniform access to distributed resources.
 Supports distributed computing and resource sharing.
 Examples: Google's Android, Amoeba.
7. Embedded OS:
 Definition: Designed for embedded systems with limited resources and specific functions.
 Characteristics:
 Optimized for low power consumption and efficient resource utilization.
 Tailored for specific hardware platforms and applications.
 Examples: Embedded Linux, FreeRTOS, Windows Embedded Compact.
8. Mobile OS:
 Definition: Operating systems designed for mobile devices such as smartphones and tablets.
 Characteristics:
 Touchscreen interface and mobile-friendly user experience.
 Supports app ecosystems and mobile connectivity.
 Examples: Android, iOS (Apple), Windows Phone.
9. Virtualization OS:
 Definition: Manages virtual machines (VMs) and provides virtualized environments on physical
hardware.
 Characteristics:
 Hypervisor or virtual machine monitor (VMM) manages VMs.
 Allows multiple operating systems to run simultaneously on the same hardware.
 Examples: VMware ESXi, Microsoft Hyper-V, KVM (Kernel-based Virtual Machine).

Serial processing

Also known as serial computing or sequential processing refers to the execution of tasks or
instructions in a sequential order, one after the other, without concurrency or parallelism. In the
context of operating systems, serial processing typically pertains to systems that handle one task
at a time, executing each task to completion before moving on to the next one. Here's a detailed
overview of OS serial processing:

Serial Processing System:


 Definition: In a serial processing system, only one task is processed at a time. The CPU executes
instructions for one program from start to finish before moving on to the next task.
 Characteristics:
 Sequential Execution: Programs are executed one after another, with no parallelism.
 Low CPU Utilization: CPU idle during I/O operations, leading to inefficient resource
utilization.
 Simple Management: Easy to manage as only one program is active at any given time.

Examples of OS Serial Processing:

Department of CSE, SOEIT Page 3


1. Early Personal Computers: Many early personal computers, such as those running MS-DOS,
operated in serial processing mode, executing one program at a time.
2. Simple Embedded Systems: Some embedded systems with limited resources and single-
purpose functionality may use serial processing to handle tasks sequentially.

Multi-Programmed Batch System:


 Definition: In a multi-programmed batch system, multiple programs are loaded into memory
simultaneously, and the operating system switches between them to keep the CPU busy.
 Characteristics:
 Increased CPU Utilization: CPU switches between tasks when one is waiting for I/O,
improving efficiency.
 Overlapping I/O and CPU Operations: While one program waits for I/O, the CPU
executes another program.
 Job Scheduling: The operating system schedules jobs to optimize resource utilization and
throughput.
 Example: IBM OS/360 is an early example of a multi-programmed batch system.
Time Sharing Systems:
 Definition: Time-sharing systems enable multiple users to interact with a computer
simultaneously by rapidly switching between tasks, giving the illusion of parallel execution.
 Characteristics:
 Interactive Response: Users can interact with the system in real-time through terminals
or network connections.
 Time Slicing: CPU time is divided into small time slices, typically milliseconds, allocated to
different processes.
 Fairness: Each user or process receives a fair share of CPU time, ensuring equitable
resource allocation.
 Context Switching: The operating system switches rapidly between tasks to provide the
appearance of concurrent execution.
 Example: Unix and Linux systems provide time-sharing capabilities, allowing multiple users to log
in and run commands simultaneously.

Comparison:

 Serial Processing vs. Multi-Programmed Batch:


 Serial processing executes one task at a time, while multi-programmed batch systems allow
multiple tasks to be executed concurrently.
 Multi-programmed batch systems improve CPU utilization by overlapping I/O and CPU
operations, whereas serial processing systems may lead to CPU idle time during I/O
operations.
 Multi-Programmed Batch vs. Time Sharing:
 Multi-programmed batch systems focus on optimizing CPU utilization by executing
multiple jobs concurrently, while time-sharing systems prioritize providing interactive
response to users.
 Time-sharing systems allocate CPU time in small time slices to different processes, whereas
multi-programmed batch systems allocate entire CPU bursts to individual jobs.
 Serial Processing vs. Time Sharing:
 Serial processing systems execute tasks sequentially, while time-sharing systems provide
the illusion of concurrent execution by rapidly switching between tasks.

Department of CSE, SOEIT Page 4


 Time-sharing systems support interactive user interaction, whereas serial processing
systems are typically used in environments where real-time response is not critical.

System components for an operating system typically include:


1. Kernel: The core component of the operating system responsible for managing hardware
resources and providing essential services to other parts of the operating system and user
applications.
2. User Interface: Provides a way for users to interact with the operating system. This can include
graphical user interfaces (GUIs), command-line interfaces (CLIs), or other forms of interaction.
3. Device Drivers: Software components that allow the operating system to communicate with
hardware devices such as printers, keyboards, storage devices, and network interfaces.
4. File System: Manages the organization and storage of files on storage devices such as hard drives,
solid-state drives, and flash drives. This includes managing directories, file metadata, access
permissions, and file operations (e.g., reading, writing, deleting).
5. Memory Manager: Manages system memory (RAM), including allocating memory to processes,
managing virtual memory, and ensuring memory protection.
6. Process Manager: Responsible for creating, scheduling, and managing processes or tasks running
on the system. This includes process creation, termination, scheduling, and communication
between processes.
7. I/O Manager: Handles input and output operations between the computer system and external
devices such as keyboards, mice, monitors, printers, and network devices. It manages device
communication, buffering, and error handling.
8. Security Manager: Implements security policies, authentication mechanisms, access control, and
data protection features to ensure system and data security.
9. Networking Stack: Provides networking services and protocols for communication between
computers and devices over a network. This includes TCP/IP stack, network configuration, and
support for network protocols such as HTTP, FTP, and SSH.
10. System Services: Various services provided by the operating system to facilitate system
operations, including timekeeping, event logging, system monitoring, and performance
optimization.
11. Compiler and Interpreter: Tools provided by the operating system to translate high-level
programming languages into machine code (compiler) or interpret and execute scripts directly
(interpreter).
12. System Utilities: Additional tools and utilities provided by the operating system to perform
system maintenance, configuration, and troubleshooting tasks, such as disk management, backup
tools, and system diagnostics.

Operating System Services:


1. Program Execution:
 The operating system loads programs into memory and executes them.
 It manages the execution of multiple programs concurrently, scheduling them for CPU time
according to priority and resource availability.
2. I/O Operations:
 Handles input and output operations between the computer system and external devices.
 Manages communication with devices such as keyboards, mice, monitors, printers, disks,
and network interfaces.
 Provides buffering, caching, and error handling mechanisms to ensure reliable data
transfer.

Department of CSE, SOEIT Page 5


3. File System Manipulation:
 Manages storage resources and organizes data into files and directories.
 Provides services for creating, deleting, reading, writing, and updating files.
 Implements file permissions, access control, and file metadata management for data
security and integrity.
4. Communication Services:
 Facilitates communication and data exchange between processes, users, and devices.
 Provides inter-process communication mechanisms such as pipes, sockets, message
queues, and shared memory.
 Supports networking protocols for communication over local and wide-area networks.
5. Error Detection and Handling:
 Detects and reports errors, faults, and exceptional conditions that occur during system
operation.
 Implements mechanisms for error recovery, fault tolerance, and system stability.
 Logs error messages and events for diagnostic purposes and system troubleshooting.
6. Resource Allocation:
 Manages system resources such as CPU time, memory, I/O devices, and network
bandwidth.
 Allocates resources efficiently to ensure fair and optimal utilization.
 Implements scheduling algorithms to prioritize resource allocation and optimize system
performance.
7. Security and Protection:
 Enforces security policies to protect system resources, data, and user privacy.
 Controls access permissions, authentication mechanisms, and encryption algorithms.
 Implements user authentication, authorization, and auditing mechanisms to ensure system
security.
8. System Call Interface:
 Provides an interface for user applications to access operating system services and
functionalities.
 Defines a set of system calls or APIs (Application Programming Interfaces) for interacting
with the operating system kernel.
 Allows user programs to request services such as file operations, process management, and
network communication.

Interrupts and Interrupt Processing:


 Interrupt:
 An event that suspends the normal execution flow of a program to handle a specific
condition or request.
 Can be triggered by hardware devices (hardware interrupts) or software conditions
(software interrupts).
 Interrupt Processing:

1. Interrupt Request (IRQ):


 A hardware device sends a signal (interrupt request) to the CPU to request
attention.
 The CPU interrupts its current execution and switches to the interrupt handler
routine.
2. Interrupt Handler:

Department of CSE, SOEIT Page 6


 The part of the operating system that handles interrupts.
 Saves the state of the interrupted program, identifies the interrupting device, and
determines the appropriate action.
3. Interrupt Service Routine (ISR):
 The specific routine executed in response to an interrupt.
 Performs the necessary processing to handle the interrupt, such as reading data
from a device or servicing a software request.
4. Context Switching:
 If necessary, the CPU may switch to a different process or thread after handling the
interrupt.
 The interrupted program's state is restored, and execution resumes from the point
of interruption.

Types of Interrupts:

 Hardware Interrupts: Generated by external hardware devices to signal events such as


disk I/O completion or keyboard input.
 Software Interrupts: Triggered by software conditions, such as system calls or exceptions
like division by zero.

Program:
 A program is a set of instructions or code stored on disk.
 It is a passive entity and does not consume system resources until executed.
 Example: An executable file like a software application or script.
Process:
 A process is an instance of a program that is actively executing in memory.
 It represents the running program along with its associated resources.
 Example: When you run a program, it becomes a process with its own memory space and
execution state.

Names of some of the current popular operating systems across various platforms:

1. Windows 11: Developed by Microsoft, Windows 11 is the latest version of the Windows operating
system for personal computers, offering a range of features including a redesigned user interface,
improved gaming capabilities, and enhanced productivity tools.
2. macOS Monterey: Developed by Apple Inc., macOS Monterey is the latest version of the macOS
operating system for Mac computers, introducing features such as Universal Control, AirPlay to
Mac, Focus mode, and redesigned Safari.
3. Ubuntu: Ubuntu is a popular Linux distribution known for its ease of use, stability, and
community support. It is widely used for desktop computing, servers, and cloud environments.
4. Android: Developed by Google, Android is the most widely used mobile operating system,
powering a vast array of smartphones, tablets, smartwatches, and other devices. It offers a
customizable user interface, extensive app ecosystem, and integration with Google services.
5. iOS: Developed by Apple Inc., iOS is the operating system for iPhone, iPad, and iPod Touch devices.
Known for its user-friendly interface, security features, and seamless integration with other Apple
devices and services.

Department of CSE, SOEIT Page 7


6. Chrome OS: Developed by Google, Chrome OS is a lightweight operating system designed
primarily for Chromebook laptops. It is based on the Linux kernel and primarily runs web
applications using the Google Chrome web browser.
7. Windows Server: Windows Server is a group of operating systems designed for server use by
Microsoft. It provides various server-specific features and services such as Active Directory, file
services, web services, and virtualization.
8. Red Hat Enterprise Linux (RHEL): RHEL is a commercial Linux distribution developed by Red
Hat, tailored for enterprise use with features such as stability, security, and long-term support. It
is widely used in server environments and cloud deployments.
9. FreeBSD: FreeBSD is a Unix-like operating system known for its reliability, performance, and
advanced networking capabilities. It is widely used for servers, desktops, and embedded systems.
10. Ubuntu Server: Ubuntu Server is a variant of the Ubuntu Linux distribution optimized for server
deployments. It offers features such as long-term support, regular security updates, and a wide
range of server applications and services.

Department of CSE, SOEIT Page 8

You might also like