Title: Operating Systems AMS505 4'3 Winter 2001
1Operating SystemsAMS505 4.3 Winter 2001
- Major Greg Phillips
- Royal Military College of Canada
- Electrical and Computer Engineering
- greg.phillips_at_rmc.ca
- 1-613-541-6000 ext. 6190
2AMS 505 Road Map
- 2. Hardware
- physical aspects of how computers work
- 3. Networks
- how computers communicate with one another
- 4. Software
- how we give the hardware behaviour
- 5. Databases
- how we organize, store, and retrieve information
- 6. IS Development
- issues in getting information systems built
- 7. Information Security
- keeping our information secret, correct, and
available - 8. Applications
- selected military-relevant application areas
3Software Module
- 4.1 the software hardware interface
- plus lab 4.2
- 4.3 operating systems and higher-level
programming models - 4.4 procedural programming
- plus lab 4.5 using Python
- 4.6 object-oriented programming
- plus lab 4.7 using Python
- 4.8 parallel and distributed systems
4Today
- historical overview of operating system
development - what they are, and where they came from
- programming models
- how programs run on our machines
- key operating system features and services
- what they do, and how
5In the beginning, there was The Machine.
And it was alone.
6Time of the Disciples (c. 1945-1955)
Programming from the console (A Disciple communes
with The Machine).
7Time of the Disciples
- one user, one computer
- programs entered directly on system console
- inefficient use of machine time
- occasionally, paper tape substituted
- programs written in machine language or possibly
assembler - error-prone, requires many steps to perform any
useful computation - programs written at machine hardware level
- special programs required for each device or
peripheral - rewrite any time one of these changes
hand-coded program
hardware
8The High Church (c. 1950-1982)
Punching cards (Monks prepare the Sacred Text).
9The High Church
Entering a job (An Acolyte presents the Sacred
Text to The Machine).
10The High Church
- many users, one computer (one at a time)
- programs punched on cards, then submitted to
machine room for processing output returned on
printouts - more efficient use of expensive machine time
- programs written in higher-level languages
- easier to write correct programs, detect errors,
maintain programs over time - early operating systems provide hardware
abstraction - program to generic device model OS takes care of
translation - change of device requires OS device driver
update only - e.g., ADMIRAL, IBM 1410 OS, SABRE
compiler
compiled program
program source
hardware abstraction layer
operating system Application Programming
Interface (API)
hardware
11First Reformation (c. 1965 - now)
Timesharing systems (The People speak to The
Machine, from afar).
12First Reformation
- many users, one computer (time sharing)
- programs entered directly on teletype machines or
dumb terminals and stored on disk or tape - efficient use of expensive machine time, but more
effective for users - early time-sharing OS allow multiple, parallel
users - arbitration of shared resources
- CPU time, memory, tape and disk, printers
- provision of essential system services
- command shells, etc
- e.g., TSS, TOPS-10, Multics, VMS, Unix
compiled program
compiled program
compiled program
time-sharing operating system
hardware
13Second Reformation (1969 - now)
Personal computers (The People commune with Their
Machines).
14The Second Reformation
- one user, one or more computer (personal
computers) - machine time is cheap, put them everywhere!
- programs entered directly into computers, stored
on disk - although hardly anyone actually programs any
more - typically single user OS, but have multiple
active processes (still many multi-user OS) - arbitration of shared resources still an issue
- provision of useful higher-level services
- graphical user interface components, window
managers, file system explorers, help systems,
configuration utilities, automatic device
detection (plug and play), install and
uninstall utilities, - e.g., Windows, MacOS, Linux, PalmOS, etc.
compiled program
compiled program
compiled program
time-sharing operating system
hardware
15Key OS Features and Services
- process management
- allowing multiple programs to run on one machine
- memory management
- giving each process access to independent memory
- storage abstraction
- allowing a consistent interface to different
kinds of secondary storage - security management
- supporting privacy, integrity, availability
16Process management
- on modern OS, many active processes
- system level housekeeping
- background daemons
- event schedulers, print/web/ftp servers
- user applications
- process has
- own program counter or thread of control
- protected region of memory
- OS provides process scheduling
- which process is active when
- typically performs context switch every few
milliseconds - provides illusion that each program runs
continuously
17Memory management
- with multiple processes in memory, must ensure
one process doesnt overwrite anthers program or
data - key concept virtual address space
- from programmer/process perspective, appears
process has continuous access to full machine
address space - OS (hardware) actually maps program virtual
addresses to machine addresses - mapping ensures each process has protected space
- side benefit virtual memory
- can map program addresses to disk pages
- allows processes to use more physical memory
(RAM) than machine actually contains - but RAM 106 times faster than disk
18Storage abstraction
- lots of different physical storage mechanims
- floppy, hard disk, CD-ROM, flash memory, tape
- OS provides common abstraction of files
- file appears to be a continuous stream of any
number of bytes - typically really stored in fixed-size blocks,
scattered across a disk or tape - and directories
- looks like a container full of files
- really just a special file listing the files it
contains - OS API for files
- open(), close(), read(), write(), seek()
- and directories
- change_directory(), list_contents(), add(),
remove()
19Security Management
- virtual address space is a security mechanism
- typically want to authenticate users and provide
distinct privileges to each login password - must protect files if multiple users
- MacOS, Windows 9x, PalmOS
- no concept of file ownership
- Unix, Linux, MacOS X (based on BSD Unix)
- files have owners and groups
- for owners, groups and others can set separate
permissions for reading, writing, and executing
files - Windows NT/2000
- files have owners
- can assign permissions to individual users or
groups (access control list) read, write,
execute, delete, change permissions, take
ownership
20Join the RMC or Queens Jugglers!
- RMC (New Gym)
- Tuesday evenings, 2130-2300 hrs
- Queens (Biosciences Atrium)
- Tuesday evenings, 1900-2100 hrs
- Saturday afternoons, 1400-1600 hrs (not 27 Jan
01) - http//www.ams.queensu.ca/juggling/