Steve
Steve

Reputation: 731

Will the entire process block when a system call is made or only the thread?

If a thread made a system call, will the entire process block until the kernel finishes executing the system call, or will only the thread that made the system call be blocked?

Upvotes: 2

Views: 1949

Answers (1)

user3344003
user3344003

Reputation: 21657

If you are using real threads created by the operating system, the answer is NO. The threads execute independently and are scheduled independently.

If you are using threads simulated by a library (which you can do in Linux if you are really crazy), then all the threads might block, depending upon the system call at issue.

Upvotes: 2

Related Questions