Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
Semaphore Detail

Semaphore Detail

Ratings: (0)|Views: 161 |Likes:
Published by api-3858296
a.chìachía nên xem file này ( liên quan đến semaphore)- chỉ có 9 slide thôi,nên cố gắng xem nha
a.chìachía nên xem file này ( liên quan đến semaphore)- chỉ có 9 slide thôi,nên cố gắng xem nha

More info:

Published by: api-3858296 on Oct 19, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

P1
Down (s)
CS;
Up(s)
P2
Down (s)
CS;
Up(s)
Semaphore s = 1
Down (S)
{

S.value --;
ifS.value < 0
{

Add(P,S.L);
Sleep();
}
}
Up(S)
{
S.value ++;
ifS.value\u22640
{
Remove(P,S.L);
Wakeup(P);
}
}
P1 :
Job1;
Up(s)
P2:
Down (s);
Job2;
Semaphore s = 0
Down (S)
{

S.value --;
ifS.value < 0
{

Add(P,S.L);
Sleep();
}
}
Up(S)
{
S.value ++;
ifS.value\u22640
{
Remove(P,S.L);
Wakeup(P);
}
}

\u2022P1 {Job 1}
\u2022P2 {Job 2}
\u2022P3 {Job 3}
\u2022Yeu cau: Job1\ue000 Job2\ue000 Job3

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->