Linux System Programming 学习笔记

the sector is the smallest addressable unit on a block deviice.
the block is the smallest addressable unit on a file system.
the page size is the smallest unit addressable by the memory management unit.

sector = 512 bytes
block = sector * 2(power 0, 1, 4) = 512 bytes, 1 KB, 4 KB
sector <= block <= page size


|------ data
|------ resources
|------ state
|------ virtualized computer

ELF section

text section: executable code, readonly data
data section: C variables with values, readable and writable
bss section: uninitialized global data

real uid is always that of the user who started the process.
effective uid may change under various rules to allow a process to execute with the rights of different users.
saved uid stores the original effective uid, its value is used in deciding what effective uid values the user may switch to.
filesystem uid which is usually equal to the effective uid, is used for verifying file system access.

real gid
effective gid
save gid
filesystem gid

IPC mechanism supported by Linux:

named pipes
message queues
shared memory

This entry was posted in GNU/Linux and tagged . Bookmark the permalink.