Kernel Organization
Basic kernel facilities: timer and system-clock handling, descriptor management. and process management
Security features:conventional UNIX model, but also sandboxing, virtualization. event auditing, and cryptographic services
Memory-management support:paging and swapping
Generic System interfaces:the I/O, control,and multiplexing operations performed on descriptors
Filesystems: files,directories, pathname translation,file locking,and I/O buffer management
Terminal-handling support:the pseudo-terminal interface and terminal line disciplines
Interprocess-communication facilities:sockets
Support for network communication: communication protocols and generic network facilities,such as routing.
machine dependent software:
Low-level system-startup actions
Trap and fault handling
Low-level manipulation of the run-time context of a process
Configuration and initialization of hardware devices
Run-time support for I/O devices
Something you need to konw:
A system call usually is implemented as a hardware trap that changes the CPU’s execution mode and current address-spacfe mapping.
parameters supplied bu users in system call and addresses used for the return of results are all be validated.
Process management
In FreeBSD, the process context consists of uesr-level state, including the contexts of its address space and the run-time enviroument, and kernel-level state, which includes scheduling parameters,resource controls, and identification information.
PID(process identifier) a value used by the kernel to identify a process
Process-management system calls.
Signals
The system defines a set of signals that may be delivered to a process. Signals in FreeBSD are modeled after hardware interrupts. A process may specify a user-level subroutine to be a handler to which a signal should be delivered. When a signal is generated , it is blocked from further occurrence while it is being caught by the handler. Catching a signal involves saving the current process context and building a new one in which to run the handler. The signal is then delivered to the handler,which can either abort the process or return to the executing process. If the handler returns, the signal is unblocked and can be generated(and caught ) again.