Mod-1
Mod-1
Chapter 01
Operating System Overview
Operating System
• A program that controls the execution of
application programs
• An interface between applications and
hardware
OS as Resource Manager
Layers and Views
Need of OS
• Basically OS performs tasks, e.g. it identifying
input from input devices and sending output to
the output devices
• Keeping track of files and directories on the disk
• Controlling peripheral devices such as printers,
scanners, audio mixer.
• OS allocates memory to user program as per
their need .
• User programs interact with the other user
programs through devices like keyboard, mouse
and joy stick
Operating System Objectives
• Convenience
• Efficiency
• Ability to evolve
• The functions of an Operating System (OS) can be categorized into
several key areas, each essential for managing the computer's resources
and ensuring smooth operation. Here's an overview:
Process Management
• Process Scheduling: Handles execution of
processes, ensuring fair allocation of CPU time.
• Key Features:
• Simple interface and limited multitasking.
• Key Features:
• Provides user accounts and permissions.
3. Examples:
1. Windows Desktop Environment.
Program execution
• The system must be able to load a program into
memory and to run that program, end
execution, either normally or abnormally
(indicating error)
2. File Allocation:
1. Allocates disk space for files efficiently, managing
fragmentation and ensuring reliability.
2. Supports various allocation methods (e.g.,
contiguous, linked, indexed).
Communication
• operating system facilitates the exchange
of information between processes, either
on the same system or across different
systems connected by a network.
2. .
Services Provided by the OS
• Accounting
– Collect usage statistics
– Monitor performance
– Used for billing purposes
A View of Operating System Services
Operating System Structures
• The structure of an operating system defines
how its components are organized and interact
to perform core tasks such as process
management, memory management, file
handling, and device control.
• Description:
• The OS is split into a client (user-level processes) and
server (kernel or other system processes).
• The client requests services, and the server provides
them.
• Advantages:
• Good fault isolation.
• Modular and scalable.
• Disadvantages:
• Communication overhead between clients and
servers.
• Examples:
• Distributed systems
Comparison of OS Structures
Advantages:
•High reliability and modularity.
•Easier to extend or update.
Disadvantages:
•Slower performance due to frequent context switching
and message passing.
Shell
• A shell in Linux is a command-line interpreter that provides
a user interface for interacting with the operating system.
2. Zsh (Z Shell)
1. Popular among developers for its customizability.
2. Supports advanced features like enhanced tab
completion and themes.
1. Ksh (Korn Shell)
1. Combines features of the Bourne shell and C shell.
2. Known for robust scripting capabilities.
2. Fish (Friendly Interactive Shell)
1. Designed for user-friendliness.
2. Colorful syntax highlighting.
3. Offers suggestions based on command history.
3. Tcsh (TENEX C Shell)
1. Enhanced version of the C shell (csh).
2. Popular for its scripting and programming-style
syntax.
System calls
• System calls are interfaces provided by the operating system
kernel that allow user-space applications to request services
or interact directly with hardware resources.