0% found this document useful (0 votes)
26 views7 pages

swayam

Uploaded by

gw67chinesewatch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views7 pages

swayam

Uploaded by

gw67chinesewatch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

What is an Operating System (OS)?

An operating system acts as an intermediary between the user and the computer hardware. It's
software that manages the hardware resources and provides a platform for running other programs
(applications). There's no single definition, but some key goals include:

 Executing user programs: Making it easier for users to solve problems with their computers.

 Convenient use: Providing a user-friendly interface (like a graphical interface with windows
and a mouse) for interacting with the system.

 Efficient resource management: Utilizing hardware resources like memory, storage, and
devices effectively. This includes ensuring resources are available when needed, preventing
conflicts between users or programs, and optimizing usage.

Computer System Structure

A computer system can be broken down into four main components:

1. Hardware: The physical components like CPU, memory, and I/O devices (keyboard, display,
printer etc.).

2. Operating System (OS): Manages and coordinates hardware usage among various
applications and users.

3. System and Application Programs: These programs define how system resources are used to
solve user problems. Examples include compilers, word processors, web browsers, and
databases.

4. Users: People or other computers interacting with the system to accomplish tasks.

Operating System Functions

 Controlling Hardware: The OS ensures devices don't overwhelm the system with information
and coordinates access to hardware resources.

 Coordinating Users and Programs: The OS manages situations where multiple programs or
users need to access resources or share data. This includes synchronization to prevent
conflicts.

Operating System as a Resource Manager

The OS plays a crucial role in managing resources like memory, storage, and devices. It ensures these
resources are available to the appropriate processes at the right time while preventing conflicts. This
is similar to a government managing resources for citizens.

Understanding the OS from Different Viewpoints

 User Viewpoint: What functionalities and interfaces does the OS provide for users to interact
with the system?

 System Viewpoint: What functionalities and services does the OS need to offer to users and
programs effectively?

Additional Points
 Early computer systems required users to write programs in assembly language, directly
interacting with hardware details.

 Modern operating systems provide a higher level of abstraction, allowing users to write
programs in languages like C without needing to understand the underlying hardware
specifics.

 The speed of different components (CPU, memory, I/O devices) plays a role in resource
management strategies.

Operating Systems (OS) from Multiple Viewpoints

User Viewpoint

 Types of Computers:

o Single-user systems (desktops, tablets): Designed for individual use, prioritizing


performance and ease of use.

o Multi-user systems (mainframes, servers): Handle multiple users simultaneously,


focusing on resource utilization and fair allocation.

o Handheld computers (smartphones, tablets): Resource-constrained, optimized for


usability and battery life.

o Embedded computers (car processors, appliances): Dedicated to specific tasks, often


running without user intervention.

System Viewpoint

 Resource Allocator: The OS manages system resources (CPU, memory, I/O devices) and
allocates them to competing processes fairly and efficiently.

 Control Program: The OS prevents errors and ensures proper hardware usage by controlling
program execution and preventing unauthorized access.

What is an Operating System?

 Interface between Hardware and User: The OS abstracts away hardware complexities,
providing a user-friendly environment.

 Problem-Solving Tool: The OS simplifies tasks by handling common operations and resource
allocation.

 Collection of Programs: The OS includes the kernel (core component), system programs
(database, compiler), and application programs (user-developed software).

Evolution of Operating Systems

 Early Systems: Users interacted directly with hardware, requiring intricate knowledge of
electrical signals.

 OS Emergence: The OS acted as an intermediary, simplifying user interaction with hardware.

 Application Development: Tools like compilers and databases emerged, further easing
software development.
 Middleware: Additional software layers (e.g., frameworks) extended OS capabilities and
streamlined application development.

Key Takeaways

 The user view of an OS depends on the computer type, focusing on user experience and
features.

 The system view emphasizes resource management and control, essential for efficient and
secure operation.

 OSs have evolved from simple interfaces to complex systems that manage resources and
facilitate software development.

 Understanding both viewpoints is crucial for effective OS usage and development.

Additional Insights

 OS as a Resource Manager: The OS plays a vital role in ensuring resources are available when
needed, preventing conflicts, and optimizing usage.

 Simultaneous Access: The OS determines if resources can be shared (e.g., screen) or


accessed exclusively (e.g., printer).

 Preemption: The OS can interrupt a running process to handle a more urgent task, ensuring
responsiveness.

 Starvation Prevention: The OS prevents processes from being indefinitely denied resources,
ensuring fairness.

Further Exploration

 Specific OS Features: Dive deeper into specific OS features like process management,
memory management, file systems, and security mechanisms.

 OS Design Principles: Explore the underlying design principles and algorithms that govern OS
behavior.

 Emerging Trends: Learn about the latest trends in OS development, such as cloud-based OS,
containerization, and edge computing.

Components and Organization

A modern general-purpose computer system consists of:

 One or more CPUs (Central Processing Units)

 A number of device controllers

 Shared memory

 A common bus that provides access to the shared memory

These components are connected in a way that allows them to communicate and work together.
Here's a breakdown of the key aspects:

Multiple CPUs for Parallelism


 Having multiple CPUs enables the system to execute multiple programs simultaneously,
increasing performance.

Device Controllers for Specialized Interaction

 Each device controller manages a specific type of device (e.g., disk drives, keyboards,
printers). This allows for efficient interaction with various peripherals.

 Controllers have local buffers to temporarily hold data during transfers between the device
and memory.

Memory Access and Synchronization

 The memory is shared by all CPUs and devices. A memory controller ensures orderly access
to prevent conflicts when multiple components try to access memory simultaneously.

