What is Preemptive/time-shared multitasking?

  • 0

    Source: Asked in one of my interviews
    Description: Preemptive multitasking is one type of multitasking that allows the processes to share the OS and other hardware resources like CPU, Printer etc.
    The OS decides the time that should be given for each process and after the time elapse the resources are allocated to the next process in the queue. However depending on task's priority, additional time might be allocated to some processes eg(OS specific background tasks that cannot be interrupted due to lack of resources).
    To prevent a process from taking indefinite/full control over the resources, the preemptive multitasking restricts the time allocated for each process to use the resources.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.