文件名称:JingCheng-Communications
-
所属分类:
- 标签属性:
- 上传时间:2013-12-30
-
文件大小:199.42kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1、 点“创建线程” 按钮,创建两个线程,一个线程不断对一个变量加1,结果显示在第一个文本框中。另一个线程不断对另一个变量减1,结果显示在第二个文本框中。这两个线程之间没有交互,仅用于演示线程的创建。
2、 演示线程互斥,点“线程互斥” 按钮,创建两个线程,一个线程不断循环,每次循环对共享变量x做100次加1操作(这100次加1操作作为一个临界区CSa),另一个线程不断循环,每次循环对共享变量x做100次减1操作(这100次减1操作作为一个临界区CSb),结果显示在第三个文本框中。可以看到结果是从0到100,然后又从100回到0。可见CSa和CSb两个临界区是互斥的。
3、 除了没有互斥,其它同2,结果显示在第四个文本框中。可见CSa和CSb两个临界区的执行是有交叉的,CSa的执行可能被CSb打断,CSb的执行也可能被CSa打断。
-1, point " create thread" button to create two threads, one thread plus a continuously variable showed that in the first text box. Another thread continuously variable minus one another, the results are displayed in the second text box. There is no interaction between the two threads, the thread is only for creating presentations. 2, demo thread mutex point " thread mutex" button to create two threads, one thread continuous cycle, each cycle of the shared variable x to do 100 plus an operation (this 100 plus an operation as a critical area CSa ), the cycle of another thread, the shared variables of each cycle do x 100 decremented (100 Save this as an operation of a critical section CSb), the results shown in the third text box. You can see the results from 0-100, and then from 100 back to 0. Visible CSa and CSb two critical areas are exclusive. 3, in addition to not mutually exclusive, the other with two, the results are displayed in the fourth text box. Visible execu
2、 演示线程互斥,点“线程互斥” 按钮,创建两个线程,一个线程不断循环,每次循环对共享变量x做100次加1操作(这100次加1操作作为一个临界区CSa),另一个线程不断循环,每次循环对共享变量x做100次减1操作(这100次减1操作作为一个临界区CSb),结果显示在第三个文本框中。可以看到结果是从0到100,然后又从100回到0。可见CSa和CSb两个临界区是互斥的。
3、 除了没有互斥,其它同2,结果显示在第四个文本框中。可见CSa和CSb两个临界区的执行是有交叉的,CSa的执行可能被CSb打断,CSb的执行也可能被CSa打断。
-1, point " create thread" button to create two threads, one thread plus a continuously variable showed that in the first text box. Another thread continuously variable minus one another, the results are displayed in the second text box. There is no interaction between the two threads, the thread is only for creating presentations. 2, demo thread mutex point " thread mutex" button to create two threads, one thread continuous cycle, each cycle of the shared variable x to do 100 plus an operation (this 100 plus an operation as a critical area CSa ), the cycle of another thread, the shared variables of each cycle do x 100 decremented (100 Save this as an operation of a critical section CSb), the results shown in the third text box. You can see the results from 0-100, and then from 100 back to 0. Visible CSa and CSb two critical areas are exclusive. 3, in addition to not mutually exclusive, the other with two, the results are displayed in the fourth text box. Visible execu
(系统自动生成,下载前可以参看下载内容)
下载文件列表
JingCheng Communications/.classpath
JingCheng Communications/.fatjar
JingCheng Communications/.project
JingCheng Communications/.settings/org.eclipse.jdt.core.prefs
JingCheng Communications/bin/JingChengMessage/1.ico
JingCheng Communications/bin/JingChengMessage/8.jpg
JingCheng Communications/bin/JingChengMessage/JingChengA$ButtonsListener.class
JingCheng Communications/bin/JingChengMessage/JingChengA.class
JingCheng Communications/bin/JingChengMessage/JingChengB$ButtonsListener.class
JingCheng Communications/bin/JingChengMessage/JingChengB.class
JingCheng Communications/src/JingChengMessage/1.ico
JingCheng Communications/src/JingChengMessage/8.jpg
JingCheng Communications/src/JingChengMessage/JingChengA.java
JingCheng Communications/src/JingChengMessage/JingChengB.java
JingCheng Communications/bin/JingChengMessage
JingCheng Communications/src/JingChengMessage
JingCheng Communications/.settings
JingCheng Communications/bin
JingCheng Communications/src
JingCheng Communications
JingCheng Communications/.fatjar
JingCheng Communications/.project
JingCheng Communications/.settings/org.eclipse.jdt.core.prefs
JingCheng Communications/bin/JingChengMessage/1.ico
JingCheng Communications/bin/JingChengMessage/8.jpg
JingCheng Communications/bin/JingChengMessage/JingChengA$ButtonsListener.class
JingCheng Communications/bin/JingChengMessage/JingChengA.class
JingCheng Communications/bin/JingChengMessage/JingChengB$ButtonsListener.class
JingCheng Communications/bin/JingChengMessage/JingChengB.class
JingCheng Communications/src/JingChengMessage/1.ico
JingCheng Communications/src/JingChengMessage/8.jpg
JingCheng Communications/src/JingChengMessage/JingChengA.java
JingCheng Communications/src/JingChengMessage/JingChengB.java
JingCheng Communications/bin/JingChengMessage
JingCheng Communications/src/JingChengMessage
JingCheng Communications/.settings
JingCheng Communications/bin
JingCheng Communications/src
JingCheng Communications
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.