Understanding the linux kernel-ch1-overview

Chapter 1. Introduction
1.4Basic Operating System Concepts
Multiuser Systems
Users and Groups
Processes
Kernel Architecturemicrokernel
monolithic
modules
1.5. An Overview of the Unix Filesystem
current working directory
absolute/relative directory
Hard and Soft Links$ ln p1 p2create a new hard link that has the pathname p2 for a file identified by the pathname p1.
Hard links limitations:
It is not possible to create hard links for directories
Links can be created only among files included in the same filesystem
$ ln -s p1 p2creates a new soft link with pathname p2 that refers to pathname p1
File Typesfile -h filename
Regular file
Directory
Symbolic link
Block-oriented device file
Character-oriented device file
Pipe and named pipe (also called FIFO)
Socket
File Descriptor and Inode
inode
File type (see the previous section)
Number of hard links associated with the file
File length in bytes
Device ID (i.e., an identifier of the device containing the file)
Inode number that identifies the file within the filesystem
UID of the file owner
User group ID of the file
Several timestamps that specify the inode status change time, the last access time, and the last modify time
Access rights and file mode 
Access Rights and File Mode
suid
sgid
sticky
File-Handling System Calls
fd = open(path, flag, mode)
Accessing an opened file
sequentially or randomly
nread = read(fd, buf, count);
write( )
newoffset = lseek(fd, offset, whence);
Closing a file
res = close(fd);
res = rename(oldpath, newpath);
res = unlink(pathname);
1.6. An Overview of Unix Kernels
User Mode
Kernel Mode
kernel thread
system call
kernel routines can be activated in several ways:
system call
exception
interrupt 
kernel thread
Reentrant Kernels
reentrant function
control path
private Process Address Space
synchronization
critical region
Each semaphore may be viewed as an object composed of:
An integer variable
A list of waiting processes
Two atomic methods: down( ) and up( )
Spin locks
fork( )
exec( )
exit( ) 
wait4( ) 
MMU
Virtual memory
 Kernel Memory Allocator(KMA) 
It must be fast
It should minimize the amount of wasted memory
It should try to reduce the memory fragmentation problem
It should be able to cooperate with the other memory management subsystems to borrow and release page frames from them
·         Resource map allocator
·         Power-of-two free lists
·         McKusick-Karels allocator
·         Buddy system
·         Mach's Zone allocator
·         Dynix allocator
·         Solaris 's Slab allocator
demand paging 
Copy On Write       
           
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值