
http://hosted.cjmovie.net/TutMultitask.htm
Code: Select all
if(CurrentTask == 0)CurrentTask = 1;
else CurrentTask = 0;
Code: Select all
currentTask = (currentTask + 1) % 2;
or move them to a separate "blocked" list.and make your taskSwitch function skip over any threads which are not-runnable until it find a runnable one...
How about naming the method, and providing a brief description of it, so the reader can see what is coming up without reading the whole document, and decide if this is what they want, or they already know that, etc. It also helps to remember things when you come back. (an "abstract" of the document)To use the method I try to describe here, which is among the simplest,
Will this method work with privileges and separate address spaces, and why?You should now have enough understanding to bring your OS from the DOS age of mono tasking...to the modern age of multi-tasking, multi-threaded operating systems!
1. linux is not CLI-based, CLI may be linux-based. You can start X11 at any time, if you have it.Even the CLI (Command Line Interpreter) based linux (using bash, or the like)
I assume you mean Alt+F* - that switches consoles (terminals), not processes. You switch between processes (jobs) in shell using fg, bg and ctrl+z to move processes to and from background execution or suspension.is multitasking - You can switch between processes with F1, F2, F3 and F4 on debian, for instance.
Yes, that would make my life easier. But it would also make my life more boring, more useless, and less of a lot of other things. This is exactly why I posted - I was hoping for improvements.I'll shut up now.
Code: Select all
Threads[id].esp0 = AllocPage() + 4096;