Hacker News new | ask | show | jobs
by pzh 1831 days ago
You can argue in the opposite direction that stealing $1,000 should be prioritized because it gives more buying power to those criminal gangs and it finances more criminal activity than the $100.
1 comments

Right, which is the current state of affairs. The problem is well known in OS scheduling. If you have jobs that are prioritized over others, and there is more work than workers as is the case with the police, you'll have lower-prioritized jobs that are NEVER executed.

I don't know how OSes solve these problems.

https://en.wikipedia.org/wiki/Round-robin_scheduling

Round robin is one of the algorithms that may be employed by an OS to handle scheduling. The problem you're talking about is known as 'starvation'.

The frequent context switching is a source of inefficiency here- if you interrupt one job to switch to another, you've got to ditch everything in memory from job 1 and load a bunch of new data from disk for job 2. And then when you switch back to job 1- same deal. I'd imagine the same would apply, maybe even more so, for people