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

OS Lecture 1

The document provides an overview of operating systems, detailing their functions such as process management, memory management, file system management, device management, security, and user interfaces. It also discusses various processing models including batch processing, multiprocessing, distributed processing, and real-time processing, highlighting their characteristics and applications. Key components of an operating system, such as the kernel, shell, and device drivers, are also described.

Uploaded by

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

OS Lecture 1

The document provides an overview of operating systems, detailing their functions such as process management, memory management, file system management, device management, security, and user interfaces. It also discusses various processing models including batch processing, multiprocessing, distributed processing, and real-time processing, highlighting their characteristics and applications. Key components of an operating system, such as the kernel, shell, and device drivers, are also described.

Uploaded by

ishishahid4
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Operating Systems

Lecture 1
Ms. Maryam Arshad
What Operating Systems Do?
Introduction to Operating Systems
• An Operating System (OS) is the essential
software layer that serves as an interface
between the user, application programs, and
computer hardware. It ensures the smooth
operation of the entire system by managing
resources and facilitating user interactions.
Functions of Operating Systems
1. Process Management
• Process: A program in execution. Each process has its own address space,
memory, and resources.
• Process Scheduling: The OS decides the order and time that processes run.
Common scheduling algorithms include First-Come-First-Served (FCFS),
Shortest Job Next (SJN), and Round Robin (RR).
• Multitasking: Allows multiple processes to share CPU time to make efficient
use of resources.
• Inter-Process Communication (IPC): Mechanisms (like message passing,
shared memory) that allow processes to communicate and synchronize.
Functions of Operating Systems
2. Memory Management
• RAM Allocation: The OS allocates memory to processes and reclaims it once
they complete.
• Virtual Memory: Extends physical memory by using disk space, allowing
larger programs to run and efficient memory management.
• Paging and Segmentation: Techniques for memory management. Paging
divides memory into fixed-sized blocks, while segmentation divides it into
variable-sized parts.
• Memory Protection: Ensures that one process cannot access the memory
allocated to another process.
Functions of Operating Systems
3. File System Management
• Files and Directories: Files store data, and directories organize files in a
hierarchy.
• File Permissions: Controls access to files and directories to enhance security.
• File Access Methods: Determines how files are read or written. Examples
include sequential and direct access.
• Storage Allocation: Manages how data is stored on physical media (e.g., hard
drives, SSDs) using techniques like contiguous, linked, and indexed allocation.
Functions of Operating Systems
4. Device Management
• I/O Systems: Manages input/output devices, providing abstraction to applications.
• Drivers: Software that translates OS commands into device-specific actions.
• Buffering and Spooling: Techniques to handle data transfer between devices of
different speeds.
5. Security and Protection
• Access Control: Restricts system and resource access to authorized users.
• Authentication: Verifies the identity of users before granting access.
• Encryption: Protects data from unauthorized access by encoding it.
• Protection Mechanisms: Ensure that processes do not interfere with each other or
with OS functionality.
Functions of Operating Systems
6. User Interface
• Command-Line Interface (CLI): A text-based interface where users input
commands.
• Graphical User Interface (GUI): A visual interface with icons and windows
that allows users to interact with the OS more intuitively.
7. Kernel
• Definition: The core of the OS that controls all low-level functions.
• Functions: Manages CPU, memory, devices, and system calls.
• Types: Includes monolithic kernels (all services in one space) and
microkernels (minimizes services to improve security).
Functions of Operating Systems
8. System Calls
• Definition: Interfaces that allow programs to request OS services.
• Examples: File operations (open, close), process control (create, terminate),
and communication (send, receive messages).
Components of an Operating System
1. Kernel
• The core part of the OS, responsible for managing hardware resources.
• Types of kernels:
• Monolithic Kernel: All OS services run in a single kernel space (e.g., Linux).
• Microkernel: Basic functions run in kernel space, and other services run in user space (e.g.,
Minix).
2. Shell
• Acts as the interface between the user and the kernel.
• Interprets user commands and communicates them to the kernel.
• Types:
• Command-Line Interface (CLI): Text-based (e.g., Bash in Linux).
• Graphical User Interface (GUI): Icon-based (e.g., Windows Explorer).
Components of an Operating System
3. Process Scheduler
• Determines the execution order of processes.
Scheduling types:
• Preemptive: Time slices are allocated (e.g., Round Robin).
• Non-Preemptive: Process runs until it finishes (e.g., First-Come-First-Serve).
4. Memory Manager
• Handles memory allocation and deallocation.
• Ensures efficient utilization and prevents memory leaks.
5. File System
• Manages how data is stored and retrieved.
• Includes file allocation methods (e.g., FAT, NTFS).
Components of an Operating System
6. Device Drivers
• Software components that allow the OS to interact with hardware devices.
• Acts as translators between the device and the system.
7. System Programs
• Utilities and software that provide essential services, such as:
• File management tools (e.g., File Explorer).
• Performance monitors (e.g., Task Manager).
• Networking tools (e.g., Ping).
8. User Interface
• The layer users interact with to issue commands and receive output.
• Can be a CLI or GUI.
Batch Processing
• Batch Processing is a mode of operating system task execution where a group of tasks or jobs is
collected, processed, and executed as a single batch without user interaction during execution. It is
commonly used for tasks that don’t require immediate user input, allowing the system to handle
repetitive, time-consuming operations efficiently.
Key Characteristics of Batch Processing:
• Grouped Jobs: Multiple tasks are collected and executed together.
• No User Interaction During Execution: Once submitted, the batch runs without the need for user
intervention.
• Sequential Execution: Jobs in the batch are executed one after the other in a predetermined
sequence.
• Resource Optimization: Maximizes hardware utilization by scheduling jobs during non-peak times.
Batch Processing
How It Works:
• Job Collection: Users or systems submit jobs, typically in the form of scripts or
commands.
• Job Queuing: Jobs are placed in a queue and stored in secondary memory
(e.g., hard disks).
• Execution: The operating system processes the jobs one by one based on a
predefined schedule.
• Output Generation: Results are saved to files or output devices for later
review.
Batch Processing
Examples of Batch Processing in Use:
• Payroll Systems: Calculating salaries for all employees at the end of the
month.
• Banking: Processing credit card transactions or generating monthly
statements.
• Data Analysis: Running large-scale computations like processing logs or
performing backups.
• Image Processing: Applying the same filters or transformations to a batch of
photos.
Multiprocessing
• Multiprocessing refers to the capability of an operating system to use two or
more processors (CPUs) within a single computer system to execute multiple
processes simultaneously. It leverages multiple CPUs to perform parallel
processing, thereby increasing computational speed, resource utilization, and
system reliability.
Key Features of Multiprocessing:
• Multiple CPUs: The system has two or more physical processors sharing tasks.
• Parallel Execution: Tasks are executed simultaneously on different CPUs.
• Concurrency: Multiple processes run concurrently, improving efficiency.
• Resource Sharing: CPUs share resources like memory, storage, and I/O
devices.
Multiprocessing
Types of Multiprocessing:
• Symmetric Multiprocessing (SMP):
• All CPUs share the same memory and resources equally.
• Each CPU runs processes independently, using the same operating system.
• Common in general-purpose systems (e.g., modern desktops, servers).
• Asymmetric Multiprocessing (AMP):
• One CPU is the master and manages the system, while other CPUs act as slaves and
perform specific tasks.
• Used in specialized systems like embedded systems.
Distributed Processing
• Distributed Processing refers to a computing model where multiple independent computers (nodes) work together
on a common task or share resources, communicating over a network. Unlike centralized systems, distributed
processing divides workloads among interconnected systems, ensuring efficiency, scalability, and fault tolerance.
Key Characteristics of Distributed Processing:
• Multiple Nodes:
• Work is distributed across multiple computers, often geographically dispersed.
• Each node operates independently but collaborates to achieve the overall objective.
• Network Communication:
• Nodes communicate via a network (e.g., LAN, WAN, or the internet) to coordinate tasks.
• Resource Sharing:
• Nodes share resources like data, files, processing power, and peripherals.
• Transparency:
• The system appears unified to the user, masking the complexity of its distributed nature (e.g.,
resource location transparency).
• Fault Tolerance:
• If one node fails, others can take over its workload, enhancing system reliability.
Distributed Processing
How Distributed Processing Works:
• Task Division:
The task is divided into smaller sub-tasks, which are assigned to different
nodes.
• Execution:
Nodes process their assigned tasks independently or collaboratively.
• Coordination:
The system ensures nodes stay synchronized, handling communication and
data sharing.
• Result Aggregation:
Partial results from each node are combined to produce the final output.
Real-Time Processing
Real-Time Processing refers to a computing system's ability to process data and deliver results
within a strictly defined time frame, often milliseconds or microseconds. It is used in
environments where time-sensitive decision-making is critical, ensuring that outputs are
produced fast enough to influence the system’s ongoing operations.
Key Characteristics of Real-Time Processing:
• Strict Time Constraints:
• Each task must be completed within a predefined deadline.
• Deterministic Behavior:
• The system guarantees a predictable response under all conditions.
• Continuous Input and Output:
• Data is processed as it arrives, with results being output immediately.
• Reliability:
• High reliability is essential to avoid catastrophic failures in critical applications.

You might also like