An OS without context switching
Posted: Mon Oct 24, 2011 8:37 am
Context switching was expensive in 32 bit systems. In 64 bit systems it is more expensive because there were more registers added. Intel's Sandy Bridge architecture introduced AVX extensions where register size was doubled to 256 bits. Intel will soon release AVX with 512 bit registers. A context switch will cost even more if all your apps use AVX. Also, if you use IGP that is on chip in Core i7-2600, you would have to save IGP registers too. Some day context switch will be impossible because of its slowness.
So, then a question arises:
How would you deal with this problem?
One solution would be to:
This is the only solution that comes to mind, are there any other ideas?
Will appreciate your comments.
Regards
Nulik
So, then a question arises:
- Would it be possible to implement an OS without context switching?
How would you deal with this problem?
One solution would be to:
- 1. Define maximum run time for a snippet. (here snippet=process)
2. Run sort of 'watchdog' code triggered by a timer interrupt that will run ever XXX microseconds and check if some snippet has ran more than it should and kill it.
This is the only solution that comes to mind, are there any other ideas?
Will appreciate your comments.
Regards
Nulik