Implementation of dining philosophers algorithm in C