Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
In operating multitasking operating systems if one program crashes the system can keep on running, right?
That's not right. If everything runs in the same ring, any process can crash the entire system. Using ring0 for kernel and ring3 for apps should improve the overall stability IIRC.
Multitasking doesn't imply a program can run independently of other programs. Multiprogramming (e.g. using multitasking and multiple address space, giving each program a separate memory space and a separate 'processor state') more or less help, but not necessarily.
A program that crash may leave files locked, shared things in invalid states, etc. It does not automatically crash the whole system with it, but it can lead much of the system in an incoherent state.
Multitasking simply means that if a program is *blocked* because waiting for something, it usually doesn't block other programs along, and thus the system can go on with (other) useful job.
I think KieranFoot's non-understanding sits at a deeper level: memory protection...
Modern CPU's contain an auxiliary feature called a "Memory Management Unit". This part of the CPU provides a mapping from "virtual addresses" (used by the running process) to "physical addresses" (i.e., actually existing RAM addresses).
Since every running task gets its own, non-overlapping memory map, a crashing task cannot damage another task since it cannot "see" the other task at all.
That taken into account, your list would look like:
* save current system registers;
* point MMU to new tasks' memory map;
* load new task's registers;
* run x bytes of task code;
* repeat.
This is grossly oversimplified, but should give an idea of how tasks can be protected from each other. Any communication between tasks is done via the kernel (which is the only part of the system "seeing" all tasks).
Every good solution is obvious once you've found it.
This way, we avoid Transaction Lookaside buffer flushing if
only switching to another *thread* inside the actual *process* *gg* I'm not nitpicking am I? ];->