0

hi is anyone know round robin algorithm program ???in c++

16th Jul 2016, 3:54 PM
Learner
Learner - avatar
5 Respuestas
+ 1
Probably one of the easier ways to get the source code of a very well tested implementation would be to look up the round robin scheduler from the Linux kernel that is freely available as Linux is open source. Nevertheless, the Linux kernel is not written in C++ but in C. For an own implementation, you need three things: 1) a means to to be signalled after a certain time has passed 2) a means to preempt *any* thread 3) a means to store thread state No such means is provided by standard C++03 which is usable here at SoloLearn C++. Furthermore, you very likely program against a target operating system that prevents access to preempting other threads. Therefore be aware that you can only do this directly on hardware (as the operating system does) or as an extension to the operating system kernel. Consequencially, I can't give you code for a round robin scheduler but I hope you understand that just for the infrastructure w/o the scheduler quite a bit of code would be required. Even for limited functionality, support libraries and coding that is *far* beyond SoloLearn C++ and unsuitable for a forum format is required.
16th Jul 2016, 6:51 PM
Stefan
Stefan - avatar
0
You mean the code for a round robin scheduler?
16th Jul 2016, 4:39 PM
Stefan
Stefan - avatar
0
yes
16th Jul 2016, 4:57 PM
Learner
Learner - avatar
0
thanku stefan
17th Jul 2016, 5:52 AM
Learner
Learner - avatar
0
No problem. 😀
17th Jul 2016, 8:16 PM
Stefan
Stefan - avatar