Quantcast
Channel: Active questions tagged operating-system+scheduling - Stack Overflow
Viewing all articles
Browse latest Browse all 209

Is a schedulable unit of CPU time slice process or thread?

$
0
0

I want to clarify whether "a schedulable unit of CPU time slice" is "process" or "thread" (kernel managed thread). What I mean by "schedulable unit of CPU time slice" is the unit which CPU scheduler of an operating system allocates CPU time slice.

According to "Short-term scheduling" in wikipedia, process is used to refer the schedulable unit.

"This scheduler can be preemptive, implying that it is capable of forcibly removing processes from a CPU when it decides to allocate that CPU to another process"

Also, according to "Time slice" in wikepedia,

"The scheduler is run once every time slice to choose the next process to run."

Also, according to "Thread" in wikepedia,

"a process is a unit of resources, while a thread is a unit of scheduling and execution"

According to "Processes and Threads" in microsoft docs,

"A thread is the basic unit to which the operating system allocates processor time."

According to "Is thread scheduling done by the CPU, kernel, or both?" in quora,

"The CPU (hardware) just carries out instructions. The CPU itself has no concept of threads or scheduling, although there may be features in the CPU that support them.

"The operating system kernel (a set of instructions, aka software) executes on the CPU (hardware). A scheduling algorithm in the kernel of the operating system chooses which thread to execute next, and directs the CPU to begin executing the next instruction in that chosen thread".


Viewing all articles
Browse latest Browse all 209

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>