文件名称:ThreadTest
介绍说明--下载内容均来自于网络,请自行研究使用
模拟多进程共享临界资源
1、实现两个进程模拟进入临界区的用户进程,当需要进入临界区时,显示:“进程x请求进入临界区…”,同时向管理进程提出申请;申请返回,表示进入了临界区。在临界区中等待一段随机时间,并显示:“进程x正在临界区…”;当时间结束,显示:“进程x退出临界区…”,同时向管理进程提出退出申请;当申请返回,显示:“进程x已退出临界区。”
2、一个进程作为原语的管理进程,接受其他进程的临界区进入请求:如果允许进入,则设置相应变量,然后返回;如果不允许进入,则进入循环等待,直到允许为止;
3、对临界区的访问应遵循空闲让进、忙则等待、有限等待、让权等待的准则。
4、进程间通信可以采用信号、消息传递、管道或网络通信方式。
-Simulation of multi-process sharing of critical resources
1, the realization of the process of simulation of the two critical areas of the user to enter the process, when to enter the critical zone, showed that: "the process of the request to enter the critical section x ...", at the same time make an application to the management process applied to return, that has entered a critical section. Critical areas in the random wait time, and display: "x is critical process ..." when the end time shows: "the process of x from the critical areas ..." and at the same time to withdraw from the application management process when applied to return, showing: "the process of x have withdrawn from the critical area."
2, a process management as a primitive process, other process requests to enter the critical region: if allowed to enter, then set the appropriate variables, and then return if not allowed to enter, then enter the cycle of waiting until the permit is effected
3, access to cr
1、实现两个进程模拟进入临界区的用户进程,当需要进入临界区时,显示:“进程x请求进入临界区…”,同时向管理进程提出申请;申请返回,表示进入了临界区。在临界区中等待一段随机时间,并显示:“进程x正在临界区…”;当时间结束,显示:“进程x退出临界区…”,同时向管理进程提出退出申请;当申请返回,显示:“进程x已退出临界区。”
2、一个进程作为原语的管理进程,接受其他进程的临界区进入请求:如果允许进入,则设置相应变量,然后返回;如果不允许进入,则进入循环等待,直到允许为止;
3、对临界区的访问应遵循空闲让进、忙则等待、有限等待、让权等待的准则。
4、进程间通信可以采用信号、消息传递、管道或网络通信方式。
-Simulation of multi-process sharing of critical resources
1, the realization of the process of simulation of the two critical areas of the user to enter the process, when to enter the critical zone, showed that: "the process of the request to enter the critical section x ...", at the same time make an application to the management process applied to return, that has entered a critical section. Critical areas in the random wait time, and display: "x is critical process ..." when the end time shows: "the process of x from the critical areas ..." and at the same time to withdraw from the application management process when applied to return, showing: "the process of x have withdrawn from the critical area."
2, a process management as a primitive process, other process requests to enter the critical region: if allowed to enter, then set the appropriate variables, and then return if not allowed to enter, then enter the cycle of waiting until the permit is effected
3, access to cr
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ThreadTest
..........\.classpath
..........\.project
..........\MainFrame$1.class
..........\MainFrame$2.class
..........\MainFrame.class
..........\MainFrame.java
..........\ThingSome.class
..........\ThingSome.java
..........\ThreadManager.class
..........\ThreadManager.java
..........\ThreadShow.class
..........\ThreadShow.java
..........\ThreadUser.class
..........\ThreadUser.java
..........\.classpath
..........\.project
..........\MainFrame$1.class
..........\MainFrame$2.class
..........\MainFrame.class
..........\MainFrame.java
..........\ThingSome.class
..........\ThingSome.java
..........\ThreadManager.class
..........\ThreadManager.java
..........\ThreadShow.class
..........\ThreadShow.java
..........\ThreadUser.class
..........\ThreadUser.java