readerwriter
所属分类:其他小程序
开发工具:Visual C++
文件大小:1KB
下载次数:35
上传日期:2010-02-24 11:17:33
上 传 者:
destiny1891
说明: 读者写者问题C++解法,使用互斥信号量,写者线程优先,共有3个读者2个写者
(Similar to the barbers problem,the program use semaphore to solve the reader/writer problem.Two semaphores are involved:m_h,db_h,used as a counter and mutex between 2 writers.
Main function create 3 reader thread and 2 writer thread.The writer thread has a higher priority by using SetThreadPriority() function
)
文件列表:
reader&writer.cpp (3980, 2009-12-05)
近期下载者:
相关文件:
收藏者: