semaphore.html
来自「Producer Consumer problem simulator to s」· HTML 代码 · 共 36 行
HTML
36 行
<HTML>
<HEAD>
</HEAD>
<BODY>
<style type="text/css">
H1 {font-family:Arial, sans-serif; color:#8989DB;
font-size:19pt; font-weight:normal;}
P {font-family:Arial, sans-serif; font-size:10pt;}
LI {font-family:Arial, sans-serif; font-size:10pt;}
a:link {color:#000066;}
a:visited {color:#666666;}
</style>
<h1>Bounded-Buffer Problem Using Semaphores</h1>
<P>
This Java applet demonstrates the bounded-buffer consumer/producer problem using semaphores. The semaphore putSema is used to keep track of the number of empty spaces. The semaphore takeSema helped to keep track of the number of items in the buffer. The semaphore bufferSema is used for mutual exclusion of the buffer.
<P> </P>
<applet
code=BoundedBuffer.class
name=semaphore
width=600
height=240 VIEWASTEXT>
<param name=label value="This string was passed from the HTML host.">
<param name=background value="008080">
<param name=foreground value="FFFFFF">
</applet>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?