1 Intro
1 Intro
Goals:
Understanding of OS and the OS/architecture interface/interaction
Learn a little bit about distributed OS’es if having time
Prerequisites:
What to expect:
We will cover core concepts and issues in lectures
In sections, you and your TA will practice and talk about the project
3 projects: xv6
1 Midterm and 1 Final
Rough guideline
1 Midterm 35%
Midterms will be held in common at class
1 Final 35%
Quiz (10% )
Lab (30%)
Remember, this is just a rough guideline
Grading should really be based on how much you have learned from the course
Any concrete thing that you do towards convincing me of this may
help
For example, showing up at lab hours and participating in class will likely
help
application (user)
operating system
hardware
A software layer between the hardware and the application programs/users
which provides a virtual machine interface: easy and safe
A resource manager that allows programs/users to share the hardware
resources: fair and efficient
A set of utilities to simplify application development
application (user)
hardware
Mechanisms: data structures and operations that implement an abstraction
(e.g. the buffer cache)
Policies: the procedures that guides the selection of a certain course of action
from among alternatives (e.g. the replacement policy for the buffer cache)
Want to separate mechanisms and policies as much as possible
Different policies may be needed for different operating environments
CPU Memory
memory bus
I/O bus
Mechanism:
Creation, destruction, suspension, context switch, signaling, IPC, etc.
Policy:
Minor policy questions:
Who can create/destroy/suspend processes?
How many active processes can each user have?
Major policy question that we will concentrate on:
How to share system resources between multiple processes?
Typically broken into a number of orthogonal policies for
individual resource such as CPU, memory, and disk.
Mechanism:
Creation, destruction, suspension, context switch, signaling,
synchronization, etc.
Policy:
How to share the CPU between threads from different processes?
How to share the CPU between threads from the same process?
How can multiple threads synchronize with each other?
How to control inter-thread interactions?
Can a thread murder other threads at will?
Mechanism:
Virtual-to-physical memory mapping, page-fault, etc.
physical memory:
Policy:
How to multiplex a virtual memory that is larger than the physical
memory onto what is available?
How should physical memory be allocated to competing processes?
How to control the sharing of a piece of physical memory between
multiple processes?
Mechanism:
File creation, deletion, read, write, file-block-to-disk-block mapping, file
buffer cache, etc.
Policy:
Sharing vs. protection?
Which block to allocate?
File buffer cache management?
application: sockets
naming, messages
operating system: TCP/IP protocols
network packets
hardware: network interface
Mechanism:
Send, receive, buffering, retransmission, etc.
Policy:
Congestion control and routing
Multiplexing multiple connections onto a single NIC
Mechanisms
Open, close, read, write, ioctl, etc.
Buffering
Policies
Protection
Sharing?
Scheduling?
CPUs were still idle whenever executing program needs to interact with
peripheral device
Reading more data from tape
Multiprogrammed batch systems were invented
Load multiple programs onto disk at the same time (later into memory)
Switch from one job to another if when the first job performs an I/O operation
Peripheral being used had better be slower than disk (or memory)
Overlap I/O of one job with computation of another job
Peripherals have to be asynchronous
Have to know when I/O operation is done: interrupt vs. polling
Increase system throughput, possibly at the expense of response time
When is this better for response time? When is it worse for response time?
P1, P2, P3 Run Run Run Wait Run Run Run Wait
P1
P2
P3
Clustering
Use multiple small machines to handle large service demands
Cheaper than using one large machine
Better potential for reliability, incremental scalability, and absolute
scalability
Wide area distributed systems
Allow use of geographically distributed resources
E.g., use of a local PC to access web services
Don’t have to carry needed information with us
Need OS support for communication and sharing of distributed resources
E.g., network file systems
Want performance (although speedup is not metric of interest here), high
reliability, and use of diverse resources
Pervasive computing
Right now, cell phones and PDAs
Future, computational elements everywhere
Characteristics
Constrained resources: slow CPU, small memories, no disk, etc.
What’s new about this? Isn’t this just like the old computers?
Well no, because we want to execute more powerful programs than
we use to
How can we execute more powerful programs if our hardware is similar to old
hardware?
Use many, many of them
Augment with services running on powerful machines
OS support for power management, mobility, resource discovery, etc.
Architectural refresher