摘要:http://grid.tsinghua.edu.cn/home/liulk/publish/computer/ThreadInWin2K.html 进程/线程模型 在传统的操作系统中,每个进程有一个自己的地址空间以及一个单一的控制流程。事实上,这几乎就是传统操作系统中进程的定义。 但是,现实中有很多情况下需要在同一个地址空间中完成并行的任务,比如Web服务器程序,虽然使用多进程方式编程也...
阅读全文
随笔分类 - Reading Notes
摘要:http://www.blogjava.net/junglesong/archive/2008/02/22/181356.html 当有多个线程在操作时,如果系统只有一个CPU,则它根本不可能真正同时进行一个以上的线程,它只能把CPU运行时间划分成若干个时间段,再将时间 段分配给各个线程执行,在一个时间段的线程代码运行时,其它线程处于挂起状态.这种方式我们称之为并发(Concurrent). 当系...
阅读全文
摘要:buffer 与cache 的区别 A buffer is something that has yet to be "written" to disk. A cache is something that has been "read" from the disk and stored for later use. 更详细的解释参考:Difference Between Buffer a...
阅读全文
摘要:在循环内及循环结束的时候都成立的表达式 一般而言,用这个式子表示希望得到的结果,如果在循环的每一步,这个式子都是正确的,那么循环结束后,这个式子也正确,并得到了期望的结果. lenovo所引用的文章里的例子是这样的: QUOTE: apvector list(n); // n is some positive integer int k, indexMax; index...
阅读全文
摘要:Binary search is said to be the oldest way to make a search. However, the difficulty of achieving it has been acknowledged by the whole IT fields. Knuth put the algorithm forward as early 1946 in the ...
阅读全文