What is an operating system? "Peterson and Silbershatz" - - PowerPoint PPT Presentation

what is an operating system
SMART_READER_LITE
LIVE PREVIEW

What is an operating system? "Peterson and Silbershatz" - - PowerPoint PPT Presentation

Operating Systems slide 1 gaius What is an operating system? "Peterson and Silbershatz" "We can view an operating system as a resource allocator. A computer system has many resources (hardware and software) that may be required


slide-1
SLIDE 1

Operating Systems slide 1 gaius

What is an operating system?

"Peterson and Silbershatz" "We can view an operating system as a resource allocator. A computer system has many resources (hardware and software) that may be required to solve a problem: CPU time, memory space, file storage space, I/O devices, and so on. The operating system acts as the manager of these resources and allocates them to specific programs and users as necessary for their

  • tasks. Since there may be many, possibly conflicting requests for

resources, the operating system must decide which requests are allocated resources to operate the computer system efficiently and fairly."

slide-2
SLIDE 2

Operating Systems slide 2 gaius

Windows NT

many elements influenced the design of Windows NT it provides the same type of GUI found in the earlier Windows products including the use of windows pull down menus point and click interaction

slide-3
SLIDE 3

Operating Systems slide 3 gaius

NT components

internal interaction is inspired by the Mach operating system, which is in turn based on UNIX highly modular can execute on a variety of hardware platforms supports applications written for a variety of other operating systems as with virtually all operating systems, NT separates application

  • riented software from operating system software. (Kernel mode and

user mode)

slide-4
SLIDE 4

Operating Systems slide 4 gaius

Design goals of NT

like any commercial operating system, Windows NT is the result of a complex interaction between idealized goals and market-driven realities Compatibility it should support a wide range of existing software and legacy

  • hardware. (DOS, Windows 3.1 compatibility)

Robustness it should resist attacks of naive or malicious users, individual programs should be isolated from each other Portability it should run on a wide variety of current and future hardware platforms

slide-5
SLIDE 5
slide-6
SLIDE 6

Operating Systems slide 6 gaius

Design goals of NT

Extendibility it should be possible to add new features and support new I/O devices Performance it should give reasonable performance on commonly available

  • hardware. Take advantage of multiprocessing hardware
slide-7
SLIDE 7

Operating Systems slide 7 gaius

Major building blocks of NT

Overall architecture of the NT kernel mode components

slide-8
SLIDE 8

Operating Systems slide 8 gaius

Hardware abstraction layer

HAL is a thin layer of software that presents the rest of the system with an abstract model of any hardware that is not part of the CPU HAL exposes a well defined set of functions that manage such items as: Off chip caches Timers I/O buses Device registers Interrupt controllers DMA controllers various system components use these HAL functions to interact with CPU hardware HAL routines make the kernel and device drivers binary compatible across platforms with the same CPU architecture

slide-9
SLIDE 9
slide-10
SLIDE 10

Operating Systems slide 10 gaius

Kernel

consists of the most fundamental components of the operating system manages scheduling and context switching exception and interrupt handling multiprocessor synchronization Executive the most complex kernel mode component in Windows NT implement many of the basic functions normally associated with an operating system (Process manager, virtual memory manager, I/O manager, system call interface) the executive uses the HAL to interact with any CPU hardware

slide-11
SLIDE 11

Operating Systems slide 11 gaius

Layered device drivers in NT

the term driver normally refers to a piece of code that manages some peripheral or device NT takes a more flexible approach allows several driver layers to exist between an application program and hardware Device drivers manage actual data transfer and control operations for a specific type of physical device includes starting stopping I/O, handling interrupts and handling errors Intermediate drivers

slide-12
SLIDE 12

NT allows you to place any number of layers on top of a physical device driver intermediate layers provide a way of extending the capabilities of the I/O system without having to modify the drivers below them

slide-13
SLIDE 13

Operating Systems slide 13 gaius

Example: Fault tolerant disk driver

is implemented as a layer that sits between the file system and drivers for any physical disks. intermediate drivers separate hardware specific operations from more general management issues here the intermediate driver is referred to as a class driver and the hardware driver is called a port driver this structure makes it easier to target a wider range of hardware since only the port code needs to be rewritten

slide-14
SLIDE 14

Operating Systems slide 14 gaius

File system drivers (FSDs)

