Thundering herd problem
The thundering herd problem occurs when a large number of processes waiting for an event are awoken when that event occurs, but only one process is able to proceed at a time. After the processes wake up, they all demand the resource and a decision must be made as to which process can continue. After the decision is made, the remaining processes are put back to sleep, only to all wake up again to request access to the resource.
This occurs repeatedly, until there are no more processes to be woken up. Because all the processes use system resources upon waking, it is more efficient if only one process was woken up at a time.
This may render the computer unusable, but it can also be used as a technique if there is no other way to decide which process should continue (for example when programming with semaphores).
About
다수의 프로세스들이 하나의 이벤트를 기다리며 Waiting 상태에 있다가, 해당 이벤트가 발생하면, 관련된 모든 프로세스들이 Wake-up 하여, 쓸모없이 CPU 를 낭비하게 된다.
동시에 여러 사용자를 서비스 하기 위하여 아파치와 같은 웹서버는 다수의 프로세스를 동시에 띄웁니다. 사용자 접속이 없을때는 모든 웹서버 프로세스들이 Sleep 상태에 있다가, 하나의 사용자 접속이 있게 될때, 이것을 처리하기 위하여 필요한 것은 하나의 웹서버 프로세스이지만, 모든 웹서버 프로세스들이 다 깨어나서, 쓸모없이 CPU를 낭비하는 현상을 thundering herd problem 라고 한다.
See also
- Process management (computing)
- Lock convoy
- Sleeping barber problem
- TCP global synchronization
- Cache stampede
- Multi Thread
- Synchronization