I was going through the example given in this page. (A scheduler and a OS), http://ift.tt/1tnVSgI.
This got me thinking, that each Operating System, will have a unique implementation of scheduling algorithms. Example, Windows will have an implementation for the Preemptive scheduler, and Time Sliced Scheduler, Unix will have an implementation of Preemptive and time sliced and so on.
So while calling a scheduler, we will also have to specify, along with implementation, the algorithm. Which will require implementing both algorithms, and passing a flag to decide which algorithm to call.
Will this actually be bridge pattern? or just a special case of adapter pattern. If so, Is the example given actually correct with respect to implementation details.
Aucun commentaire:
Enregistrer un commentaire