the following FSDs are supplied by Microsoft: Type Description FAT Windows 95 extended MSDOS file system NTFS Windows NT high reliability file system HPFS OS/2 high performance file system CSFS ISO 9660 CDROM file system MSFS Mailshot file system NPFS Named pipe file system RDR LAN Manager redirector unfortunately, you cannot develop file system drivers using the standard NT device driver kit also note the absence of NFS.

slide-15
SLIDE 15
slide-16
SLIDE 16

Operating Systems slide 16 gaius

Device driver

slide-17
SLIDE 17

Operating Systems slide 17 gaius

UNIX vs NT

NT available on other architectures Alpha, Mips, Power PC UNIX also available on other architectures, all of the above and more NT will run all Windows 3.1 software and MSDOS software UNIX may or may not depending on version, vendor generally unlikely

slide-18
SLIDE 18

Operating Systems slide 18 gaius

UNIX vs NT

both NT and UNIX (Solaris, Sequent) will operate with multiple processors both OSs have TCP/IP and associated utilities in different forms NT doesn’t hav e NFS though (which considered slow, but open!) nevertheless much research has been done to improve NFS performance both OSs support filesystems with long filenames NT will easily integrate with Novell, MACOS UNIX needs extra packages (eg samba) which has to be configured by an expert

slide-19
SLIDE 19

Operating Systems slide 19 gaius

UNIX vs NT

UNIX is still more flexible in resource sharing share any peripheral across the network all peripherals are as files, files can be on the network etc Windows NT NTFS is faster than NFS UNIX buffer cache is superior to NT thus it is not clear which OS will be faster! measure it! TCP/IP code is more mature than NT, witness problems in J111

slide-20
SLIDE 20

Operating Systems slide 20 gaius

UNIX vs NT

NT is much easier to manage NT is much easier to install NT is more tolerant of different hardware devices due to the HAL

slide-21
SLIDE 21

Operating Systems slide 21 gaius

Network Operating Systems (Unix)

UNIX started life as a research project within AT&T in 1970 since that time it has grown in popularity and functionality there are some excellent books available which describe UNIX Berny Goodheart & James Cox, "The magic garden explained", Prentice-Hall. Smoot Carl-Mitchell & John S. Quarterman, "Practical Internetworking with TCP/IP and UNIX", Addison Wesley. W.Richard Stevens, "UNIX Network Programming", Prentice-Hall.

slide-22
SLIDE 22

Operating Systems slide 22 gaius

UNIX networking history

the first networking functionality added to UNIX was UUCP (UNIX to UNIX copy) in 1976 provided a mechanism to transfer files from different UNIX machines which typically only had modem connectivity implemented was a batch-oriented system that was typically used between systems remote printing and email were added in the Berkeley release of the Version 7 UNIX for the PDP-11 (called 2.x BSD) (Berkeley Standard Distribution) TCP/IP was released in 1981 in the 4.1 BSD UNIX

slide-23
SLIDE 23

Operating Systems slide 23 gaius

Unix history

TCP/IP opened the flood gates for networked applications NFS - network file system remote job execution remote login, telnet, ftp, R tools talk remote procedure calls and XDR news client server computing

slide-24
SLIDE 24

Operating Systems slide 24 gaius

UNIX networking history

the Berkeley releases of UNIX 4.1 BSD and 4.2 BSD provided the first UNIX systems with widespread network support (1982-1983) many Computer Science departments started to buy more than one VAX with Ethernet cards and so created UNIX LANs April 1986 4.3 BSD was released June 1988 a revision of the 4.3 BSD referred to as the Tahoe distribution was meant to be an interim release for testing by experienced users importantly it contained source code which was not licensed by AT&T so you could legally use the source code for your own products reference software was available for TCP/IP & sockets

slide-25
SLIDE 25

Operating Systems slide 25 gaius

UNIX network services

rexd remote job execution daemon allows a user to say:

  • n floppsie gcc -g largeprogram.c

the on command makes the C compiler execute on a machine called floppsie all input/output has to be rerouted to floppsie in order that the compilation will work. telnet - the ability to login into another machine NFS - Network file system. RPC - Remote procedure call package (1984)

slide-26
SLIDE 26

normally uses the XDR facility and it is an interprocess communication mechanism that allows programmers to write client-server based applications

slide-27
SLIDE 27

Operating Systems slide 27 gaius

UNIX networking facilities

sockets - introduced in 1982 with 4.1 BSD. Another interprocess communication mechanism (low lev el) which allows one process to communicate with another process. These processes maybe on the same machine or on opposite sides of the

  • world. Sockets consist on five primitives: socket, bind, listen,

