Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

Multi-programming (or multi-tasking) enables more than a single process to apparently execute simultaneously. How is this achieved on a uniprocoessor?

Multi-programming (or multi-tasking) enables more than a single process to apparently execute simultaneously. How is this achieved on a uniprocoessor?

Answers


Faith
Multiprogramming is achieved on a uniprocessor by the concept of “threading”. Every process' total
running time is divided up into threads, which are a subset of the process' instructions that can be
completed in a certain amount of time, called a timeslice. When a thread's timeslice is finished, CPU time
has to switch to a different thread. On a large scale, these timeslices are nanoseconds long, so it
appears to the user that the processor is processing processes concurrently. The ultimate goal is to keep
the system responsive while really maximising the processor's ability to process.
The above scenario is known as Pre-Emptive multitasking. An alternative scheme is Cooperative
Multitasking, where each process occasionally yields the CPU to another process so that it may run.
Titany answered the question on April 25, 2022 at 13:55

Answer Attachments

Exams With Marking Schemes

Related Questions