Multitasking Flashcards
What is Multitasking?
Multitasking enables a computer to execute multiple tasks or processes simultaneously. Multiple programs can be managed and run at once. Modern systems use Dynamic Multitasking.
Why is Multitasking important?
Processors are very fast, but users and peripherals are slow. Processors may spend a lot of time not doing anything, either waiting for user input or a disk to read data. Multitasking minimizes waiting time by executing other processes.
How does Multitasking work?
The processor switches between different tasks every few milliseconds.
What is a Timeslice?
A Timeslice is the length of time a task is given to run before it is interrupted. It is not a set length, can very. Organised by the Scheduler.
What are Task States?
A processor can be in 3 states: Running, Ready, and Waiting.
What is the Running state?
The task is executing right now.
What is the Ready state?
The task is not currently running, but it could run if it is allowed by the Scheduler. It is in the pool of tasks to run eventually.
What is the Waiting state?
The task cannot run. It is waiting for I/O data or something else, and cannot do anything until that condition is satisfied.
Describe the Tasks process
Tasks begin at a Ready state. Eventually they’re scheduled to the Running state. At some point they are either blocked and go to the Waiting state, or they are pre-empted and return to the Ready state to allow other tasks to run. If blocked, they will eventually be unblocked when data arrives.
What is a Context Switch?
Context Switching is when an Operating System saves the context or state of a running process so that it can be restored later, and then loading the context or state of another process and running it.
What are the disadvantages of a Context Switch?
Has a cost in time and energy. One of the challenges of the OS is to minimize that by keeping context switches to a minimum but giving a fair chances for all tasks to complete and not miss urgent tasks.
What is the Scheduler?
The Scheduler is part of the Operating System Kernal and is software that schedules the processes in the Operating System. it helps keeps computer resources busy and efficient. It uses the round-robin system.
What are key features of the Scheduler?
Picks which task to run next. Round-Robin system is fair, but inefficient. Not all tasks are equally important or urgent.
What is Time Sharing?
Time Sharing allows multiple users to access computer resources for a specified Time Slice.
What is the difference between Time Sharing and Multi-tasking?
Time Sharing allows multiple users to access computer resources whereas multi-tasking focuses on running different applications at the same time.