[Prev][Next][Index][Thread]

Re: Problems coding a scheduler



Imobac Exposito (alu1360)-Vicente Cruz (alu1345) - Fresnadillo Perez (alu1364)
wrote:
>  * We have two processes and a scheduler. The scheduler call the
>  * processes and everything seems to work fine. But after a while(just
>  * a few seconds on a 80386, more time in a pentium which is really weird)
>  * the scheduler schedule one process with the IF off, so the scheduler
>  * is never called back again.
>  * The same happens when we code the scheduler as an interrupt gate.
>  * What have we done wrong?
>  * Thank you.

I haven't had a good look at your code, but I had a similar problem once.  Try
growing your user and/or kernel stacks.  The problem with my code was that the
stack was overflowing, and in the process overwriting the TSS that was right
behind it.  These kind of errors are very hard to find; the key symptom is
always for me that something seemingly completely unrelated happens if you add
a few instructions somewhere, or stick in a variable (that causes the relative
locations of data to move.)  It might be something completely different but
it's worth a try.  Certainly the fact that it takes a few seconds in stead of
happening right away is typical.

Ramon