CSDN博客

img kenryHuang

NB OS Release 1.0 Message

发表于2004/6/23 21:50:00  1008人阅读

新写的操作系统,基本模块都已经搞定,不过名字还没想好,暂时代号叫NB吧。
主要竞争对手是Microsoft的下一代操作系统Longhorn.
公开部分核心源代码,想来你们也看不懂,无所谓;
顺便提一下,所有源代码都是用我新发明的语言
MFC(当然不是Microsoft的MFC,而是Mother Fucking Cool)写的。


Module Kernel
{
 members:
 Message Queue;

 functions:
 Dispatch Messages;
 Peek Messages;

};


Module ProcessManager
{
 members:
 Process Control Block;
 Input Process Queue;
 Ready Process Queue;
 Block Process Queue;
 Suspend Process Queue;

 functions:
 Sked; // schedule process
 Dispatch; //
 Fork; // new child process
 Kill;

};


Module MemoryManager
{
 members:
 Memory Blocks;
 functions:
 Allocate memory;
 Free memory;
};

Module DeviceTerminal
{
 members:
 Shit;
 functions:
 Fuck;
};

Program Flow:

Entry:
 // initiliaze all devices;
 vector devices;
 for_each(devices.begin(), devices.end(), init);

 // just print a string as "hello world"
 KernelPrintString("Hello SB, welcome to NB Operation System!");

Run:
 kernel = new Kernel;
 pm = new ProcessManager(kernel, devices);
 while (!pm.emptyReadyQueue()) {
 pm.Sked();
 pm.Dispatch();
 BlockAndAcceptUserInputs();
 }

Accept User input:
 if (anything happens) {
 KernelPrintString("SB, Don't fiddle with anything!");
 MotherFucking();
 BreakDown();
 }

BreakDown:
 KernelPrintString("Never try to use this system again, Stupid!");
 Exit;
End Program.



如果你们在未来的2006年使用Microsoft的Longhorn时候发现本程序中
的"SB, Don't fiddle with anything!"字样,很遗憾,那我肯定是被该死
的bill挖角了。
0 0

相关博文

我的热门文章

img
取 消
img