| yu's profile表说偶无趣:)PhotosBlogLists | Help |
|
January 24 CLF很久不见的创意 :)(1) 一个kernel thread:wifed已经完全占有系统所有的资源,所有其他process比如以前运行多年的smoked, drinkd等统统被杀死,很多时候连process 0: idle都不允许运行。系统的所有的运行情况都受到这个超级task的监控。
该kernel thread在某种情况下还会fork出1个以上child process: childd。这种child process更是要命,甚至wifed都要没有机会运行。wifed有时候还会nice一下,给IDLE process一点喘息余地。可是childd根本一点道理都不讲。 wifed基本上希望独占系统,任何情况的context switch基本上被wifed检测到。这种情况下欲switch的task都被kill,而且不可屏蔽。即使侥幸躲过检测或者发生异常的情况下 (exception),完成了context switch,当wifed重新占有cpu时发现系统中竟然有非wifed, childd以外的loverd,这种情况下wifed会拼命去kill loverd。如果能够成功kill, 系统经过一次大的颠簸以后还可以运行下去;如果不能成功kill, 系统就会崩溃。反正随便context switch, 很可能会使系统进入不可知状态。 (2)此种不稳定情况有个专门的技术名词叫OOM(out of marriage)。在系统设计的时候,也有个糟糕的解决办法叫做OOM-killer:选出一个task然后放弃。可是对于系统中的各种task,每个 architect都有不同的取舍原则。这样就产生了各种算法。
做个简单的分析:现在系统中有三个task: wifed, childd和loverd。其中wifed和childd因为是parent-child关系,所以一荣俱荣,一损俱损。所有只有两种策略,要么保留 wifed进程组,要么保留loverd。哪种选择都是痛苦的。 January 16 Some Linux Cookies一些有趣的linus的发言,anyway,我ZT目的不是觉得他是个完美的人,不过他应该算个有趣的程序员,而且代码写的哈不错.
Dijkstra probably hates me "How should I know if it works? That's what beta testers are for. I only coded it." "I'm an idiot.. At least this one [bug] took about 5 minutes to find.." "If you want to travel around the world and be invited to speak at a lot of different places, just write a Unix operating system." > > Other than the fact Linux has a cool name, could someone explain why I > No. That's it. The cool name, that is. We worked very hard on > The day people think linux would be better served by somebody else (FSF `When you say "I wrote a program that crashed Windows", people just stare at |
|
|