connect and accept today hundreds of client/servers use above primitives email (pop2, pop3, imap, smtp), news, R commands, lpd, nfs, ftp, telnet, news, finger, cvs, http

slide-28
SLIDE 28

Operating Systems slide 28 gaius

Networking examples

pop2 email client pop3 email client imap email server smtp email client news discussion groups R commands remote commands lpd networked printing nfs networked file system ftp file transfer protocol telnet remote login finger user description & profile cvs networked source code access http hypertext protocol

slide-29
SLIDE 29

Operating Systems slide 29 gaius

Networking examples

examine the file /etc/services for a full description

slide-30
SLIDE 30

Operating Systems slide 30 gaius

A typical UNIX network

UNIX is an open system many vendors: SUNOS, ULTRIX, AT&T UNIX SVr4, GNU/Linux, BSD386 some free! (Source code, compilers, debuggers, editors, network applications etc) its popularity in the early days was due in part to its no cost availability this has now turned full circle with the advent of GNU/Linux and BSD386

  • pen system as interfaces to applications, client/servers are published

important to note a major difference between UNIX and other

  • perating systems (Novell) is that clients and servers on UNIX look

almost identical

slide-31
SLIDE 31

possible that they are the same except for some files in /etc (configuration files)

Operating Systems slide 31 gaius

A typical UNIX network

client/server distinction occurs at the user level not the system level

slide-32
SLIDE 32

Operating Systems slide 32 gaius

A typical UNIX network

ethernet and IP workstation local disk workstation local disk local disk workstation

configuration is very flexible

slide-33
SLIDE 33

Operating Systems slide 33 gaius

Unix configuration

could be a disadvantage as system administrators have to fight their way through many different options for various components just to perform simple operations it is possible that all machines are configured identically (except for their hostname, IP address etc) could configure the network operating systems so that all local disks can be seen by all machines

slide-34
SLIDE 34

Operating Systems slide 34 gaius

A typical UNIX network

alternatively machines could be very different (ie could build distinct client/server model similar to Novell)

  • ne machine has the common file system
  • ne machine has the system executables
slide-35
SLIDE 35

Operating Systems slide 35 gaius

Disadvantages

complexity flexibility requires system administrators be disciplined otherwise

  • verall system may become unmanageable

when more machines are added harder to configure than other operating systems getting better (Solaris, GNU/Linux brands often use Gtk) but complexity still remains few graphical tools to identify installation errors however the problems are being addressed

slide-36
SLIDE 36

Operating Systems slide 36 gaius

NFS configuration example

can network file systems between different architectures little endian, big endian - it makes no difference NFS design is built from three main parts: a protocol, a server and a client

nfs protocol nfs server nfs client

slide-37
SLIDE 37

Operating Systems slide 37 gaius

NFS configuration example

components fit into the ISO-7 layer model Level 7 Application NFS Level 6 Presentation XDR Level 5 Session RPC Level 4 Transport TCP UDP Level 3 Network IP Level 2 Data Link Logical Level 1 Physical Link Ethernet

slide-38
SLIDE 38

Operating Systems slide 38 gaius

NFS example

suppose we have two machines

mcgreg floppsie include bin X386 usr home bin / home usr bin / fred

  • ur task is to allow machine floppsie see directory

/home/gmulley

Operating Systems

slide-39
SLIDE 39

slide 39 gaius

NFS example

tell floppsie where this directory resides edit /etc/fstab on floppsie and add the following line

mcgreg:/home /home/mcgreg nfs (remote fs mount point type mount options)

slide-40
SLIDE 40

Operating Systems slide 40 gaius

NFS example

need to tell machine mcgreg that /home is exported and that floppsie is allowed to see it edit /etc/exportfs on mcgreg and add the following line /home 193.63.128.0/255.255.255.0(rw) floppsie(rw)

slide-41
SLIDE 41

Operating Systems slide 41 gaius

Plan 9 from Bell Labs

MOVIE GOOFS AND INTERESTING FACTS LIST Version 3.9 (October 1993) A collection of film flubs, cinematic slip-ups, movie mistakes, Hollywood howlers, etc etc. Compiled by Murray Chapman and Michael Gaines (render1@teak.njit.edu) Found by the users of USENET. # Plan 9 from Outer Space

  • Bela Lugosi died two days into the

shooting of this turkey. He was replaced by the director’s wife’s chiropractor, who was significantly taller than Lugosi, and played the part with a cape covering his face.

  • Internationally recognised as the worst

