Several interrupts can be waiting at the end of a cycle. You will write the part that chooses the order in which their service routines run.
Your tasks.
highest: return the name of the waiting interrupt with the highest priority (the largest number).service_order: return the names of all the waiting interrupts in the order they are serviced. The highest priority goes first. For equal priorities, the one that arrived first goes first.Each waiting interrupt is a tuple (name, priority, arrival).
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…