免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 915 | 回复: 0
打印 上一主题 下一主题

Linux Kernel Development (2nd Edition)读书笔记(2) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-20 16:47 |只看该作者 |倒序浏览
Chapter 2:
The most important of these differences are
The kernel does not have access to the C library.
The kernel is coded in GNU C.
The kernel lacks memory protection like user-space.
The kernel cannot easily use floating point.
The kernel has a small fixed-size stack.
Because the kernel has asynchronous interrupts, is preemptive, and supports SMP(symmetrical
multiprocessing ), synchronization and concurrency are major concerns within the kernel.
Portability is important.
Chapter 3: Process Management
The process is one of the fundamental abstractions in Unix operating systems. The other
fundamental abstraction is files.
Linux不区分线程和进程,它认为线程是一种特殊的进程。
内核使用循环双向链表存储进程表,称为任务表(task list)。每个节点是struct task_struct类型。
Linux创建进程与其它操作系统使用一个函数创建不同,而是使用fork()和exec()来创建并执行。
不同于传统操作系统的fork(),Linux的fork()函数也是拷贝父进程形成子进程,但由于使用了Copy-on-write
技术,父进程和子进程不共享所有拷贝,大多数的拷贝都是只读的,只有在需要写入时,子进程才形成自己的
独有拷贝。一般情况,linux在fork()之后立即调用exec()执行子进程,所以子进程并不需要形成自己的拷贝
,省却了大多数数据的拷贝,提高了系统效率。
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/13220/showart_69417.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP