semaphore

所属分类:Linux/Unix编程
开发工具:Unix_Linux
文件大小:1KB
下载次数:3
上传日期:2011-05-12 11:24:09
上 传 者njutiger11
说明:  信号量(Semaphore)也被称为信号灯,常常作为在多线程环境下的同步与互斥机制。它负责协调各个线程,以保证它们能够正确、合理的使用公共资源。信号量分为单值和多值两种。单值信号量只能被一个线程获得,而多值信号量可以被若干个线程获得。 本实验是一个信号量实验,父进程作为生产者释放信号量,子进程作为消费者申请信号量。 实验环境 Redhat9.0
(Semaphore (Semaphore), also known as signal lights, often in multi-threaded environment as synchronization and mutual exclusion mechanism. It is responsible for coordinating the various threads in order to ensure that they can correct and reasonable use of public resources. Semaphore is divided into two kinds of single and multiple values. Single-valued semaphore can only be one thread access, and multi-valued semaphore can be a number of threads available. This experiment is a signal of experiments, the release of the parent process semaphore as producers, as consumers apply for the child process semaphore. Redhat9.0 experimental environment)

文件列表:
semaphore.txt (1844, 2011-05-12)

近期下载者

相关文件


收藏者