movie ever made.

slide-42
SLIDE 42

Operating Systems slide 42 gaius

Plan 9 from Bell Labs

Plan 9 from Bell Labs is a network operating system and it is composed

  • f separate machines acting as

CPU servers file servers terminals it is built from distinct specialised components rather than similar general purpose components high performance general purpose components cost a lot of money workstations are too slow and IO bound for fast compilation too expensive just to be used as a windowing system

slide-43
SLIDE 43

Operating Systems slide 43 gaius

Plan 9 from Bell Labs

Plan 9 approach is based on distributed specialisation would better address issues: cost effectiveness maintenance performance reliability and security

slide-44
SLIDE 44

Operating Systems slide 44 gaius

Plan 9 from Bell Labs

radical steps taken build a completely new system C compiler, operating system, network software, command interpreter, window system and terminal! authors credentials? Rob Pike - famous for many of UNIX concepts during the early years Ken Thompson - wrote the first C compiler. Then worked on translating UNIX from assembler to C AT&T - birth place of UNIX - so wealthy that the USA divided AT&T into two because of its power

slide-45
SLIDE 45

Operating Systems slide 45 gaius

Plan 9

different from other research and commercial operating systems. It lacks features often associated with other research network operating systems process migration lightweight processes distributed file caching personalised workstations support for X windows

slide-46
SLIDE 46

Operating Systems slide 46 gaius

Plan 9

built around CPU servers (large multiprocessors) file servers terminals (bitmap screen, mouse & computer running a window system 8 1/2) sharing of computing and storage services provide a sense of community for a group of programmers cost effective simplifies management and administration

slide-47
SLIDE 47

Operating Systems slide 47 gaius

CPU Servers

in 1990 the production CPU server was a Silicon Graphics Power Series machine with four 25 MHz MIPS processors 128 Mbyte memory no disk 20 Mbyte/sec DMA interface to the file server Ethernet network interface

slide-48
SLIDE 48

Operating Systems slide 48 gaius

CPU Servers

  • perating system has conventional process model using

fork exec primitives new processes are run on a new processor whenever possible (similar to Amoeba in this respect) processors similar to disk blocks buy more disk space when you run out buy more processors as well CPU servers have no local disk

slide-49
SLIDE 49

Operating Systems slide 49 gaius

File Servers

Plan 9 file server is a modest two processor 64 Megabyte of memory 600 Megabytes of hard disk 300 Gigabyte juke box of write-once optical disk (WORM) it interfaces to the CPU servers through the 20 Mbyte/sec DMA links

slide-50
SLIDE 50

Operating Systems slide 50 gaius

File Servers

file server interfaces to other terminals through conventional networks file server presents a file system to its clients not an array of disk drives different from Windows in this respect. cf a: b: c: d: e: f:

slide-51
SLIDE 51

Operating Systems slide 51 gaius

File Server (continued)

file system actually resides on WORM the modest 600 Mbyte drive only acts as a cache

RAM Mbyte 64 worm Gbyte 300 disk Mbyte 600 file server client

slide-52
SLIDE 52

Operating Systems slide 52 gaius

File Server Security and Backup

  • nce a day the file tree is frozen and split
  • ld files can be accessed through normal file operations

/1990/0401/usr/rob/doc/plan9.ms

this scheme permits users to compare files against old versions using traditional tools applied to a normal file system permissions are the same security remains intact

slide-53
SLIDE 53

Operating Systems slide 53 gaius

Plan 9 Network Structure

File Server CPU Server GNOT 20 Mb/s DMA Ethernet DS-1

slide-54
SLIDE 54

Operating Systems slide 54 gaius

GNOT terminal

specialist terminal whose specification is: 25 MHz 68020 1024x1024 4 colour display keyboard and mouse 4..8 Mbytes of memory 2 Mbit/sec packet switched network connects a GNOT to the CPU servers terminal does not handle compilation might run a text editor though

slide-55
SLIDE 55

Operating Systems slide 55 gaius

Plan 9 GNOT

cheap enough so that each person can have 2 1 at work 1 at home

slide-56
SLIDE 56

Operating Systems slide 56 gaius

Plan 9 code size statistics

window software written from scratch 8 1/2 source is 60K bytes including source for xterm equivalent roughly functionality of X windows (no colour) 3860 lines of code and compiles in 10 seconds compare to X windows! Plan 9 is small! the kernel is 3647 lines of C code it takes 10 seconds to compile and 10 seconds to load