文件名称:11

介绍说明--下载内容均来自于网络,请自行研究使用

进程的死锁避免算法(银行家算法实现)

一:实验目的:

根据银行家算法的思想,编写程序,解决并发进程的死锁问题。

二:实验要求:

(1)本实验要求设计并实现银行家算法。银行家算法是死锁避免的经典算法,其核心思想是:进程动态地申请资源,每次申请资源时系统都执行安全状态检查算法判断本次申请是否会造成系统处于不安全状态,如果不安全则阻塞进程;如果安全状态,则完成资源分配。

(2)安全状态检查算法的思想是找到一个安全序列,使所有进程都能执行完毕。如果找到,则处于安全状态,否则为不安全状态。

三:实验思路:

1)进程一开始向系统提出最大需求量.

2)进程每次提出新的需求都统计是否超出它事先提出的最大需求量.

3)若正常,则判断该进程所需剩余剩余量(包括本次申请)是否超出系统所掌握的剩余资源量,若不超出,则分配,否则等待.

四:实验内容与步骤:

(1)进程的死锁避免算法。编写一段程序,模拟银行家算法,解决进程的死锁问题。

(2)利用VC++6.0实现上述程序设计和调试操作,根据提示输入相应的资源请求,对于算法操作的成功与否提供一定的提示框。

(3)通过阅读和分析实验程序,熟悉进程的死锁问题。-Process, the deadlock avoidance algorithm (the banker s algorithm to achieve)

A: purpose of the experiment:

Banker s algorithm based on the idea of ​ ​ programming, to solve the deadlock problem of concurrent processes.

II: experimental requirements:

(1) In this study, to design and implement banker s algorithm. Bankers deadlock avoidance algorithm is a classical algorithm, the core idea is: the process of dynamic application of resources, resources for each application is executed when the system security status checking algorithm to determine whether this application will result in the system are not safe, if safe the blocking process if the security status, complete the allocation of resources.

(2) security status checking algorithm idea is to find a safe sequence, so that all processes can be executed. If found, in a safe state, or unsafe condition.

Three: Experiment ideas:

   1) The beginning of the process to make the maximum system demand.

2) The prop
(系统自动生成,下载前可以参看下载内容)

下载文件列表

操3\StdAfx.h

...\StdAfx.cpp

...\ReadMe.txt

...\操3.dsp

...\操3.dsw

...\操3.ncb

...\操3.plg

...\~VC71.tmp

...\操3.cpp

...\操3.opt

操3

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org