哲学家就餐问题的实验课程思路拓展
The Expansion Thought of the Experiment Course of the Philosopher's Dining Problem
-
摘要: 该文分析了操作系统实验课程项目现状,通过对哲学家就餐问题进行详细分解,引出了对K.Mani Chandy和J.Misra提出的一种解决大规模并发问题的算法的分析及研究。给出该算法使用互斥量的哲学家问题实现方案,展示了以3位哲学家交互的例子以演示算法规则。讨论了算法死锁产生的原因,对一种大幅度降低死锁概率的解决思路进行了分析及实现。实践表明,该实验课程的思路拓展帮助学生从多种角度理解操作系统的同步及死锁问题,锻炼了学生拓展实验思维及解决项目的能力。Abstract: Analysing the current situation of the experimental course of the operating system project.Through detailed analysis of the philosophers' dining problems,this paper analyzes and studies an algorithm proposed by K.Mani Chandy and J.Misra to solve large-scale concurrency problems.Given the philosophers' scheme to achieve this algorithm using mutexes,an example of interaction between three philosophers is presented to demonstrate algorithmic rules.Finally discussed the causes of deadlock,and analyzed and implemented a solution to reducing deadlock probability.Practice shows that the idea of this experimental course is expanded to help students understand the synchronization and deadlock problems of operating systems from various perspectives and to exercise their abilities to develop experimental thinking and project solutions.