Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RTC vs PIT for scheduler

My professor said that it is recommended to use the PIT instead of the RTC to implement a epoch based round robin scheduler. He didn't really mention any concrete reasons and I can't think of any either. Any thoughts?

like image 804
Sid Avatar asked Dec 20 '13 21:12

Sid


1 Answers

I personally would use the PIT (if you can Only choose between these two, modern OSes use the HPET iirc)

One, it can generate interrupts at a faster frequency (although I question if preempting a process within milliseconds is beneficial)

two, it has a higher priority on the PIC chip, which means it can't be interrupted by other IRQs.

Personally I use the PIT for the scheduler and the RTC timer for wall clock time keeping.

like image 124
zhiayang Avatar answered Dec 18 '22 02:12

zhiayang