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

25
Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

Post on 20-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

Wednesday, June 07, 2006

“Unix is user friendly …

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

- Anonymous

Page 2: 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

Page 3: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

Page 4: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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)

Page 5: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

Unix A multi-user, time-sharing

operating system. It can have many users logged

into a system simultaneously, each running many programs.

Page 6: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

Unix Command based interface Al most all UNIX systems support a

windowing system as well X-Windows Developed at MIT

Page 7: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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).

Page 8: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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.

Page 9: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

IBM Linux-based wrist watch.

Page 10: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

Page 11: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

file service etc. UNIX, Windows Server, LINUX

Page 12: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

storage system at the Media Lab at MIT

Page 13: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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 …

Page 14: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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?

Page 15: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

Programmed I/O

Con: Busy waiting

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

Ways to do I/O

Page 16: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

Page 17: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

Page 18: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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.

Page 19: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

Direct Memory Access (DMA)

Ways to do I/O

Page 20: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

Page 21: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

Page 22: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

Page 23: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

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

Page 24: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous

Memory

On chip cache

Optical disks, EEPROM, flash RAM

Page 25: Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous