How can I do a round robin scheduling of threads in VC++?

I haven't much experimented threads on Windows yet, but as far as I understand the SDK documentation, what you're creating is this situation: Your programs is allocated a process containing all the ressources he needs to execute. Inside this process, you will create three threads which Windows will consider as pieces of executable code to which he can allot CPU time at its will. So, Windows is deciding when a thread runs.

Not your application. All you can do is ask Windows to grant a level of priority to each of your thread. We could imagine a set of semaphores shared by the threads, so that each thread would know if it has to yield back to Windows as long as another of your threads - which you would temporarily consider as dominant - hasn't ended it task.

But I don't know much, how you can compute the amount of CPU time a thread has been allotted up to some point. Edit: In fact, I think that infinite loops in threads are not a problem, because Windows must be pre-emptive now. That ... more.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions