Operating Systemsslide 1gaius
What is an operating system?
"Peterson and Silbershatz"
"We can view an operating system as a resource allocator. A computersystem has many resources (hardware and software) that may berequired to solve a problem: CPU time, memory space, file storagespace, I/O devices, and so on.
The operating system acts as the manager of these resources andallocates them to specific programs and users as necessary for theirtasks. Since there may be many, possibly conflicting requests forresources, the operating system must decide which requests areallocated resources to operate the computer system efficiently andfairly."
Operating Systemsslide 2gaius
Windows NT
many elements influenced the design of Windows NTit provides the same type of GUI found in the earlier Windowsproductsincluding the use of windowspull down menuspoint and click interaction
Operating Systemsslide 3gaius
NT components
internal interaction is inspired by the Mach operating system, which isin 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 applicationoriented software from operating system software. (Kernel mode anduser mode)
Operating Systemsslide 4gaius
Design goals of NT
like any commercial operating system, Windows NT is the result of acomplex interaction between idealized goals and market-driven realities
Compatibilityit should support a wide range of existing software and legacyhardware. (DOS, Windows 3.1 compatibility)
Robustnessit should resist attacks of naive or malicious users, individualprograms should be isolated from each other
Portabilityit should run on a wide variety of current and future hardwareplatforms
Operating Systemsslide 6gaius
Design goals of NT
Extendibilityit should be possible to add new features and support new I/Odevices
Performanceit should give reasonable performance on commonly availablehardware. Take advantage of multiprocessing hardware
Operating Systemsslide 7gaius
Major building blocks of NT
Overall architecture of the NT kernel mode components
Operating Systemsslide 8gaius
Hardwar e abstraction layer
HAL is a thin layer of software that presents the rest of the system withan 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 cachesTimersI/O busesDevice registersInterrupt controllersDMA controllers
various system components use these HAL functions to interact withCPU hardware
HAL routines make the kernel and device drivers binarycompatible across platforms with the same CPU architecture
Operating Systemsslide 10
gaius
Kernel
consists of the most fundamental components of the operating systemmanages scheduling and context switchingexception and interrupt handlingmultiprocessor synchronization
Executivethe most complex kernel mode component in Windows NTimplement many of the basic functions normally associated withan operating system(Process manager, virtual memory manager, I/O manager, systemcall interface)
the executive uses the HAL to interact with any CPU hardware
Operating Systemsslide 11
gaius
Layered device drivers in NT
the term driver normally refers to a piece of code that manages someperipheral or device
NT takes a more flexible approachallows several driver layers to exist between an applicationprogram and hardware
Device driversmanage actual data transfer and control operations for a specifictype of physical deviceincludes starting stopping I/O, handling interrupts and handlingerrors
Intermediate drivers
NT allows you to place any number of layers on top of a physicaldevice driverintermediate layers provide a way of extending the capabilities ofthe I/O system without having to modify the drivers below them
Operating Systemsslide 13
gaius
Example: Fault tolerant disk driver
is implemented as a layer that sits between the file system and driversfor any physical disks.
intermediate drivers separate hardware specific operations from moregeneral management issues
here the intermediate driver is referred to as aclass driverand thehardware driver is called aport driver
this structure makes it easier to target a wider range of hardwaresince only the port code needs to be rewritten
Operating Systemsslide 14
gaius
File system drivers (FSDs)
the following FSDs are supplied by Microsoft:
Type Description
FAT Windows 95 extended MSDOS file systemNTFS Windows NT high reliability file systemHPFS OS/2high performance file systemCSFS ISO9660 CDROM file systemMSFS Mailshotfile systemNPFS Namedpipe file systemRDR LAN Manager redirector
unfortunately, you cannot develop file system drivers using thestandard NT device driver k it
also note the absence of NFS.
Operating Systemsslide 16
gaius
Device driver
Operating Systemsslide 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, vendorgenerally unlikely
Operating Systemsslide 18
gaius
UNIX vs NT
both NT and UNIX (Solaris, Sequent) will operate with multipleprocessors
both OSs have TCP/IP and associated utilities in different formsNT doesn’t hav eNFS though (which considered slow, but open!)
nevertheless much research has been done to improve NFSperformance
both OSs support filesystems with long filenames
NT will easily integrate with Novell, MACOSUNIX needs extra packages (eg samba) which has to be configuredby an expert
Operating Systemsslide 19
gaius
UNIX vs NT
UNIX is still more flexible in resource sharingshare any peripheral across the networkall 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
Operating Systemsslide 20
gaius
UNIX vs NT
NT is mucheasier to manage
NT is mucheasier to install
NT is more tolerant of different hardware devices due to the HAL
Operating Systemsslide 21
gaius
Network Operating Systems (Unix)
UNIX started life as a research project within AT&T in 1970since 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,"PracticalInternetworking with TCP/IP and UNIX", Addison Wesley.
W.Richard Stevens,"UNIX Network Programming", Prentice-Hall.
Operating Systemsslide 22
gaius
UNIX networking history
the first networking functionality added to UNIX wasUUCP (UNIX toUNIX copy) in 1976
provided a mechanism to transfer files from different UNIXmachines which typically only had modem connectivityimplemented was a batch-oriented system that was typically usedbetween systems
remote printing and email were added in the Berkeley release of theVersion 7 UNIX for the PDP-11 (called 2.x BSD) (Berkeley StandardDistribution)
TCP/IP was released in 1981 in the 4.1 BSD UNIX
Operating Systemsslide 23
gaius
Unix history
TCP/IP opened the flood gates for networked applicationsNFS - network file systemremote job executionremote login, telnet, ftp, R toolstalkremote procedure calls and XDRnewsclient server computing
Operating Systemsslide 24
gaius
UNIX networking history
the Berkeley releases of UNIX 4.1 BSD and 4.2 BSD provided the firstUNIX systems with widespread network support (1982-1983)
many Computer Science departments started to buy more than oneVAX with Ethernet cards and so created UNIX LANs
April 1986 4.3 BSD was releasedJune 1988 a revision of the 4.3 BSD referred to as the Tahoedistributionwas meant to be an interim release for testing by experienced users
importantly it contained source code which was not licensed by AT&Tso you couldlegallyuse the source code for your own productsreference software was available for TCP/IP & sockets
Operating Systemsslide 25
gaius
UNIX network services
rexd remote job execution daemonallows a user to say:
on floppsie gcc -g largeprogram.c
theon command makes the C compiler execute on a machinecalled floppsieall input/output has to be rerouted tofloppsie in order that thecompilation will work.
telnet - the ability to login into another machine
NFS - Network file system.
RPC - Remote procedure call package (1984)
normally uses theXDR facility and it is an interprocess communicationmechanism that allows programmers to write client-server basedapplications
Operating Systemsslide 27
gaius
UNIX networking facilities
sockets - introduced in 1982 with 4.1 BSD.Another interprocess communication mechanism (low lev el) whichallows one process to communicate with another process. Theseprocesses maybe on the same machine or on opposite sides of theworld. Sockets consist on five primitives:socket, bind, listen,connect andaccept
today hundreds of client/servers use above primitives
email (pop2, pop3, imap, smtp), news, R commands, lpd, nfs, ftp,telnet, news, finger, cvs, http
Operating Systemsslide 28
gaius
Networking examples
pop2 emailclientpop3 emailclientimap emailserversmtp emailclientnews discussiongroupsR commands remotecommandslpd networked printingnfs networked file systemftp file transfer protocoltelnet remoteloginfinger userdescription & profilecvs networked source code accesshttp hypertext protocol
Operating Systemsslide 29
gaius
Networking examples
examine the file/etc/services for a full description
Operating Systemsslide 30
gaius
A typical UNIX network
UNIX is an open systemmany vendors: SUNOS, ULTRIX, AT&T UNIX SVr4,GNU/Linux, BSD386some free! (Source code, compilers, debuggers, editors, networkapplications etc)its popularity in the early days was due in part to its no costavailabilitythis has now turned full circle with the advent of GNU/Linux andBSD386
open system as interfaces to applications, client/servers are published
important to notea major difference between UNIX and otheroperating systems (Novell) is that clients and servers on UNIX lookalmost identical
possible that they are the same except for some files in/etc
(configuration files)
Operating Systemsslide 31
gaius
A typical UNIX network
client/server distinction occurs at the user level not the system level
Operating Systemsslide 32
gaius
A typical UNIX network
ethernet and IP
workstation local disk
workstation local disk
local diskworkstation
configuration isveryflexible
Operating Systemsslide 33
gaius
Unix configuration
could be a disadvantage as system administrators have to fight theirway through many different options for various components just toperform simple operations
it is possible that all machines are configured identically (except fortheir hostname, IP address etc)
could configure the network operating systems so that all localdisks can be seen by all machines
Operating Systemsslide 34
gaius
A typical UNIX network
alternatively machines could be very different (ie could build distinctclient/server model similar to Novell)
one machine has the common file systemone machine has the system executables
Operating Systemsslide 35
gaius
Disadvantages
complexity
flexibility requires system administrators be disciplined otherwiseoverall system may become unmanageable
when more machines are added
harder to configure than other operating systemsgetting better (Solaris, GNU/Linux brands often use Gtk)but complexity still remainsfew graphical tools to identify installation errors
however the problems are being addressed
Operating Systemsslide 36
gaius
NFS configuration example
can network file systems between different architectureslittle endian, big endian - it makes no difference
NFS design is built from three main parts: a protocol, a server and aclient
nfs protocol nfs servernfs client
Operating Systemsslide 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
Operating Systemsslide 38
gaius
NFS example
suppose we have two machines
mcgregfloppsie
includebin
X386
usrhomebin
/
home usr bin
/
fred
our task is to allow machinefloppsie see directory/home/gmulley
Operating Systems
slide 39gaius
NFS example
tell floppsie where this directory residesedit/etc/fstab on floppsie and add the following linemcgreg:/home /home/mcgreg nfs
(remote fs mount point type mount options)
Operating Systemsslide 40
gaius
NFS example
need to tell machinemcgreg that/home is exported and thatfloppsie is allowed to see it
edit/etc/exportfs onmcgreg and add the following line/home 193.63.128.0/255.255.255.0(rw) floppsie(rw)
Operating Systemsslide 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
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.
Operating Systemsslide 42
gaius
Plan 9 from Bell Labs
Plan 9from Bell Labsis a network operating system and it is composedof separate machines acting as
CPU serversfile serversterminals
it is built from distinct specialised componentsrather than similar general purpose components
high performance general purpose components cost a lot of moneyworkstations are too slow and IO bound for fast compilationtoo expensive just to be used as a windowing system
Operating Systemsslide 43
gaius
Plan 9 from Bell Labs
Plan 9 approach is based on distributed specialisation would betteraddress issues:
cost effectivenessmaintenanceperformancereliability and security
Operating Systemsslide 44
gaius
Plan 9 from Bell Labs
radical steps takenbuild a completely new systemC compiler, operating system, network software, commandinterpreter, window system and terminal!
authors credentials?Rob Pike - famous for many of UNIX concepts during the earlyyearsKen Thompson - wrote the first C compiler. Then worked ontranslating UNIX from assembler to CAT&T - birth place of UNIX - so wealthy that the USA dividedAT&T into two because of its power
Operating Systemsslide 45
gaius
Plan 9
different from other research and commercial operating systems. Itlacks features often associated with other research network operatingsystems
process migrationlightweight processesdistributed file cachingpersonalised workstationssupport for X windows
Operating Systemsslide 46
gaius
Plan 9
built around CPU servers (large multiprocessors)file serversterminals (bitmap screen, mouse & computer running a windowsystem 8 1/2)
sharing of computing and storage services provide a sense ofcommunity for a group of programmers
cost effectivesimplifies management and administration
Operating Systemsslide 47
gaius
CPU Servers
in 1990 the production CPU server was a Silicon Graphics PowerSeries machine with four 25 MHz MIPS processors
128 Mbyte memoryno disk20 Mbyte/sec DMA interface to the file serverEthernet network interface
Operating Systemsslide 48
gaius
CPU Servers
operating system has conventional process model usingforkexec primitives
new processes are run on a new processor whenever possible (similar toAmoeba in this respect)
processors similar to disk blocksbuy more disk space when you run outbuy more processors as well
CPU servers haveno local disk
Operating Systemsslide 49
gaius
File Servers
Plan 9 file server is a modesttwo processor64 Megabyte of memory600 Megabytes of hard disk300 Gigabyte juke box of write-once optical disk (WORM)
it interfaces to the CPU servers through the 20 Mbyte/sec DMA links
Operating Systemsslide 50
gaius
File Servers
file server interfaces to other terminals through conventional networks
file server presents a file system to its clientsnot an array of disk drivesdifferent from Windows in this respect. cfa: b: c: d: e:f:
Operating Systemsslide 51
gaius
File Server (continued)
file system actually resides on WORMthe modest 600 Mbyte driveonlyacts as a cache
RAM
Mbyte
64
worm
Gbyte
300
disk
Mbyte
600
file server
client
Operating Systemsslide 52
gaius
File Server Security and Backup
once a day the file tree is frozen and splitold 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 usingtraditional tools applied to a normal file system
permissions are the samesecurity remains intact
Operating Systemsslide 53
gaius
Plan 9 Network Structure
File Server CPU Server
GNOT
20 Mb/s
DMA
Ethernet
DS-1
Operating Systemsslide 54
gaius
GNOT terminal
specialist terminal whose specification is:25 MHz 680201024x1024 4 colour displaykeyboard and mouse4..8 Mbytes of memory2 Mbit/sec packet switched network connects a GNOT to the CPUservers
terminal does not handle compilationmight run a text editor though
Operating Systemsslide 55
gaius
Plan 9 GNOT
cheap enough so that each person can have 21 at work1 at home
Operating Systemsslide 56
gaius
Plan 9 code size statistics
window software written from scratch8 1/2 source is 60K bytes including source for xterm equivalentroughly functionality of X windows (no colour)3860 lines of code and compiles in 10 secondscompare to X windows!
Plan 9 is small!the kernel is 3647 lines of C codeit takes 10 seconds to compile and 10 seconds to load