Operating System Components and Services
Tom Kelliher, CS 318
Jan. 26, 1998
Announcements:
From last time:
- System architecture issues.
- I/O programming.
- Memory hierarchy.
- Hardware protection.
Outline:
- Operating system components.
- System calls.
Assignment: Finish reading Chapter 3.
From the virtual machine point of view (also resource management)
These components reflect the services made available by the O.S.
- Process Management
- Process is a program in execution --- numerous processes to choose
from in a multiprogrammed system,
- Process creation/deletion (bookkeeping)
- Process suspension/resumption (scheduling, system vs. user)
- Process synchronization
- Process communication
- Deadlock handling
- Memory Management
- Maintain bookkeeping information
- Map processes to memory locations
- Allocate/deallocate memory space as requested/required
- I/O Device Management
- Disk management functions such as free space management, storage
allocation, fragmentation removal, head scheduling
- Consistent, convenient software to I/O device interface through
buffering/caching, custom drivers for each device.
- File System
Built on top of disk management
- File creation/deletion.
- Support for hierarchical file systems
- Update/retrieval operations: read, write, append, seek
- Mapping of files to secondary storage
- Protection
Controlling access to the system
- Resources --- CPU cycles, memory, files, devices
- Users --- authentication, communication
- Mechanisms, not policies
- Network Management
Often built on top of file system
- TCP/IP, IPX, IPng
- Connection/Routing strategies
- ``Circuit'' management --- circuit, message, packet switching
- Communication mechanism
- Data/Process migration
- Network Services (Distributed Computing)
Built on top of networking
- Email, messaging (Exchange)
- FTP
- gopher, www
- Distributed file systems --- NFS, AFS, LAN Manager
- Name service --- DNS, YP, NIS
- Replication --- gossip, ISIS
- Security --- kerberos
- User Interface
- Character-Oriented shell --- sh, csh, command.com ( User
replaceable)
- GUI --- X, Win32
Some of the Unix system calls:
(Refer to man 2.)
- Process Management
Scheduling, deadlock detection is transparent.
- fork, vfork, exit, exec
- wait
- signals, pipes, streams, sockets
- Memory management
For the most part, transparent to the user.
- malloc, free
- I/O Device Management
Devices are treated as files, so I/O devices are supported by the file
system.
- File System
- creat, open, close
- lseek, read, write
- stat, chmod, chown
- link, unlink
- mkdir, rmdir
- sync
- Communication
Two models:
- Message passing
- Processes communicate by passing messages --- mailbox model.
- Primitives: send, receive.
- Each Process has a private address space.
- Perfect for inter-processor communication. No synchronization
problems. Latency can be a problem. Queueing.
- Shared memory
- Processes communicate by sharing memory --- bulletin board
model.
- Primitives are implicit once spaces are mapped.
- Good for large amounts of intra-processor communication.
Synchronization problems.
Issues: naming, security, transparency, replication, etc.
Message passing
- socket, bind, accept, read.
- socket, connect, write.
Shared memory:
- mmap.
Thomas P. Kelliher
Thu Jan 22 18:52:25 EST 1998
Tom Kelliher