I've read the operating system concepts 8th edition written by abraham silberschatz. However, I don't understand Pthread Scheduling.Thread-library schedules user-level-threads on LWP(Lightweight Process).This is Process-Contention Scope(PCS) because contention occurs between threads belonging to the same process.OS schedules kernel-threads on CPU.This is System-Contention Scope(SCS) because contention occurs between all threads belonging to the system.I thought that PCS is corresponding to user-level-thread and SCS is corresponding to kernel-level-thread.But the following code is setting thread mode as user mode.pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);I don't understand why it is user mode, not kernel mode.Please Someone aware of this let me know, thank you for reading.
Pthread scheduling (System and Process)
multithreading;operating systems;scheduling;scope