wednesday, june 07, 2006 “unix is user friendly … it’s just picky about it’s friends”. -...

Post on 20-Dec-2015

213 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Wednesday, June 07, 2006

“Unix is user friendly …

it’s just picky about it’s friends”.

- Anonymous

Course URL

http://suraj.lums.edu.pk/~cs381m05

Folder on indus\\indus\Common\cs381m05

Read course policies on the website!

CS 381 : Operating Systems

Some design issuesI/O SpaceSpecial IN/OUT instructions (use of assembly

code)Calling procedure adds overhead to I/OMemory mapped

Con: Uses up some memory space Caching of device registers should not be done! Multiple busesPro No extra protection needed to keep user processes

from doing I/O

Unix Initial project turned into multimillion

dollar industry involving universities, government organizations, multinational corporations.

Late 1980s … AT&T (System V) and UC, Berkeley,

(BSD) incompatible versions IEEE standard for UNIX

• POSIX (defines minimal system call interface)

Unix A multi-user, time-sharing

operating system. It can have many users logged

into a system simultaneously, each running many programs.

Unix Command based interface Al most all UNIX systems support a

windowing system as well X-Windows Developed at MIT

Linux Underlying structure common to

UNIX Versions subsequent to MS-DOS

included many advanced features taken from UNIX.

Our discussion shall apply to different versions/clones of UNIX like BSD, System V, Linux etc. (Sun Solaris has its own variant of UNIX).

Linux

Linux availability across a wide spectrum of platforms

Distributions implemented on 64-bit architecture processors.

Large enterprise servers Medium sized and small servers, workstations Desktops Laptops Small intelligent devices.

IBM Linux-based wrist watch.

Mainframe Operating Systems Major organizations Huge I/O capacity Batch

Processes not requiring user interaction• (payroll processing, sales reporting …)

Transaction Processing Small requests e.g. bank system, airline

systems Time Sharing

large number of remote usersExample: OS/390

Server Operating Systems Major organizations High end web-servers, commerce sites,

file service etc. UNIX, Windows Server, LINUX

Speechome Project, MIT Massive petabyte (one million gigabyte) disk

storage system at the Media Lab at MIT

Multiprocessor Operating Systems Real Time Operating Systems Embedded Operating Systems

Simple OS: One program, one user, one machine

Examples: embedded controllers such as nintendo, cars, elevators, cellphones …

Programmed I/O User program makes a system call That is translated into a procedure call for

the relevant device driver Device driver starts I/O and keeps polling

the device to see if it is done (device busy status check).

When device is done it puts the data where needed.

OS returns control to user program

Ways to do I/O

Disadvantage?

Programmed I/O

Con: Busy waiting

Tying up CPU until I/O is done Busy waiting is inefficient

Ways to do I/O

Programmed I/O

Con:Busy waiting

Tying up CPU until I/O is done Busy waiting is inefficient

Pro: Easy to implement

Embedded systems

Ways to do I/O

Interrupt Driven I/O Driver starts the device and asks it to give it

an interrupt when it is done.

Ways to do I/O

Interrupt Driven I/O

For example: Read from Disk

•Interrupt signal causes the CPU to stop what it is doing and use the interrupt number to start a interrupt service handler

•When the handler is done control is returned to previously running user program

Information of interrupted program is saved before hand.

Direct Memory Access (DMA)

Ways to do I/O

BIOS (Basic Input Output System) is a program that resides on the motherboard.

Can read from keyboard, write to disk, write to screen etc.

BIOS

Checks how much memory is installed, keyboard etc installed or not.

Scans buses and detects devices. Determines boot device from the list

stored in CMOS memory.

BIOS

First sector from boot device is read into memory and executed.

This gives information about which partition is active. From there a boot loader is read which loads the OS

The OS queries the BIOS to get configuration information and checks if each device has a device driver

One all device drivers founds loads them in kernel starts login program.

BIOS

First sector from boot device is read into memory and executed.

This gives information about which partition is active. From there a boot loader is read which loads the OS

The OS queries the BIOS to get configuration information and checks if each device has a device driver

One all device drivers founds loads them in kernel starts login program.

BIOS

Memory

On chip cache

Optical disks, EEPROM, flash RAM

top related