本文从信号量、管程和消息传递三个方面讨论了进程间的同步问题,并分别给出了关于生产者/消费者问题的解决算法,最终还分析了以上三种方法的优缺点。-signal from the amount of paper tube and messaging three discussed the process of synchronization and were given on the producer/consumer problem solving algorithm, ultimately analysis of the above three methods are discussed.
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.001937s ]
SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.090893s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.000944s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.004798s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.005036s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.017504s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.021002s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.024801s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.022889s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.001344s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 105841 [ RunTime:0.013465s ]