Can a task have multiple states?

A little correction about what I said in class… I said that technically, a task could have multiple states because it’s a bitmask┬ábut not in practice. It seems that was before that, and searching for┬áTASK_KILLABLE in the linux kernel code (and not sched.c only, that was my mistake), you’ll find for example in timer.c :




And TASK_KILLABLE is a combinaison of two states… So it’s not just used for convenient “multiple test at once”.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.