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

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

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

  bankerremain_a+=processes[p]a;

  bankerremain_b+=processes[p]b;

  bankerremain_c+=processes[p]c;

  for(i=p;i

  processes[i]=processes[i+1];

  }

  strcpy(processes[quantity-1].name,"");

  processes[quantity-1].a=0;

  processes[quantity-1].b=0;

  processes[quantity-1].c=0;

  processes[quantity-1].need_a=0;

  processes[quantity-1].need_b=0;

  processes[quantity-1].need_c=0;

  quantity--;

  cout<<"撤消作業成功"<

  }

  else{

  cout<<"撤消作業失敗"<

  }

  }

  //查看資源情況

  void view()

  {

  int i;

  cout<

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


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