threads & tasks management
Posted: Sat Oct 28, 2006 5:54 am
I am thinking about second wersion of my kernel in which I will implement threads. So I have some questions about their management.
I assume that every kernel have some maximum possible in the moment number of TAsks (e.g 256) and THreads (eg. 8192). And now I have dilemate ;/. Should my OS support fixed MAX number of THreads per TAsk (in this example 8192/256 = max 32). Or should it support only one THread per TAsk that will be guaranteed (256 THreads guaraneed) and the rest possible THreads could be dynamically created and destroyed by TAsks on their needs (e.g. TAsk1 has 60 threads and TAsk2 has 5)? In second option TAsks that have more needs of THreads can be supported by the cost of less THreads required TAsks that have them only one or few for e.g.
What do you think about that ?
I assume that every kernel have some maximum possible in the moment number of TAsks (e.g 256) and THreads (eg. 8192). And now I have dilemate ;/. Should my OS support fixed MAX number of THreads per TAsk (in this example 8192/256 = max 32). Or should it support only one THread per TAsk that will be guaranteed (256 THreads guaraneed) and the rest possible THreads could be dynamically created and destroyed by TAsks on their needs (e.g. TAsk1 has 60 threads and TAsk2 has 5)? In second option TAsks that have more needs of THreads can be supported by the cost of less THreads required TAsks that have them only one or few for e.g.
What do you think about that ?