이번에는 synchronization primitives. 동기화 도구들의 Priority scheduling에 대해서 알아보도록 하자.
핀토스에 존재하는 synchronization 도구들의 종류에는 Lock, Semaphore, Condition Variables 총 3가지가 존재한다. struct lock { struct thread *holder; /* Thread holding lock (for debugging). */ struct semaphore semaphore; /* Binary semaphore controlling access. */ }; 먼저 Lock이란 세마포어와 *holder, 즉 lock을 들고 있는 thread의 정보를 저장하는 변수를 가지고 있는 구조체를 뜻한다. struct semaphore { unsigned value; /* Current value. */ struct list waiters; /* List of waiting threads.
*...
#
os
#
pintos
#
운영체제
#
운체
#
핀토스