- 博客(1)
- 收藏
- 关注
原创 银行家算法(Java实现)
前言 银行家算法是最著名的避免死锁的算法。下面用Java来实现它。 代码 主要使用到的类是BankerAlgorithm 1、使用到的变量 private static final int W = 10, R = 10; int M, N; //总进程数、资源种类 int[] ALL_RESOURCE = new int[W]; //默认各种资源总数目为10种 int[][] MAX = new int[W][R]; //M个进程对N类资源最大资源需求量 int[] AVAILABLE = new int
2022-04-22 09:01:02 149
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人