文件名称:thinking
介绍说明--下载内容均来自于网络,请自行研究使用
根据哲学家进程间的相互制约关系,设置合理的信号量及信号量初值。
创建5个线程,分别模拟5个哲学家进程。
在哲学家线程之间通过对信号量的P,V操作,实现线程之间的同步关系。(According to the mutual restriction between the philosophers' process, the reasonable signal quantity and the initial value of the signal quantity are set up.
Create 5 threads to simulate the 5 philosopher processes, respectively.
The synchronization relationship between threads is realized between the philosophers' threads through the P and V operations of the semaphore.)
创建5个线程,分别模拟5个哲学家进程。
在哲学家线程之间通过对信号量的P,V操作,实现线程之间的同步关系。(According to the mutual restriction between the philosophers' process, the reasonable signal quantity and the initial value of the signal quantity are set up.
Create 5 threads to simulate the 5 philosopher processes, respectively.
The synchronization relationship between threads is realized between the philosophers' threads through the P and V operations of the semaphore.)
相关搜索: 哲学家问题
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
shiyan3.c | 4041 | 2017-11-28 |
thinking.c | 1508 | 2017-11-22 |