Welcome to the Linux Foundation Forum!

What does it mean that scheduling is preemptive?

Hi,

In Section 15. Processes - What is a process it says that:

"Processes are controlled by scheduling, which is completely preemptive. Only the kernel has the right to preempt a process; they cannot do it to each other."

But I don't really understand what this means. Can someone please clarify?

Thanks you,

Best Answer

  • coop
    coop Posts: 916
    Answer ✓

    to preempt someone means to kick them out of their position in front of you and you take priority. Just a dictionary definition really

Answers

  • cocobongo
    cocobongo Posts: 12

    Ah, I see. Does it makes sense to say that the scheduling process ensures which process should be running at any given time, then?

    Thank you

  • luisviveropena
    luisviveropena Posts: 1,234

    Hi @cocobongo, well, the scheduler says what's the next process in the line. If it runs or not, that's another thing (it could fail because not enough memory, etc).

    From the "man sched" page:

    "The scheduler is the kernel component that decides which runnable thread will be executed by the CPU next".

    I hope that helps,
    Luis.

  • cocobongo
    cocobongo Posts: 12

    Hi Luis, thank you for the answer it's very helpful indeed.

  • luisviveropena
    luisviveropena Posts: 1,234

    Hi @cocobongo, that's good! And it's a pleasure :)

    Regards,
    Luis.

Categories

Upcoming Training