登录
首页 » Delphi VCL » 实现UP、DOWN原语 产生3个进程: 两个进程模拟需要进入临界区的用户进程。 当需要进入临界区时,显示:“进程x请求进入临界区…”,同时向管理进程...

实现UP、DOWN原语 产生3个进程: 两个进程模拟需要进入临界区的用户进程。 当需要进入临界区时,显示:“进程x请求进入临界区…”,同时向管理进程...

于 2023-08-26 发布 文件大小:354.78 kB
0 210
下载积分: 2 下载次数: 1

代码说明:

实现UP、DOWN原语 产生3个进程: 两个进程模拟需要进入临界区的用户进程。 当需要进入临界区时,显示:“进程x请求进入临界区…”,同时向管理进程提出申请; 申请返回,表示进入了临界区。在临界区中等待一段随机时间,并显示:“进程x正在临界区…”; 当时间结束,显示:“进程x退出临界区…”,同时向管理进程提出退出申请; 当申请返回,显示:“进程x已退出临界区。” 一个进程作为原语的管理进程,接受其他进程的临界区进入请求: 如果允许进入,则根据DOWN 原语的操作步骤设置相应变量,然后返回; 如果不允许进入,则进入循环等待,直到允许为止; 退出时模拟UP 操作。 进程间通信可以采用信号、消息传递、管道或网络通信方式。 -achieve UP, DOWN original language have three processes : process simulation of two critical needs for access to the users in the process. When the need to access critical areas, revealed : "The process of x request to enter the critical areas ...", and also to the management process applications; applied to return, entered a critical area. In the critical area to wait for a certain period of time random, and that : "the process of x is the critical area ..."; When the time ended, showed : "x withdraw from the process of critical areas ...", and also to withdraw from the process management applications; When applied to ret

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 主要是数据库和浏览器连接的例子,希望对大家有帮助!
    主要是数据库和浏览器连接的例子,希望对大家有帮助!-mainly browsers and database connectivity example, we want to help!
    2022-11-26 08:00:04下载
    积分:1
  • with delphi into the document management device that can be tested, procedures a...
    用delphi编成的文件管理器,经测试可用,程序简单易懂-with delphi into the document management device that can be tested, procedures are simple! !
    2022-11-22 22:15:03下载
    积分:1
  • IOCP completion port IOCP completion port Xiang Jie Xiang Jie IOCP completion po...
    IOCP完成端口详解 IOCP完成端口详解 -IOCP completion port IOCP completion port Xiang Jie Xiang Jie IOCP completion port IOCP completion port Xiang Jie Xiang Jie
    2022-10-25 13:55:04下载
    积分:1
  • Delphi Video Control (Demo+ source) SendMessage to do video capture, do not driv...
    dephi视频控制(Demo+源码) SendMessage做视频捕获,不要驱动-Delphi Video Control (Demo+ source) SendMessage to do video capture, do not drive
    2022-01-25 14:14:02下载
    积分:1
  • 远程桌面显示~~~~基于indy tcp组件的
    远程桌面显示~~~~基于indy tcp组件的-Remote Desktop shows ~ ~ ~ ~ indy tcp component-based
    2022-11-28 16:50:03下载
    积分:1
  • Gray model can calculate the feature vector, in delphi5.0 have been done, you ca...
    可以计算出灰色模型的特征向量,在delphi5.0上已经做过,可以执行-Gray model can calculate the feature vector, in delphi5.0 have been done, you can run
    2022-04-16 14:40:38下载
    积分:1
  • 《Delphi 2005程序设计及其应用开发》源代码
    《Delphi 2005程序设计及其应用开发》源代码- Delphi 2005 programming and application development the source code
    2022-03-21 22:27:17下载
    积分:1
  • modeling of fault
    modeling of fault-tolerant systems, the source
    2022-02-12 08:51:30下载
    积分:1
  • Delphi2005 B/S程序设计技巧集(12
    Delphi2005 B/S程序设计技巧集(12-14) 现在delphi 2005 B/S的书籍资料太少,几乎没有可参考的资料,这在一定程度上限制了delphi 2005的使用,相反C#,ASP的书籍资料到处都是。通过几个月的学习也算是总结了一点经验,从现在起我将陆续将ASP和C#的例子、技巧翻译到delphi 2005下面,希望对大家的学习和工作有帮助,毕竟.Net是一种发展趋势。我将不定期写新的内容,同时,如果你在工作或学习中有什么问题,我也会将问题加入本篇文章,另外,一个人的能力毕竟有限,也希望大家共同来解决问题。 宋雨炫 -Delphi B/S programming skills sets (12-14) now delphi 2 005 B/S books so little information, almost no reference to the information, This, to a certain extent, limit the use of Delphi 2005, C# contrary, ASP information books are everywhere. Through several months of learning is also summed up the experiences that from now on I will continue, ASP and C# example, delphi translation skills to below 2,005, we hope to study and work there to help, After all. Net is a development trend. From time to time I will write the new content, and if you work or study any problem, I will also take the issue into this article, in addition to the ability of a person is limited, I hope we can jointly to solve the problem. SONG Xuan
    2022-04-30 10:21:29下载
    积分:1
  • 俄罗斯方块,经典游戏源码,看后可以试着自己做个
    俄罗斯方块,经典游戏源码,看后可以试着自己做个-Tetris, classic games source code to see if you can try their own to be a post-
    2022-04-26 14:14:25下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载