Handouts:
- Course Syllabus
- Homework Grading Policy
- Project 1
- Course Logistics
TA office hours.
An operating system (OS) is a set of procedures that provides two basic
functions:
- 1.
- allocate resources to processes, and (resource manager)
- 2.
- hide the details of the physical machine and provide a more
pleasant virtual machine (abstract the resources of the physical machine).
We call these the resource and beautification
principles respectively.
Resource is a commodity needed to get work done.
``New York Times Magazine definition''--Sunday, August 25, 1991 (Layman's
defn)
An operating system is a program that might be likened to a computer's
consciousness, turning a set of chips and circuit boards into a working
brain, able to respond to instructions. Applications software is put in
after the operating system to make the computer perform specific tasks,
like processing words, constructing spreadsheets, or doing income taxes.
What are operating systems we know:
- Unix--many flavors
- Linux--Unix for the masses (FreeBSD, ...)
- Windows 95/98
- Windows NT
- others, MS-DOS, BeOS, Multics, Digital VMS, Minix, Xinu, OS/2, Mach, ...
Also look at picture from Tanenbaum's book.
USER (Human)
|
| <---- Interface (Program Interface)
|
APPLICATION (Compiler, editor)
PROGRAM
|
| <---- Interface (System Calls)
|
OPERATING (Serves process requests)
SYSTEM
|
| <---- Interface (Hardware/privileged instructions)
|
HARDWARE (Disk, tape, memory, CPU)
Processes are hard to define precisely and exact definitions are
usually operating system specific.
A program is a set of data and code that manipulates it.
A process is a program in execution. When a CPU executes a
program, the operating system allocates space for data, space for a stack,
and space for local variables. Processes need resources--CPU, disk,
transput (input/output).
Operating System allocates and manages resources needed by processes.
What resources does the OS manage?
- time (e.g., CPU time, device time)
- space (e.g., memory, physical devices)
- new resources defined by the operating system (e.g., files, swap
space, processes)
For example, if a printer is not managed then get garbled output.
- context switching and scheduling (allocating CPU time to
processes) (process creation tree)
- memory management (allocating space for instructions, data, etc.)
- interprocess communication (IPC) (facilities that allow
concurrent processes to communicate with each other)
- access to a file system (picture)
- high level input/output (not to a device), is device independent
- hardware
- programming language
- command interpreter
- utilities such as editors, browsers,
mailers, compilers, and loaders. Utilities
use the facilities provided by the operating system.
- philosophies define an overall strategy (fairness).
- policies chose how activities are to proceed (FCFS scheduling,
highest priority for super user jobs, etc.)
- mechanisms enforce policies. The nuts and bolts of the OS.
It is a fundamental point that the two goals of an operating system
are often contradictory. The operating system should
- make efficient use of resources. Resources should be used as much
as possible and the operating system should finish as many processes as
possible. However, the operating system should provide:
- make fair use of resources and let each process have the resources it needs.
We'll study policies and mechanisms. Whenever possible, the operating
system designer should build mechanism, rather than policy. Once a policy
is placed in the implementation, it cannot easily be changed. Leaving
policy in the hands of the user or system administrator provides the
greatest flexibility. It is important to study both policy and mechanism,
because there is a cost associated with carrying out specific policies.
The operating system designer wants to implement mechanism and allow policy
to be flexible.
How did operating systems evolve?
(more details in Tanenbaum)
- 1.
- Single program execution. (no Operating System) In early days,
machines didn't have operating systems; programs took over the entire
machine. Programs, written in assembly language (or worse), had to know
such low-level details such as how to perform input/output. Punched on
paper tape and then computer cards. However, early programs spent
most of their time performing the input/output needed to read and print the
job!
- 2.
- Batch (Spooling). To make better use of resources, spooling systems were
developed that copied jobs from card readers to tape, so that once the job
could be run, the CPU could fetch it from tape rather than from the
(relatively) slow card reader. Later spooled onto disk.
Interrupts. Introduced the notion of interrupts so devices could
alert the CPU when they were finished. However, running just one job by
itself was still inefficient.
- 3.
- Multiprogramming. The next step in operating systems development,
multiprogramming, gave the illusion of executing several programs
simultaneously. Multiprogramming systems execute each job for several
thousands of a second providing the appearance of running several jobs
simultaneously. Thus, notion of a process. Still compute bound jobs
could monopolize the CPU.
Time-slicing. In time-sharing systems, all processes are
scheduled to run in round-robin fashion.
One of the systems was MULTICS at M.I.T. Was a predecessor of the UNIX
operating system done at Bell Labs. 1970ish.
- 4.
- Personal Computers. MS-DOS did not allow multiprogramming.
Windows NT and Windows 95 uses multiprogramming.
- 5.
*
nix for the Masses. Linux, FreeBSD, ...
- 6.
- Distributed and Network Operating Systems. Spans multiple machines.
Distributed is transparent of machines, N.O.S. is not.
- 7.
- Internet/Web. Operating system services are tightly
intertwined with network. Integration of server applications, operating
system and network is important.
What does the operating system look like? How is it organized?
- Simple Systems. Operating system not separated from
applications. No protection. Example is MS-DOS.
- Monolithic Systems. The big mess. Unix (Linux). See pictures. Talk
about the kernel as the privileged portion of the O.S.
- Layered Systems. XINU as an example. Also MINIX (motivated Linux).
- Virtual Machines. Emulated Operating System environment for
application. IBM VM/370 environment. Java Virtual machine.
- Microkernel. Clients obtain service by sending
messages to server processes. (also called client-server). Simple approach
where simple kernel mechanism allows policies to be implemented in server
processes.
A trend towards this latter type of organization. More amenable for moving
towards a distributed system.
Build minimum mechanism into the kernel and leave policy
decisions to the servers.
Issues of flexibility vs. performance. Windows NT uses partial microkernel
approach.
- Unix-- Developed late 70s. traditional, monolithic multitasking O.S.
- Linux-- ``free'' on a wide range of platforms.
- 1991. Developed by Linus Torvalds for 80386 processor. evolved from Minix
- v1.0 in 1994 supporting networking. Up to version 2.2 in 1999. Use
is growing.
- Windows NT-- real O.S. from Microsoft supporting multitasking.
- v4 in 1997. Going after robust, server market.
- Win2000 merges Win98 and WinNT