⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sched.txt

📁 MINIX操作系统的内核修改补丁
💻 TXT
字号:
THINGS DONE:The realtime scheduler is added to the minix system by implementing a system call, a task(kernel) call and modifying the process scheduler. We have found that message passing does not work globally, it only works on the adjacent layers. We chose to use calling the libraries of each layer instead so as to remove the unnecessary complications.So, we added a user library, "setdl(long deadline)" in the unistd.h and send its message to PM(Although we have to call it MM for backward compatibility). Then the PM can find out who_p is calling and insert the info into a new message and hand over to the _taskcall. We needed to add a kernel call to handle this piece of info. Then the kernel drags out the process number and the deadline given and shove them into the process structure(yes, we added a long value in proc structure for the deadline).Finally, in the proc.c file we made the realtime process keep their priority at exactly the value when it's executed(normally 7). For each priority, we choose the one with the earliest deadline(excluding 0 value since they are not rt processes) to run.The test program can be forked 4 times, that is, 16 copies of it can reach its final destination without traffic jam after what we have done to our little minix. THINGS NOT DONE:We have not periodically reduce the rt processes' deadline out of performance concerns. And a long int value in minix could hold 32 bits, then it must can keep the real-time process running for a long time.ALSO:There is one file needed to be created as an empty file: src/lib/posix/_setdl.cThe default patch command in minix does not create non-existant files, while the GNU diff sees empty files as zero-length files. This difference creates more complication.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -