Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Comparator
- {
- bool operator()(const process &lhs, const process &rhs) const
- {
- if(lhs.get_Priority() == rhs.get_Priority())
- return (lhs.get_arrivalTime() > rhs.get_arrivalTime());
- else
- return (lhs.get_Priority() > rhs.get_Priority());
- }
- };
- priority_queue<process, deque<process>, Comparator> ReadyQueue;
Add Comment
Please, Sign In to add comment