Amazon interview question

Implement a priority scheduler for an OS