Hot Search : Source embeded web remote control p2p game More...
Location : Home Downloads WEB Code JSP/Java

多线程调度——哲学家就餐

  • Category : JSP/Java
  • Tags :
  • Update : 2017-12-19
  • Size : 66kb
  • Downloaded :0次
  • Author :打打打、
  • About : Nobody
  • PS : If download it fails, try it again. Download again for free!
Introduction - If you have any usage issues, please Google them yourself
Use the JAVA thread to solve the problem of the philosopher's eating. When a philosopher thread performs the way of chopsticks, the program will determine which two chopsticks he needs to use according to the name of the thread, and identify which chopsticks are odd numbers, and try to get the two chopsticks according to the order of odd and even later. If the two chopsticks are not being used (i.e. the corresponding array element value of false), the philosopher has made this thread can be two chopsticks, otherwise it will execute wait in the competition after the failure of chopsticks () into the operation of an instance of the Chopsticks class to wait until the other thread, put down the chopsticks when philosophers after dinner (notifyAll) in its wake. When a philosopher thread puts down the chopsticks, the program sets the value of the array elements corresponding to the dropped chopsticks into false, and wakes up the other threads in the waiting area with notifyAll ().
Packet file list
(Preview for download)
FilenameSizeUpdate
哲学家就餐.docx 69724 2017-12-12
哲学家问题.txt 2483 2017-12-12
Related instructions
  • We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
  • The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
  • Please use Winrar for decompression tools
  • If download fail, Try it againg or Feedback to us.
  • If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
  • Before downloading, you can inquire through the uploaded person information

Nothing.

Post Comment
*Quick comment Recommend Not bad Password Unclear description Not source
Lost files Unable to decompress Bad
*Content :
*Captcha :
DSSZ is the largest source code store in internet!
Contact us :
1999-2046 DSSZ All Rights Reserved.