Professional Documents
Culture Documents
UNIX
Multiuser, multiprogrammed"
Rich libraries"
Portable"
POSIX
!2
History
1971. Unix Version 1, Ken Thompson"
1973. ported to C"
1979. AT&T Unix V7"
1980. BSD 4.0"
1983. AT&T - Unix System V"
1985. BSD 4.3"
1989. AT&T - Unix System V R4.0"
1991. Linux 0.01 (9.3k lines C, 950 lines assembly)"
1994. Linux 2.0 (165k lines)
!3
Linux
User
Interface
!4
Utility Programs
Kernel
Kernel
Processes in UNIX
!8
POSIX
!9
s is an error code"
pid is a process ID"
residual is the remaining time from the previous alarm
!10
POSIX Shell
Threads in POSIX
!12
The ls Command
!14
UNIX Scheduler
Linux Scheduler
Real-time FIFO"
Real-time round robin"
Timesharing
"
!16
Booting UNIX
cp
Handling Memory
Process A
Process B
!18
Sharing Files
Two processes can share a mapped file.
s is an error code"
b and addr are memory addresses"
len is a length"
prot controls protection"
flags are miscellaneous bits"
fd is a file descriptor"
offset is a file offset
!20
Buddy algorithm
!22
Networking
Terminal Management
I/O (1)
I/O (2)
Before linking."
After linking.
(a)
(b)
Locking Files
s is an error code"
fd is a file descriptor"
position is a file offset
!31
s is an error code"
dir identifies a directory stream"
dirent is a directory entry
!33
File System
!34
File System
File System
File System
!39
Security in UNIX
s is an error code"
uid and gid are the UID and GID, respectively
!42