Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


OS, ask a p, v operation of the

This together :
A total of 200 seats section, readers must be entered on a register on the registration form, which included a registration form for each table seating goal, including planned and readers names, leaving readers to sell off the message. PV readers described the process of trial operation between the synchronous relationship.
The answer is this :
Algorithm : Semaphore three seats, said reading rooms have seating for initial 200;readers that room a few readers, the initial value of 0 for registration or cancellation of the semaphore's Exclusive, as the initial one.

Readers enter the room :
While (1)
{
P (seats); Are there seats 4003rd
P (s); Does anyone have registered 4003rd
The completion of registration forms;
V (s); 4003rd after registration
Entered the room;
V (readers); 4003rd increase in the number of readers 1
}

Readers leave room :
While (1)
{
P (readers); Does anyone reading room 4003rd
P (s); 4003rd Does anyone write-off
Cancels registration;
V (s); 4003rd written off
Leave room;
V (seats); 4003rd release resources for a seat
}

I do understand this :
Algorithm : The signal has two seats, said reading rooms have seating for initial registration or cancellation of parts for the signal to contradict s initial one.

Readers enter the room :
While (1)
{
P (seats); Are there seats 4003rd
P (s); Does anyone have registered 4003rd
The completion of registration forms;
V (s); 4003rd after registration
Entered the room;
}

Readers leave room :
While (1)
{
P (s); 4003rd Does anyone write-off
Cancels registration;
V (s); 4003rd written off
Leave room;
V (seats); 4003rd release resources for a seat
}

I do not know the right or wrong, if the two of the difficult process of cooperation between the two signals must be used, said the volume? There is also a book entitled : N buffer zone of literacy, how to use PV simulation. Above use three variables. Do not know why not, as I have done on the method to achieve?
Also requests the experts advise, I would like to thank first.

OS, ask a p, v operation of the

Thank you time I read articles

OS, ask a p, v operation of the

You have to do, but it is not the statistics on the number of readers.

OS, ask a p, v operation of the

If no one reading room, but also to do write-offs, will be over?

OS, ask a p, v operation of the

OS, ask a p, v operation of the

-->


Is that. Oh, thank you



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com