Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Introduction to os ,types of operating system, Essays (university) of Operating Systems

Everything about operating system

Typology: Essays (university)

2017/2018

Uploaded on 10/22/2018

Saloni-bansal
Saloni-bansal 🇮🇳

1 document

1 / 168

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Operating Systems
Steven Hand
Michaelmas Term 2010
12 lectures for CST IA
Operating Systems N/H/MWF@12
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Introduction to os ,types of operating system and more Essays (university) Operating Systems in PDF only on Docsity!

Operating Systems

Steven Hand

12 lectures for CST IA^ Michaelmas Term 2010

Operating Systems — N/H/MWF@

  • Course Aims
  • This course aims to:

explain the structure and functions of an operating system,

illustrate key operating system aspects by concrete example, and

prepare you for future courses...

  • At the end of the course you should be able to:

compare and contrast CPU scheduling algorithms

explain the following: process, address space, file.

distinguish paged and segmented virtual memory.

discuss the relative merits of Unix and NT...

Operating Systems — Aims

i

  • Recommended Reading

Concurrent Systems

or

Operating Systems

Bacon J [ and Harris T ], Addison Wesley 1997 [2003]

Silberschatz A, Peterson J and Galvin P, Addison Wesley 1998.Operating Systems Concepts (5th Ed.)

Leffler S J, Addison Wesley 1989SystemThe Design and Implementation of the 4.3BSD UNIX Operating

Inside Windows 2000 (3rd Ed)

or

Windows Internals (4th Ed)

Solomon D and Russinovich M, Microsoft Press 2000 [2005]

Operating Systems — Books

iii

  • What is an Operating System?

(applications).A program which controls the execution of all other programs

Acts as an intermediary between the user(s) and the computer.

  • Objectives:

convenience,

efficiency,

extensibility.

Similar to a government...

Operating Systems — Introduction

1

  • In The Beginning...

1949: First stored-program machine (EDSAC)

to

1955: “Open Shop”.

large machines with vacuum tubes.

I/O by paper tape / punch cards.

user = programmer = operator.

To reduce cost, hire an

operator

programmers write programs and submit tape/cards to operator.

operator feeds cards, collects output from printer.

Management like it.

Programmers hate it.

Operators hate it.

need something better.

Operating Systems — Evolution

3

  • Batch Systems

Introduction of tape drives allow

batching

of jobs:

programmers put jobs on cards as before.

all cards read onto a tape.

operator carries input tape to computer.

results written to output tape.

output tape taken to printer.

Computer now has a

resident monitor

initially control is in monitor.

monitor reads job and transfer control.

at end of job, control transfers back to monitor.

Even better:

spooling systems

use interrupt driven I/O.

use magnetic disk to cache input tape.

fire operator.

Monitor now

schedules

jobs...

Operating Systems — Evolution

4

  • Today and Tomorrow
  • Single user systems: cheap and cheerful.

personal computers.

no other users

ignore protection.

e.g. DOS, Windows, Win 95/98,...

  • RT Systems: power is nothing without control.

hard-real time: nuclear reactor safety monitor.

soft-real time: mp3 player.

  • Parallel Processing: the need for speed.

SMP: 2–8 processors in a box.

MIMD: super-computing.

  • Distributed computing: global processing?

Java: the network is the computer.

Clustering: the network is the bus.

CORBA: the computer is the network.

.NET: the network is an enabling framework...

Operating Systems — Evolution

6

Monolithic Operating Systems

H/WS/W

App.

App.

App.

Scheduler

Device Driver

Device Driver

App.

Oldest kind of OS structure (“modern” examples are DOS, original MacOS)

  • Problem: applications can e.g.

trash OS software.

trash another application.

hoard CPU time.

abuse I/O devices.

etc...

No good for fault containment (or multi-user).

Need a better solution...

Operating Systems — Structures & Protection Mechanisms

7

  • Protecting I/O & Memory
  • First try: make I/O instructions privileged.

applications can’t mask interrupts.

applications can’t control I/O devices.

  1. Some devices accessed via1. Application can rewrite interrupt vectors.But:

memory

Hence need to protect memory also, e.g. define

base

and

limit

for each program:

Operating System Job

1

Job

2

Job

3

Job

4

0x00000x30000x50000x98000xD8000xFFFF

0x50000x

base register limit register

Accesses outside allowed range are protected.

Operating Systems — Structures & Protection Mechanisms

9

Memory Protection Hardware

CPU

vector to OS (address error)

yes

no

yes

no

base

base+limit

Memory

Hardware checks every memory reference.

Access out of range

vector into operating system (just as for an interrupt).

Only allow

update

of base and limit registers in kernel mode.

Typically disable memory protection in kernel mode (although a bad idea).

  • In reality, more complex protection h/w used:

main schemes are

segmentation

and

paging

(covered later on in course)

Operating Systems — Structures & Protection Mechanisms

10

Kernel-Based Operating Systems

H/WS/W

App.

PrivUnpriv

App.

App.

App.

Kernel

Scheduler

Device Driver

Device Driver

System Calls

File System

Protocol Code

Applications can’t do I/O due to protection

operating system does it on their behalf.

Need secure way for application to invoke operating system:

kernel mode.require a special (unprivileged) instruction to allow transition from user to

Generally called a

software interrupt

since operates similarly to a real (hardware)

interrupt...

Set of OS services accessible via software interrupt mechanism called

system calls

Operating Systems — Structures & Protection Mechanisms

12

Microkernel Operating Systems

H/WS/W

App.

PrivUnpriv

Server

DriverDevice

Server

Server

App.

App.

App.

Kernel

Scheduler

Driver^ Device

  • Alternative structure:

push some OS services into

servers

servers may be privileged (i.e. operate in kernel mode).

Increases both

modularity

and

extensibility

Still access kernel via system calls, but need new way to access servers:

interprocess communication (IPC) schemes.

Operating Systems — Structures & Protection Mechanisms

13

  • Operating System Functions

Regardless of structure, OS needs to

securely multiplex resources

2. share physical resources between them.1. protect applications from each other, yet

Also usually want to

abstract

away from grungy harware, i.e. OS

provides a

virtual machine

share CPU (in time) and provide each app with a

virtual processor

ownallocate and protect memory, and provide applications with their

virtual address space

present a set of (relatively) hardware independent

virtual devices

divide up storage space by using

filing systems

, and

do all this within the context of a

security framework

areas in turn.. .Remainder of this part of the course will look at each of the above

Operating Systems — Functions

15

  • Process Concept
  • From a user’s point of view, the operating system is there to execute programs:

on batch system, refer to

jobs

on interactive system, refer to

processes

(we’ll use both terms fairly interchangeably)

Process

Program:

a program is

static

, while a process is

dynamic

in fact, a process

a program in execution

(Note: “program” here is pretty low level, i.e. native machine code or

executable

  1. Process includes:

program counter

stack

data section

Processes execute on

virtual processors

Operating Systems — Processes

16