Quantcast
Channel: In what sense does each thread appears to the operating system as a separate CPU? - Stack Overflow
Viewing all articles
Browse latest Browse all 4

In what sense does each thread appears to the operating system as a separate CPU?

$
0
0

In the book Modern Operating Systems,

Multithreading has implications for the operating system because each thread appears to the operating system as a separate CPU. E.g., Consider a system with two actual CPUs, each with two threads. The operating system will see this as four CPUs.

I don't understand that. A thread is a light weighted process which in turn is a running program. A cpu is a hardware.

A thread runs on a cpu.

An OS manages the hardware directly including cpu, while processes (including threads) see the hardware indirectly via the abstraction provided by OS. How can an OS not know how many cpus are there?

In what sense does each thread appears to the operating system as a separate CPU?

Thanks.


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles



Latest Images