Switching out TSS
Posted: Sun May 17, 2009 7:29 am
In the current design of my OS, processes (or the kernel) are able to send "signals" to other processes - simple, synchronous, one way messages that preempt the receiver's current state. It is possible to have a signal preempt another signal's currently running signal handler.
The issue is that I can't get stuff to preempt, because the TSS's esp0 value is static, and the same, for all processes. The address of the TSS's esp0 points to a small stack used to save the process image, which I need to act as a stack of process images.
Regardless of if you understand what is happening, the point is that I want to be able to change the TSS's esp0 value on a process-by-process basis. This involves setting the TSS entry in the GDT to some area of memory that is switched out with each process. However, I do not and do not want to use the x86's hardware task switching. Is this possible, or do I have to come up with some other method?
The issue is that I can't get stuff to preempt, because the TSS's esp0 value is static, and the same, for all processes. The address of the TSS's esp0 points to a small stack used to save the process image, which I need to act as a stack of process images.
Regardless of if you understand what is happening, the point is that I want to be able to change the TSS's esp0 value on a process-by-process basis. This involves setting the TSS entry in the GDT to some area of memory that is switched out with each process. However, I do not and do not want to use the x86's hardware task switching. Is this possible, or do I have to come up with some other method?