熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> 操作系統 >> 正文

十大題型算法全實現——(九)銀行家算法[2]

2022-06-13   來源: 操作系統 

  int a;

  int b;

  int c;

  int remain_a;

  int remain_b;

  int remain_c;

  }bank;

  typedef struct node{

  char name[];

  int a;

  int b;

  int c;

  int need_a;

  int need_b;

  int need_c;

  }process;

  bank banker;

  process processes[MAX_P];

  int quantity;

  //初始化函數

  void initial()

  {

  int i;

  bankera=MAXA;

  bankerb=MAXB;

  bankerc=MAXC;

  bankerremain_a=MAXA;

  bankerremain_b=MAXB;

  bankerremain_c=MAXC;

  for(i=;i

[1]  [2]  [3]  [4]  [5]  [6]  [7]  [8]  [9]  [10]  


From:http://tw.wingwit.com/Article/program/czxt/201311/24038.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.