Operating Systems
- Operating systems have evolved with computer systems
- Expensive machines, efficient operating systems
- Simple machines, simple operating systems
- Single user machine - no OS needed, input-process-output
- Batch processing - processes multiple jobs, one after another, with minimal delay
- Interactive Processing - Allow user interaction as program runs
- Real Time Processing - respond to hardware events
- Multitasking - allow multiple tasks to execute simultaneously, switches very fast between tasks
- Multiprocessing - allow tasks to run on different CPUs
- Examples: Windows XP, Windows 2000, Windows 95, DOS, MacOS, UNIX, Linux, VMS, OS/2
Software Classification
- Software
- Application - Ex: Word,
- System
- Utility - Ex: Windows Explorer
- Operating System
- Shell - Ex: GUI Interface, command line
- Kernel - Implementation
Some software seems to fit somewhere between these units.
Operating System Components
The OS kernel contains several key components related to software
access to hardware.
- Process Management
- User interaction
- batch vs. interactive processing
- which process is running?
- What can a particular program access?
- Memory Management
- Where is a program stored in RAM?
- Virtual memory management
- File System Management
- How are files stored on the disk?
- Can anyone access a file?
We can think of the OS as a broker between our programs and the hardware.
One job of the OS is to protect our programs from other programs, and likewise
limit what our programs can do.
Process Management
- A process is a program in action, and has a particular state at any given time
- The process state is either
- running - actively in CPU
- waiting - waiting for some event to happen
- ready - waiting for CPU to become available
- In a multitasking system, processes are constantly being shuffled in and out of the CPU (See fig 3.6, p. 133).
This is called a context switch and the following occur:
- running process is sent an interrupt
- completes current machine instruction
- saves current process context
- executes the interrupt handler (via jump instruction)
- program is put in ready or waiting queue
- A context switch can occur because of
- Process has completed a time slice (ready queue)
- Process has performed an I/O operation (waiting queue)
Client Server Computing
- A client issues requests which are processed and responded to by a server.
- Separates user oriented I/O from server functions.
- What are some client programs?
- What are some server programs?
Process Competition
- An OS is a resource broker (CPU time, memory, device time, disk space, etc)
- How should we allocate these resources to processes?
- What if 2 or more processes want to access the same device?
- Solution:
- Mutual exclusion (allow only one)
- test-and-set instruction
Deadlock
- Deadlock is a state where two processes cannont proceed because they are mutually blocking one another.
- Three conditions must be satified for deadlock to occur:
- Competition for nonsharable resources
- Resources are requested on a partial basis (not all at once)
- No removal of resources once allocated
- Deadlock can be avoided by eliminating one of these conditions
- Deadlock can be corrected by detection then removing the allocation of a resource
- Dining Philosophers
Networks
- A computer network is a communication channel between two or more computers.
- Network types:
- LAN - Local Area Network
- Wan - Wide Area Network
- Internet - Many LANs linked by WANs
- Network communication follows protocols. Examples: HTTP, SMTP, and FTP
- Networks use different physical media. Examples: Copper, Optical Fiber, and Satelite
- Networks use various topologies. Examples: Star, Ring, and Bus
Internet
- Internet was developed in the late 1960s
- Started as DARPA project
- Early applications: file sharing, email, and remote access
- Millions of Machines worldwide
- Uses TCP and IP protocols for low level communications
- Addressing: IP addresses are 32 bits, usually specified as 4 bytes (147.124.43.50)
- Dynamic host/domainname (zeta.albion.edu) to IP (147.124.43.50) address translation
- Controlled by InterNIC
- Predates the web browser (as does hypertext)
- A Uniform Resource Locator (URL) specifies a protocol, machine, and target
- Millions of clients, Millions of servers!
- Not 'Invented' by Al Gore, but he did make significant contributions
from a legislativce standpoint
- Internet Timeline
Network Protocols
- How do we know a message we send is received on the other end? Protocols!
- Layers of internet connectivity
- Application Layer
- Transport Layer
- Network Layer
- Link Layer
- Token Ring
- CSMA/CD (Carrier Sense, Multiple Access, with Collision Detection)
Security
- How can we protect data and allow access?
- Passwords
- Encryption
- Restricted access
- What are some problems?
- Vandalism
- Information Theft
- Spying/Violation of Personal E-Space
- Junk Email
Social Issues
- see questions on pages 165 and 166.
- Is Microsoft a monopoloy?
- Can we ever transmit a secure message?
- Who, if anyone, should control access to encryption?
- Who, if anyone, should restrict internet access?
- What should the penaly be for producing/spreading a computer virus?
- What rights do businesses have on control of domainnames?
- Should access ever be anonymous?