geek
geek

Reputation: 2847

context switch between threads

I have some question about linux-kernel, let's assume that I have two threads in my process, if one thread was trying to read some info and because of it occured page fault, the second thread will be blocked or not? thanks in advance

Upvotes: 1

Views: 321

Answers (1)

cnicutar
cnicutar

Reputation: 182619

When one thread blocks for whatever reason, every other thread is free to run. This is the main advantage of kernel threads (1:1) versus user threads (N:1).

Basically in this context, each thread is a KSE (Kernel Scheduling Entity) and is scheduled independently.

Upvotes: 3

Related Questions