The UNIX System
History
Bell Labs --- MULTICS ancestory (Thompson, Richie)
Version 7 --> System III --> System V
\
\--> BSD systems
Design Principles
- Layered time-sharing system
- File system -- multi-layered tree
- Files and I/O devices treated similarly
- Demand paging
- Made by programmers for programmers
- replacable shell
- "make"
- "SCCS"
- "C" based and therefore portable
- Source online
- Controlled crashes and problem prevention
- Scalable
Programmer Interface
users
|
shells, GUI's and commands
(compilers, system libraries, etc.)
|
system -call Interface
|
kernal
(signals, file sys, swapping, CPU sked,
paging, virtual mem, disk & tape drivers)
|
kernal interface to H/W
|
hardware
Files
- Sequence of bytes
- Path names, links, root
- "standard" files
- "creat, open, read, write, close, unlink, lseek, trunc"
- Blocks and fragments (small blocks) Disk sectors usually 4K bytes
- Inodes --- user/group id's, links, type, pointers to disk blocks, time of last modification
- vnodes
- File descriptor (index to open file table)
Processes
- "fork, execve, wait"
- Process Management:
- PCB's --- stored in kernel
-
- CPU skeds:
- Priority Q's --- system jobs higher than users employs aging and time accumulation to adjaust priorities. "nice"
- Memory Management:
- Old systems --- swapping using first-fit
- Paging --- introduced in BSD systems. LRU or Second Chance on old systems. Swapping will occur to relieve overloaded page system.
- Interprocess Communications:
- Shared memory. Not in old sys, just in new.
- Pipes --- file implementation.
- Sockets --- stream socket vs datagram socket.
- Streams --- only in System V.
Signals
Exceptions -- 31 on our system (not 20). all but #9 can be caught in a "trap"
Miscellaneous
shell scripts.
LINUX
Copyright ©2015, G. Hill Price
Send comments to G. Hill Price