Guest User

Untitled

a guest
Oct 12th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. struct Comparator
  2. {
  3. bool operator()(const process &lhs, const process &rhs) const
  4. {
  5. if(lhs.get_Priority() == rhs.get_Priority())
  6. return (lhs.get_arrivalTime() > rhs.get_arrivalTime());
  7. else
  8. return (lhs.get_Priority() > rhs.get_Priority());
  9. }
  10. };
  11.  
  12. priority_queue<process, deque<process>, Comparator> ReadyQueue;
Add Comment
Please, Sign In to add comment