I m试图开发一种由校对组成的申请,利用工作-教学法同时执行任务。
这些任务
- access a predefined set of objects;
- must "atomicly" acquire read/write permissions on all objects it accesses before actually running;
- upon finishing (and are guaranteed to eventually finish) release the objects they acquire.
解决这一问题的一个可能途径是让每一个物体在某个时候完成一项任务,然后尝试用预先界定的命令锁定每个物体。 如果至少有一人未能释放所有锁,并着手执行另一项任务。
然而,这种方法增加了与大物体受抚养者交织任务的可能性,甚至可能出现活锁。
Is there another method to acquire a set of locks while maximizing concurrency? (without a global lock) Or perhaps change the system in a way that it is no longer required? If so, any good papers about it?
<>光> 正如该州回答的那样,这是“哲学家”问题的一个普遍版本。 我正在寻求非集中化的解决办法,特别是高负荷(重任和删除任务)的算法。