Multitasking and cr3 updating.
Posted: Thu Apr 23, 2009 7:34 am
In my multitasking code, each task is given the same time of duration (the frequency of the PIT) and I'm simply implementing the Round Robin algorithm.
Well, since I've entered usermode task scheduling will take much more time since I'll have to update the cr3 which is a long process.
How can I get my code work faster and make the long process of updating the CR3 register faster (I'm of course checking if currenttask->page_dir equals to nexttask->page_dir and update it according to the results). I think there's no other solution than just update the cr3 everytime needed, but any suggestions are welcomed.
Thanks.
Well, since I've entered usermode task scheduling will take much more time since I'll have to update the cr3 which is a long process.
How can I get my code work faster and make the long process of updating the CR3 register faster (I'm of course checking if currenttask->page_dir equals to nexttask->page_dir and update it according to the results). I think there's no other solution than just update the cr3 everytime needed, but any suggestions are welcomed.
Thanks.