仅使用信号量的读者-作者问题的公平解决方案
Fair Solution to the Reader-Writer-Problem with Semaphores only
摘要:
读写器问题是并发程序设计中的一个标准问题。一个资源由多个进程共享,这些进程需要包含性读或独占性写访问。该问题的已知解决方案通常涉及多个全局计数器和队列。这里提出了一个非常简单的算法,它只需要两个信号量的同步,没有其他的全球对象。这种方法产生了一个公平的解决方案,而不会挨饿。
英文摘要:
The reader-writer-problem is a standard problem in concurrent programming. A resource is shared by several processes which need either inclusive reading or exclusive writing access. The known solutions to this problem typically involve a number of global counters and queues. Here a very simple algorithm is presented which needs only two semaphores for synchronisation and no other global objects. The approach yields a fair solution without starving.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。