Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Chapter 1 : OS

Introduction

what is an operating system?


a program that acts as an intermediary between computer
hardware and a computer user
they are designed to be efficient, convenient or both

what do operating systems do?


first, it is important to understand that computer system
consists of 4 basic components

1. hardware : CPU, memory, I/O devices etc which provide the


basic computing resources for the system

2. application programs : word processors, spreadsheets,


compilers, web browsers etc which define the ways in which
these computing resources will be used to solve user’s
computing problems

3. operating system : intermediary program which controls and


coordinates the use of computing hardware among various
applications and users

4. users : people, machines and other computers

the function of OS depends on the pov - whether it is user


view or system view

user view
ONE COMPUTER

most users want convenience, ease of use and good


performance

Chapter 1 : OS Introduction 1
they don’t care about resource utilisation

SHARED COMPUTERS

user sitting at a terminal connected to a mainframe or a


minicomputer

sharing of resources or information exchange

here OS is designed to maximise resource utilisation

WORKSTATIONS

users sit at workstations connected to networks of other


workstations and servers

these users have dedicated resources at their disposal but


also share resources such as networking and servers

their OS is designed to compromise between individual


usability and resource utilisation

HANDHELD COMPUTERS

standalone units for individual users

their OS is designed mainly keeping in mind individual


usability and performance per unit battery life

EMBEDDED COMPUTERS

they have little or no user view like in automobiles or


home devices

their OS is designed to run without user intervention

system view

OS acts in two ways

1. resource allocator :
* system has many resources that can solve a problem
* OS acts as manager of these resources
* when there are conflicting requests for resources, OS
decides how to allocate them to specific programs and
users to ensure that computer system operates
efficiently and fairly

Chapter 1 : OS Introduction 2
2. control program :
* manages the execution of user programs to prevent
errors and improper use of the computer
* especially concerned with the operation and control of
I/O devices

redefining OS

no universally accepted definition of OS

it is the one program that is running at all times on the


computer - called the kernel

NOTE : there are two other types of programs - SYSTEM PROGRAMS


(associated with OS but not part of kernel) and APPLICATION
PROGRAMS (not associated with OS)

computer system operation

BOOTSTRAP PROGRAM

what is bootstrap program

for a computer to start running, it is powered up or


rebooted and needs to have an initial program to run. this
is called a bootstrap program

where is it stored

it is stored in ROM or EEPROM (firmware) within the


computer hardware

what does it do?

it initialises all aspects of system

how does it do this?

must know how to load OS and how to start executing the


system

Chapter 1 : OS Introduction 3
for this, bootstrap program must locate and load into
memory the OS kernel

OS will start executing first process, “init” and then


waits for some event to occur

INTERRUPT

occurrence of event is signalled by “interrupt” from either


hardware or software

hardware triggers interrupt to CPU by the way of system bus

software triggers interrupt by executing special operation


called system call/monitor call

what happens when CPU is interrupted

when CPU is interrupted, it stops what it is doing and


transfers execution to a fixed location

fixed location contains starting address where service


routine for interrupt is located

interrupt service routine executes

on completion, CPU resumes the interrupted computation

functions of interrupt

interrupt must transfer control to the appropriate


interrupt service routine

straightforward method: invoke a generic routine to


examine the interrupt information

routine would call interrupt specific handler

but interrupts have to be handled quickly and only a


predefined number of interrupts is possible

better method: use a table of pointers to interrupt


routines - provides speed

Chapter 1 : OS Introduction 4
interrupt routine will be called indirectly through
table with no intermediate routine needed

table of pointers is stored in low memory

these locations store addresses of interrupt service


routines for various devices

this array or INTERRUPT VECTOR of addresses is


indexed by a unique device number given by interrupt
request to provide the address of the interrupt
service routine for the interrupting device

OPERATING SYSTEM STRUCTURE

OS provides environment within which programs are executed

ability to multiprogram

MULTIPROGRAMMING

single program cannot keep either the CPU or I/O devices


busy at all times

single users have multiple programs running

MULTIPROGRAMMING - increases CPU utilisation by organising


jobs so that CPU always has one to execute

OS keeps several jobs in memory simultaneously

main memory is too small to accommodate all jobs so jobs


are kept on the disk in the job pool

pool consists of all processes residing on the disk


awaiting allocation of main memory

set of jobs in memory can be a subset of jobs in job pool

OS picks and begins to execute one of the jobs in the


memory

Chapter 1 : OS Introduction 5
job may have to wait for some task such as I/O operation to
complete

provide for effective resource utilisation but do not


provide for user interaction with computer system

time sharing/ multitasking - logical extension of


multiprogramming
CPU executes multiple jobs by switching among them but
switches occur so frequently that users can interact with
each program while it is running

time sharing requires hands on/ interactive computer system


for direct communication between user and system
user gives instructions to OS or program directly using
input device and waits for immediate result on output
device
response time should be short

time shared OS allows many users to share computer


simultaneously
each action or command is short - only little CPU time is
needed for each user
system switches rapidly from one user to next, each user is
given the impression that entire system is dedicated to his
use only

time shared OS uses CPU scheduling and multiprogramming to


provide each user with a small portion of time shared
computer

each user has at least 1 separate program in memory

PROCESS - program loaded into memory and executing

Chapter 1 : OS Introduction 6

You might also like