Archive for 三月, 2007

Linux Kernel Hack (2)

Posted in [Linux] on 三月 30, 2007 by maximliu
  • 内核如何和IO设备进行通讯?

内核通过设备驱动和IO进行通讯。 设备驱动程序包括在内核中, 包括数据结构以及控制函数。 每个设备驱动和内核的其余部分通过一个特定的Interface单独进行通讯。

  • 这样的内核结构有什么好处?
    • 设备相关的代码可以被封装在特定的模块中。
    • 设备提供商可以在不熟悉内核代码的情况下开发新的驱动程序, 他们只需要知道Interface的标准。
    • 内核可以通过一个统一的界面和不同设备进行通讯。
    • 这种结构支持驱动程序的动态加载/去除,并且不需要对系统进行重新启动。

dd.jpg

Advertisements

Surely You’re Joking, Mr. Feynman!

Posted in 图书 on 三月 23, 2007 by maximliu

Surely You’re Joking, Mr. Feynman! is an edited collection of reminiscences by Richard Feynman, a Nobel Prize-winning physicist.

It expounds upon his human side with a number of personal and mostly

Surely You’re Joking, Mr. Feynman!

Surely You’re Joking, Mr. Feynman!

humorous anecdotes, detailing everything from his forays into hypnotism to his fascination with safe-cracking and his fondness for topless bars, as well as more serious topics such as the development of the atomic bomb and the death from tuberculosis of Feynman’s first wife, Arline Greenbaum.

The anecdotes were edited from taped conversations Feynman had with his close friend and drumming partner, Ralph Leighton. Its surprise success, selling more than 500,000 copies, led to a sequel entitled What Do You Care What Other People Think?, also taken from Leighton’s taped conversations.

This book by Amazon.de
当当网上的中文版

What Do You Care What Other People Think?: Further Adventures of a Curious Character

Posted in 图书 on 三月 23, 2007 by maximliu

This book is the second of two books consisting of transcribed and edited oral reminiscences from American physicist Richard Feynman. It follows Surely You’re Joking, Mr. Feynman!

The book presents his life as a series of humorous stories. Prepared

as he struggled with cancer, it was the last of Feynman’s

autobiographical works.

Nearly half of the book deals with his involvement on the Rogers Commission investigating the Space Shuttle Challenger disaster.

The book is much more loosely organized than the earlier Surely You’re Joking.

It contains short stories, letters and a few of the sketches that

Feynman drew in later life when he had learned to draw from an artist

friend, Jirayr Zorthian.

The stories are engaging, lively, and sometimes sad. Of note is the

story of his first wife, Arline, who died of tuberculosis while Feynman

worked on the atomic bomb.

This book by Amazon.de

到底什么是UML

Posted in [UML] on 三月 22, 2007 by maximliu

UML(Unified Modeling Language) 可以直接 翻译成统一建模语言. 对于UML我觉得可以通过
它的命名来更好的理解:

  • U like Unified: 统一是什么意思呢. 我们可以从几方面来理解:
    • UML综合和很多以往面对对象方法中被普遍接受的概念, 并给予它们清晰的定义, 表示法和术语
    • 支持软件开发周期中的无缝性. 在开发不同阶段可以用同一套概念和方法
    • UML可以用于不同领域的建模.
    • 编程语言以及开发平台的无关性
    • 不对开发过程的细节进行描述
  • M like Modeling: 建模
    • 模型是对系统结构和含义一般性说明
    • 模型是对现实世界的抽象, 很多现实系统中的细节在建模中间不被考虑. 比如说设计一个基于ATM交易系统, ATM传输协议在建模时候不会被考虑
    • 系统是模型的外延
  • L like Language:语言
    • UML是一种语言, 但是并不是编程语言, 而是一种规范语言(specification language)
    • 规范语言一般用于对系统的分析, 需求的分析等等高层次的描述, 实现系统不在规范语言的应用范畴.

(不断完善中)

Linux Kernel Hack (1)

Posted in [Linux] on 三月 20, 2007 by maximliu
  • Linux内核和Unix内核有什么区别?
  1. Linux支持动态加载内核模块。
  2. Linux支持SMP机制。传统Unix不支持SMP
  3. Linux内核可以是抢占。(Solaris and IRIX 同样支持Preemptive)
  4. 不区分Thread和Process。
  5. 忽略了Unix中一些不合适的特性。
  6. Linux体现了自由精神。
  • 内核开发的特点。
  1. 内核不能访问C库。libc太大,不适合内核开发。
  2. 内核开发必须使用GNU C。应为:
    • 支持inline 函数
    • 支持在C中嵌入汇编代码
    • 分枝申明用于优化(likely() ,unlikely())
  3. 没有内存保护机制。内核监视用户空间的内存非法访问,并强制结束用户进程,内核本身的内存错误会导致Oops ! Kernel panic
  4. 不轻易使用浮点数。内核对浮点处理不是很完美,(需要人工保存和恢复浮点处理器,很繁琐)栈的容量小而固定。32Bit机器为8K, 64位机器为16K
  5. 内核很容易出现race conditions。
    • 中断为异步的, 不考虑当前正再执行的代码段.
    • Linux内核为Preemptive.
  6. 内核注重可移值性. 代码应该和系统结构无关.

内核之旅

Posted in 计算机科学 on 三月 18, 2007 by maximliu
艰难的旅程开始。又一次开始折磨自己。
一个内核,二本书,三年时间,无数代码…没有原因, 只是为了一个很久以前的承诺。

另:不知道再Bill大叔门下的MSN Space写Linux和UNIX的东西会不会被他封掉, 嘿嘿…