You are on page 1of 14

OPERATING

SYSTEMS
INTRODUCTION

 A computer is usually managed by a supervisory program called


operating system, which provides a uniform software interface for
other system programs and for application programs.
 In multiuser environments the operating system controls such
shared resources as CPU, time, memory_space, IO devices utility
programs and databases.
 Programs use a computer’s resources in various and
often unpredictable ways.
 For example, programs often alternate between
computations that use the CPU and IO operations that
use IOPs and peripheral devices but do not require the
CPU.
 The scheduling of CPU and IO processing is a typical
function of an operating system.
 Another important shared resources is memory, both
main and secondary, whose management is also a
typically an operating system task.
 Several types of operating system have evolved over the
year.
 The earliest system control programs were mainly
concerned with reducing the time required for IO
operations involving user programs.
 Current operating systems have their origins in several
influential systems developed in 1960s, such as IBM’s
OS/360,which became a de facto standard for
mainframe computers.
 Early work at Manchester University(Atlas),MIT(Multics)
was developed at Bell Laboratories in the mid-1970sand
now in wide use, especially in workstations.
OS PROCESSES
❖ Basic unit of computing-managed by operating system.

❖ Is a program module in the course of execution.

❖ Resources needed by it(including processors and memory space) are

allocated to it dynamically during execution.


❖ Examples: (1) Procedure executed by CPU

(2) IO program executed by IOP


❖ Can be created by other processes such as Response to interrupts or

response by user command.


❖ When no longer needed, a process is deleted(but not the underlying program)
by the OS and the resources currently allocated are released.
❖ While in existence, a process has three major states:
➢ Ready
➢ Running
➢ Blocked
❖ Ready state: A process is waiting with other processes, in a queue, for the
resources that it needs to enter the running or active state.
❖ Blocked state: Waiting for some event to occur, such as completion of other
process that it provides with input data.
 A transition from one process state to another is triggered by conditions such
as interrupts and user instructions to the OS.
Above diagram represents the typical user process P with an
independent IOP.

It is assumed that P runs on the CPU until IO instruction is


encountered, i.e. the point at which the operating system changes P
from running to blocked.

P can also be terminated by a timer-generated interrupt, which the


OS uses to limit the amount of time that any one process is assigned
to the IOP.

In this case P is returned to the ready state, where it remains until re-
scheduled for execution.
 A new process P’ can be created on an IOP and carry out the
required IO operation.

 Completion of P’ results in an IO interrupt that causes the CPU


to transfer from blocked to ready.

 Then P’ can be deleted if it is no longer needed.

 As soon as CPU is available to execute P, P is transferred once


more to the running state.

 It continues running until it encounters another IO instruction


and completes execution.

 In the last case a call is made to the operating system which


can delete P after it’s execution.
KERNEL
Operating system comprises
Resource management programs-Processor scheduling routines
Virtual memory management routines
IO device control programs
Compilers, text editors

Contains more software than can fit in main memory

Part of an OS resides more or less continuously in main memory & consists of


its most frequently used parts is termed the kernel or nucleus.

Less frequently used parts like file management routines in secondary


memory & tranfer to main memory when needed.
Responsible for the creation, deletion and state switching of many processes
defining a computer’s behaviour.

Performs its tasks by responding to a steady flow of interrupt requests.

Sources for requests-user generated, CPU generated process timeouts ,


memory faults, IO operations ,h/w or s/w errors.

Rapid response-disables other interrupts while responding to current one or if


necessary creates a system process to execute the appropriate interrupt
handling route.

Performance and reliability-improved by implementing more basic functions in


h/w or firmware.
PCB-PROCESS CONTROL BLOCK
Fig1.1:PCB FOR VMS Operating
system
PCB FOR VMS OS
PSW stores CPU status(flag) bits and interrupt priority level of the process.

Last entries specify the base address and length of two page tables-user
program and user stack.

Page tables play an essential role in the firmware implemented address


mapping that manages VAX’s virtual memory.

Two VAX instructions-SVPCTX(save process context) & LDPCTX(load process


context) support context switching by transferring the complete PCB to and
from memory respectively.

You might also like