操作系统作业
SArthas
这个作者很懒,什么都没留下…
展开
-
python实现银行家算法
代码GitHub链接:https://github.com/tigmfg/BankerAlgorithm_python具体步骤代码实现def BankerAlgorithm(): progressCount = 5 #进程数量 resourceCount = 3 #资源种类数量 Available = [3,3,2] #可用资源向量 Max = [[7,5,3], [3,2,2], [9,0,2],原创 2021-05-15 22:29:08 · 583 阅读 · 0 评论 -
C#实现哲学家进餐问题
代码GitHub链接:https://github.com/tigmfg/PDProblem_csharp实现哲学家进餐class PDproblem { /////当哲学家同时拿起左右两边的筷子时,才会开始进餐,防止进程死锁 public static readonly int maxPhilosopher = 5; // 最大的哲学家数量 public List<Semaphore> forks = new List<原创 2021-05-14 14:27:09 · 269 阅读 · 0 评论 -
C#实现读者写者问题
代码GitHub链接:https://github.com/tigmfg/RWProblem_csharp实现读者写者问题class ReaderWriterQue_Nomal { Semaphore book = new Semaphore(1, 1); int chapter = 0; public ReaderWriterQue_Nomal() { } public void write()原创 2021-05-12 21:23:08 · 215 阅读 · 0 评论