Standardized Interfaces for Devices

 Many devices use standard interfaces like USB, simplifying their connection and interaction
with the system.

CPU: The Central Processing Unit

 The CPU handles the core computational tasks of the system.

 It fetches instructions from memory, decodes them, and executes them.

 It interacts with devices through their respective controllers and the common bus.

Memory: Where Data Resides

 Memory stores programs, data, and the operating system.

 It provides fast access to information needed by the CPU.

I/O Devices: Interaction with the World

 Input/Output (I/O) devices allow users to interact with the computer and exchange data.

 Examples include keyboards, mice, monitors, printers, and disk drives.

Operating System: The System Manager

 The operating system (OS) acts as an intermediary between the hardware and user software.

 It manages resources like CPUs, memory, and devices, ensuring efficient and orderly
execution of tasks.

System Boot Process

1. Power On: When the system powers on, a bootstrap program (firmware) stored in ROM
(Read-Only Memory) takes control.

2. Loading the Operating System: The bootstrap program loads the main operating system
from the disk drive into RAM (Random Access Memory).

3. Initialization: The OS initializes all system components, including device drivers.


4. User Login: The system displays a login prompt, waiting for a user to log in and begin
interacting with the computer.

Event-Driven Operation with Interrupts

 The OS operates in an event-driven manner.

 Events can be triggered by hardware (e.g., key press) or software (e.g., system call).

 When an event occurs, an interrupt signal is sent to the CPU, halting its current task.

 The CPU saves its state and executes the appropriate interrupt service routine (ISR) to handle
the event.

 Once the ISR finishes, the CPU restores its state and resumes the interrupted task.

 This asynchronous approach allows for efficient handling of various events without the CPU
constantly checking for them.

Operating System Design and Architecture: Key Concepts

Process Management

 Process: A program in execution, requiring resources (CPU, memory, I/O).

 Thread: A unit of CPU utilization within a process.

 Process Management: Creates, deletes, schedules, synchronizes processes, and prevents


deadlocks.

Memory Management

 Virtual Memory: Creates the illusion of more memory than physically available.

 Swapping: Moves data between main memory and secondary storage.

 Memory Allocation: Assigns memory to processes.

 Cache Management: Optimizes data access by storing frequently used data in faster
memory.

Storage Management

 File System: Organizes data into files and directories.

 Access Control: Enforces rules for who can access files.

 Storage Allocation: Assigns disk space to files.

 Disk Scheduling: Optimizes disk access to reduce seek time.

Protection and Security

 User vs. Kernel Mode: Protects critical system resources.

 Access Control Lists (ACLs): Determine who can access files and resources.

 Capabilities: Grant specific privileges to processes.

 Encryption: Protects data from unauthorized access.


Other Key Concepts

 Interrupts: Hardware or software signals that trigger the OS to handle events.

 Timers: Used to prevent processes from running indefinitely.

 System Calls: Interface between user programs and the kernel to request system services.

Operating System Services Explained

This lecture dives into the core functionalities of an operating system (OS), focusing on the services it
provides to users, processes, and other systems.

Services for Users

 User Interface (UI): This is the bridge between users and the system. It allows users to
interact with the OS through commands or a graphical interface (GUI).

o Command-Line Interface (CLI): Users enter text commands for specific tasks. (e.g.,
Unix/Linux systems)

o Graphical User Interface (GUI): Users interact with icons, menus, and windows using
a mouse or keyboard. (e.g., Windows, macOS)

o Batch Interface: Users submit a sequence of commands in a file for execution in one
go. (common in earlier systems)

 Program Execution: The OS loads programs from secondary storage (e.g., hard disk) into
main memory and executes them. It also handles normal or abnormal termination (errors).

 I/O Operations: Programs interact with devices like keyboards, printers, and disks for
input/output. The OS manages these interactions.

 File System Management: Users can create, delete, search, read, write, and modify files and
directories. The OS organizes and manages this file system.

o Permissions: The OS controls access to files, ensuring in multi-user systems that


users cannot access unauthorized data.

Services for Processes

Processes are programs under execution. The OS provides services to them as well:

 Resource Allocation: Multiple processes may run concurrently, requiring resources like CPU
cycles, memory, and disk space. The OS allocates these resources efficiently.

 Communication: Processes can exchange information with each other, either on the same
computer or across a network. The OS facilitates this communication through shared
memory or message passing.

 Error Detection: The OS monitors processes for errors during execution, including those in
the CPU, memory, I/O devices, or user programs. It takes appropriate actions based on the
error type.

Services for Other Systems


 Network Communication: Operating systems on networked computers can communicate
and exchange data with each other.

Additional Services

 Debugging: The OS provides tools to help identify and fix errors in programs during
development or execution.

 Accounting: The OS keeps track of resource usage (CPU time, memory, disk space) by users
or processes. This information is valuable for billing purposes in commercial environments.

 Protection and Security: The OS safeguards system resources and user data by controlling
access and preventing unauthorized modifications.

These services are fundamental to a well-functioning operating system, enabling users and
applications to interact with the hardware effectively and securely.

System Calls and Interfaces:

 Users and programs interact with the underlying OS functionalities through system calls.
These are programming interfaces that provide access to OS services.

 Each service has a unique number associated with it. Programs make requests by specifying
the service number and any necessary parameters.

 System calls are typically executed in the kernel mode of operation, which has more
privileges than the user mode where user programs run.

 Application Programming Interfaces (APIs): Most programs access system calls through
higher-level APIs that simplify the process. Examples include Win32 API for Windows, POSIX
API for Unix-based systems, and Java API for Java programs.

You might also like