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

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

于 2023-08-26 发布 文件大小:354.78 kB
0 182
下载积分: 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 个回复

  • 类似IE的前进、后退、历史记录 功能 (VCL组件) delphi语言编写
    类似IE的前进、后退、历史记录 功能 (VCL组件) delphi语言编写-similar IE advance, retreat, the historical record function (VCL) delphi language
    2022-07-01 15:05:04下载
    积分:1
  • Delphi2005 B/S程序设计技巧集(4
    Delphi2005 B/S程序设计技巧集(4-11) 现在delphi 2005 B/S的书籍资料太少,几乎没有可参考的资料,这在一定程度上限制了delphi 2005的使用,相反C#,ASP的书籍资料到处都是。通过几个月的学习也算是总结了一点经验,从现在起我将陆续将ASP和C#的例子、技巧翻译到delphi 2005下面,希望对大家的学习和工作有帮助,毕竟.Net是一种发展趋势。我将不定期写新的内容,同时,如果你在工作或学习中有什么问题,我也会将问题加入本篇文章,另外,一个人的能力毕竟有限,也希望大家共同来解决问题。 宋雨炫 -Delphi B/S programming skills sets (4-11) now delphi 20 05 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-05-14 20:21:00下载
    积分:1
  • 矢量图源代码 包括直线文本矩形等等,可修改线条颜色,宽度等
    矢量图源代码 包括直线文本矩形等等,可修改线条颜色,宽度等-vector source code, including straight text rectangle, etc., may revise the lines of color, width, etc.
    2022-01-30 20:52:58下载
    积分:1
  • delphi编程源代码,线程插入代码,可以做为学习参考的,很有用的...
    delphi编程源代码,线程插入代码,可以做为学习参考的,很有用的-delphi programming source code, insert the threaded code can be used as a study reference, a very useful
    2022-03-05 16:20:25下载
    积分:1
  • 注册/反注册OCX,DLL的例子
    注册/反注册OCX,DLL的例子-registration/anti-registered OCX, DLL example
    2022-10-22 04:25:04下载
    积分:1
  • 2022-11-30 04:15:03下载
    积分:1
  • The use of desktop software delphi elf, very interesting! For the intermediate l...
    利用delphi软件制作桌面小精灵,非常有趣!适合中级水平的人员学习。-The use of desktop software delphi elf, very interesting! For the intermediate level of learning.
    2022-08-20 20:14:16下载
    积分:1
  • 生产管理系统:系统具有数据备份及数据还原功能。能够保证系统数据的安全性方便的全方位的数据查询。在相应的权限下,删除数据方便简单,数据稳定性好。数据计算自动完成,...
    生产管理系统:系统具有数据备份及数据还原功能。能够保证系统数据的安全性方便的全方位的数据查询。在相应的权限下,删除数据方便简单,数据稳定性好。数据计算自动完成,尽量减少人工干预。强大的报表打印功能。 运行环境 操作系统:Windows 2000/NT/XP/ME 开发工具:Delphi 7.0 数据库:SQL Server 2000 硬件配置:CPU:300MHz以上的处理器 内存:64MB,推荐128MB以上 硬盘:100MB以上磁盘空间 分辨率:最低800×600像素 建议1024×768像素 颜色:256色-Production management system: system with data backup and data restore function. Can guarantee the security of system data to facilitate the full range of data query. Under the appropriate permissions to delete the data accessible and user-friendly data stability. Auto-complete data to minimize human intervention. Powerful print reports function. Operating Environment operating system: Windows 2000/NT/XP/ME development tools: Delphi 7.0 Database: SQL Server 2000 hardware configuration: CPU: 300MHz or faster processor Memory: 64MB, recommended 128MB or more Hard Disk: 100MB or more disk space Resolution: the minimum 800 × 600 pixels recommended 1024 × 768 pixels Color: 256 colors
    2022-02-21 23:27:16下载
    积分:1
  • 收发MAPI E
    收发MAPI E-Mail(非SMTP E-mail), 传真的构件-TX MAPI E-Mail (SMTP E-mail), fax Component
    2023-08-29 14:35:03下载
    积分:1
  • 一个有简单计算器的源代码,希望对新人有帮助
    一个有简单计算器的源代码,希望对新人有帮助-A simple calculator source code, want to help newcomers
    2022-03-07 05:00:33下载
    积分:1
  • 696516资源总数
  • 106913会员总数
  • 8今日下载