1.Thread Scheduling
Threads
- User thread : thread library에서 지원됨 (LWP를 통해 간접적으로 Scheduled)
- Kernel thread : OS kernel에서 지원됨
OS에 의해 scheduled 되는것은 kernel threads 이다. (processes 가 아니고)
2.Contention Scope
경쟁을 하는 범위
- Process-contention scope (PCS) : user threads간 경쟁 (프로세스 안에서 경쟁)
- Many-to-one model or many-to-many model
- System-contention scope (SCS) : kernel threads간 경쟁 (시스템 전체에서 경쟁)
3.Pthread Scheduling
: Pthreads를 사용한 스레드 생성에서 PCS 또는 SCS를 지정할 수 있습니다
- PCS(PTHREAD_SCOPE_PROCESS):
- In many-to-one, only PCS 에서만 가능
- SCS(PTHREAD_SCOPE_SYSTEM):
- In one-to-one model, only SCS 에서만 가능
Related functions
- pthread_attr_setscope(pthread_attr_t *attr, int scope)
- pthread_attr_getscope(pthread_attr_t *attr, int *scope)
pthread_create -> kernel thread 생성 (SCS)
'Study > 운영체제' 카테고리의 다른 글
1. Introduction - Operating system structure and operation (0) | 2023.04.11 |
---|---|
1. Introduction - Computer system architecture (0) | 2023.04.10 |
5.CPU Scheduling - Multiple-processor scheduling (0) | 2023.04.10 |
5.CPU Scheduling - Scheduling algorithms (0) | 2023.04.10 |
1. Introduction - Computer system organization and operation (0) | 2023.04.10 |