Chapter1 Introduction
Chapter1 Introduction
PARUL JAIN
What is an Operating System ?
OS goals:
Control/execute user/application programs.
Make the computer system convenient to use.
Ease the solving of user problems.
Use the computer hardware in an efficient manner.
OS Services :
An Operating System provides services to both the
users and to the programs.
Program execution
I/O operations
File System manipulation
Communication
Error Detection
Resource Allocation
Protection
Program Execution :
Serial processing.
Simple Batch System.
Multi-programmed batch system.
Time sharing system.
Serial processing :
• No operating system
• Programmers directly interacted with the hardware
Disadvantages
A job could enter an infinite loop.
Multi-programmed systems-
• In batch system, a job needs any I/O operation , it
starts performing it .
• Till then, processor is idle .
• This is case when single program is present in the
memory called as Uni-programming.
•This is inefficient, as memory is available suppose to hold
more programs plus monitor.
•When one job needs to wait for I/O, the processor can switch to the
other job. This approach is called multiprogramming or
multitasking.
Time sharing Systems-
It is a logical extension of multiprogramming.
Jobs are switched by CPU.
CPU executes multiple jobs by switching among them.
Time sharing system enables many people. The main
objective of multiprogramming system and time sharing
system are maximize CPU utilization and minimize
response time respectively.
Basic Concepts
Process:
• Process is basically program in execution.
• It consists of :
1) Executable code
2) Program’s data
3) Program’s stack
4) Program counter
5) List of files
6) Other registers
• Each process is characterized by information
stored in Process Control Block (PCB)
Basic Concepts :
Files:
• File is collection of data .
• Way of grouping of files is called as directory
• Top directory in directory hierarchy is called as root
directory.
• Every file within directory hierarchy can be specified
by giving its Pathname
Basic Concepts
System Calls:
• User programs communicate with operating system
and request services from OS by making System Calls.
• Ex:
Read one file and to copy them to another
file.
Shell
• It is a command interpreter.
• Accepts commands through shell prompt:
Ex:
1) Monolithic Structure
2) Layered Structure
Operating System structure:
• Monolithic structure:
1) No specific structure.
2) OS is a collection of procedures and
subprocedures.
3) OS provides system calls.
4) Special trap instruction known as Kernel Call or
Supervisor call.
Basic Concepts
Operating System structure:
• Monolithic structure:
User program n
User program 1
Index
table
Service
procedure
Operating System structure:
• Monolithic structure with respect to procedures:
Basic Concepts
Operating System structure:
• Layered structure:
1) This OS structure has 6 layers:
5 The Operator
4 User Programs
3 Input/output Management
2 Operator – process communication
1 Memory and drum Management
0 Processor allocation and Multiprogramming