What is preemptive multitasking?

后端 未结 3 982
梦谈多话
梦谈多话 2021-01-29 07:31

What is preemptive multitasking? After googling it I couldn\'t find an answer can someone help me?

3条回答
  •  心在旅途
    2021-01-29 07:48

    simply if a process is a preemptive then it can be stopped and send to ready queue by external interruption(trap).

    1. When a process switches from the running state to the waiting state (for example, as the result of an I/O request or an invocation of wait() for the termination of a child process)
    2. When a process switches from the running state to the ready state (for example, when an interrupt occurs)
    3. When a process switches from the waiting state to the ready state (for example, at completion of I/O)
    4. When a process terminates

    For situations 1 and 4,there is not-preemptive

提交回复
热议问题