Notes 0000 [The Design and Implementation of the FreeBSD Operating System]

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

wait
fork
execve
exit
parent process
parent process
child process
child process
zombie 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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值