Operating Systems 21CS44
BCS303
COURSE NAME: OPERATING SYSTEMS
COURSE CODE: 21CS44
BCS303
SEMESTER: 43rd Semester 2022 scheme
MODULE: 1
NUMBER OF HOURS: 08
CONTENTS:
❖ Introduction to operating systems:
• What operating systems do?
m
• Computer System organization
Computer System architecture
o
•
• Operating System structure
c
• Operating System operations
.
• Process management
e
• Memory management
• Storage management
d
• Protection and Security
o
• Distributed system
• Special-purpose systems
c
• Computing environments.
tu
❖ Operating-System Structures:
• Operating System Services;
User - Operating System interface
v
•
• System calls
• Types of system calls
• System programs
• Operating system design and implementation
• Operating System structure
• Virtual machines
• Operating System generation
• System boot.
❖ Process Management:
• Process concept
• Process scheduling
• Operations on processes
• Inter process communication
1
, Operating Systems 21CS44
BCS303
MODULE 1
INTRODUCTION TO OPERATING SYSTEM
What is an Operating System?
An operating system is system software that acts as an intermediary between a user of a
computer and the computer hardware. It is software that manages the computer hardware and
allows the user to execute programs in a convenient and efficient manner.
Operating system goals:
• Make the computer system convenient to use. It hides the difficulty in managing the
m
hardware.
• Use the computer hardware in an efficient manner
• Provide and environment in which user can easily interface with computer.
o
• It is a resource allocator
. c
Computer System Structure (Components of Computer System)
e
Computer system mainly consists of four components-
d
• Hardware – provides basic computing resources CPU, memory, I/O devices
• Operating system - Controls and coordinates use of hardware among various applications and
o
users
• Application programs – define the ways in which the system resources are used to solve
c
the computing problems of the users, Word processors, compilers, web browsers,
database systems, video games
tu
• Users - People, machines, other computers
v
2
, Operating Systems 21CS44
BCS303
List out the User Views and System views of OS
Operating System can be viewed from two viewpoints– User views & System views
User Views: -The user’s view of the operating system depends on the type of user.
• If the user is using standalone system, then OS is designed for ease of use and high
performances. Here resource utilization is not given importance.
• If the users are at different terminals connected to a mainframe or minicomputers, by sharing
information and resources, then the OS is designed to maximize resource utilization. OS is
designed such that the CPU time, memory and i/o are used efficiently and no single user takes
more than the resource allotted to them.
•
m
If the users are in workstations, connected to networks and servers, then the user have a
system unit of their own and shares resources and files with other systems. Here the OS
o
is designed for both ease of use and resource availability (files).
c
• Other systems like embedded systems used in home device (like washing m/c) &
.
automobiles do not have any user interaction. There are some LEDs to show the status of
its work
e
• Users of hand-held systems, expects the OS to be designed for ease of use and performance
d
per amount of battery life
o
System Views: - Operating system can be viewed as a resource allocator and control program.
c
• Resource allocator – The OS acts as a manager of hardware and software resources.
CPU time, memory space, file-storage space, I/O devices, shared files etc. are the
tu
different resources required during execution of a program. There can be conflicting
request for these resources by different programs running in same system. The OS
assigns the resources to the requesting program depending on the priority.
v
• Control Program – The OS is a control program and manage the execution of user
program to prevent errors and improper use of the computer.
Computer System Organization
Computer - system operation
One or more CPUs, device controllers connect through common bus providing access to
shared memory. Each device controller is in-charge of a specific type of device. To ensure
orderly access to the shared memory, a memory controller is provided whose function is to
synchronize access to the memory. The CPU and other devices execute concurrently
competing for memory cycles. Concurrent execution of CPUs and devices competing for
memory cycles
3
, Operating Systems 21CS44
BCS303
• When system is switched on, ‘Bootstrap’ program is executed. It is the initial program to
run in the system. This program is stored in read-only memory (ROM) or in electrically
m
erasable programmable read-only memory (EEPROM).
• It initializes the CPU registers, memory, device controllers and other initial setups. The
o
program also locates and loads, the OS kernel to the memory. Then the OS starts with the
c
first process to be executed (ie. ‘init’ process) and then wait for the interrupt from the
.
user.
e
Switch on ‘Bootstrap’ program
• Initializes the registers, memory and I/O devices
d
• Locates & loads kernel into memory
• Starts with ‘init’ process
o
• Waits for interrupt from user.
c
Interrupt handling –
tu
• The occurrence of an event is usually signaled by an interrupt. The interrupt can either be from
the hardware or the software. Hardware may trigger an interrupt at any time by sending a
signal to the CPU. Software triggers an interrupt by executing a special operation called a
v
system call (also called a monitor call).
• When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a
fixed location. The fixed location (Interrupt Vector Table) contains the starting address where
the service routine for the interrupt is located. After the execution of interrupt service routine,
the CPU resumes the interrupted computation.
• Interrupts are an important part of computer architecture. Each computer design has its own
interrupt mechanism, but several functions are common. The interrupt must transfer control to
the appropriate interrupt service routine
4
BCS303
COURSE NAME: OPERATING SYSTEMS
COURSE CODE: 21CS44
BCS303
SEMESTER: 43rd Semester 2022 scheme
MODULE: 1
NUMBER OF HOURS: 08
CONTENTS:
❖ Introduction to operating systems:
• What operating systems do?
m
• Computer System organization
Computer System architecture
o
•
• Operating System structure
c
• Operating System operations
.
• Process management
e
• Memory management
• Storage management
d
• Protection and Security
o
• Distributed system
• Special-purpose systems
c
• Computing environments.
tu
❖ Operating-System Structures:
• Operating System Services;
User - Operating System interface
v
•
• System calls
• Types of system calls
• System programs
• Operating system design and implementation
• Operating System structure
• Virtual machines
• Operating System generation
• System boot.
❖ Process Management:
• Process concept
• Process scheduling
• Operations on processes
• Inter process communication
1
, Operating Systems 21CS44
BCS303
MODULE 1
INTRODUCTION TO OPERATING SYSTEM
What is an Operating System?
An operating system is system software that acts as an intermediary between a user of a
computer and the computer hardware. It is software that manages the computer hardware and
allows the user to execute programs in a convenient and efficient manner.
Operating system goals:
• Make the computer system convenient to use. It hides the difficulty in managing the
m
hardware.
• Use the computer hardware in an efficient manner
• Provide and environment in which user can easily interface with computer.
o
• It is a resource allocator
. c
Computer System Structure (Components of Computer System)
e
Computer system mainly consists of four components-
d
• Hardware – provides basic computing resources CPU, memory, I/O devices
• Operating system - Controls and coordinates use of hardware among various applications and
o
users
• Application programs – define the ways in which the system resources are used to solve
c
the computing problems of the users, Word processors, compilers, web browsers,
database systems, video games
tu
• Users - People, machines, other computers
v
2
, Operating Systems 21CS44
BCS303
List out the User Views and System views of OS
Operating System can be viewed from two viewpoints– User views & System views
User Views: -The user’s view of the operating system depends on the type of user.
• If the user is using standalone system, then OS is designed for ease of use and high
performances. Here resource utilization is not given importance.
• If the users are at different terminals connected to a mainframe or minicomputers, by sharing
information and resources, then the OS is designed to maximize resource utilization. OS is
designed such that the CPU time, memory and i/o are used efficiently and no single user takes
more than the resource allotted to them.
•
m
If the users are in workstations, connected to networks and servers, then the user have a
system unit of their own and shares resources and files with other systems. Here the OS
o
is designed for both ease of use and resource availability (files).
c
• Other systems like embedded systems used in home device (like washing m/c) &
.
automobiles do not have any user interaction. There are some LEDs to show the status of
its work
e
• Users of hand-held systems, expects the OS to be designed for ease of use and performance
d
per amount of battery life
o
System Views: - Operating system can be viewed as a resource allocator and control program.
c
• Resource allocator – The OS acts as a manager of hardware and software resources.
CPU time, memory space, file-storage space, I/O devices, shared files etc. are the
tu
different resources required during execution of a program. There can be conflicting
request for these resources by different programs running in same system. The OS
assigns the resources to the requesting program depending on the priority.
v
• Control Program – The OS is a control program and manage the execution of user
program to prevent errors and improper use of the computer.
Computer System Organization
Computer - system operation
One or more CPUs, device controllers connect through common bus providing access to
shared memory. Each device controller is in-charge of a specific type of device. To ensure
orderly access to the shared memory, a memory controller is provided whose function is to
synchronize access to the memory. The CPU and other devices execute concurrently
competing for memory cycles. Concurrent execution of CPUs and devices competing for
memory cycles
3
, Operating Systems 21CS44
BCS303
• When system is switched on, ‘Bootstrap’ program is executed. It is the initial program to
run in the system. This program is stored in read-only memory (ROM) or in electrically
m
erasable programmable read-only memory (EEPROM).
• It initializes the CPU registers, memory, device controllers and other initial setups. The
o
program also locates and loads, the OS kernel to the memory. Then the OS starts with the
c
first process to be executed (ie. ‘init’ process) and then wait for the interrupt from the
.
user.
e
Switch on ‘Bootstrap’ program
• Initializes the registers, memory and I/O devices
d
• Locates & loads kernel into memory
• Starts with ‘init’ process
o
• Waits for interrupt from user.
c
Interrupt handling –
tu
• The occurrence of an event is usually signaled by an interrupt. The interrupt can either be from
the hardware or the software. Hardware may trigger an interrupt at any time by sending a
signal to the CPU. Software triggers an interrupt by executing a special operation called a
v
system call (also called a monitor call).
• When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a
fixed location. The fixed location (Interrupt Vector Table) contains the starting address where
the service routine for the interrupt is located. After the execution of interrupt service routine,
the CPU resumes the interrupted computation.
• Interrupts are an important part of computer architecture. Each computer design has its own
interrupt mechanism, but several functions are common. The interrupt must transfer control to
the appropriate interrupt service routine
4