Scheduling

Pre-emption is a common scheduling in time sharing systems. Any process may be suspended at an apparently arbitrary moment to allow some other process to run. This is often to achieve a ;SPM_quot;fair share;SPM_quot; of processing time. In pre-emptive operating systems, the granularity interleaving may be as small as a single instruction. Run-to-completion is more common in monolithic or embedded systems. Each process runs until it has completed the current task, and then voluntarily hands control back to a scheduler which decides which process to run next. In run-to-completion real time systems, the granularity of interleaving will be decided by the programmer. In a distributed system, there is real concurrency whether we want it or not. This brings special problems: