Page 1 of 1

fault, etc

Posted: Thu Aug 12, 2010 11:27 am
by digo_rp
Guys, I have a question, could anyone helps me ?

for example, I have 2 tasks running at ring 3 so, that 2 tasks crash in the same fault, and the same time...

now is the question. my isr 13 e.g displays the error at screen and wait for a key, " enter " now, how could I hand that screen

for that 2 tasks at the same time ?

anyone knows how to take care of it ?

this example is in text mode.

in gui mode just wait for mouse click. the biggest problem is that I need interrupts enabled when that fault happens.

Re: fault, etc

Posted: Thu Aug 12, 2010 11:30 am
by Andr3w
digo_rp wrote: for that 2 tasks at the same time ?
2 tasks can't run at the same time - so they can't fail at the same time.

Re: fault, etc

Posted: Thu Aug 12, 2010 12:14 pm
by mutex
Lets assume you have SMP working. I have, and i have seem similar issue when i created two threads out of same code once and that code generated a fault.

What i did was; create a mutex and lock it when you enter your "BlueScreen" or whatever function.. Then if your mutex function is coded properly with ATOMIC instructions then this should make sure only one of them make it further..

Thats atleast how i did it.. Btw; you could issue a NMI IPI to all other AP's and tell them to go "hang" around forever while the current AP running shows the bluescreen. Then you are sure nothing else is running in background.

-
Thomas

Re: fault, etc

Posted: Thu Aug 12, 2010 3:24 pm
by skyking
Since it is ring 3 processes I guess that the kernel is still operational so there's really no reason why this at all should be a problem. There's really no reason to need the interrupts to be disabled just because some of the processes has faulted.

If the processes are interactive you should have some kind of method for switching keyboard focus, and preferably their separate output should be identifiable (writing to different areas of the screen/switchable consoles). In that case the fault handler could be run in parallel.