首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于信号量的生产者-消费者问题设计与分析
引用本文:刘晓平,石慧,凌实,杜琳,田卫东.基于信号量的生产者-消费者问题设计与分析[J].合肥工业大学学报(社会科学版),2008,22(5):84-88.
作者姓名:刘晓平  石慧  凌实  杜琳  田卫东
作者单位:合肥工业大学,计算机与信息学院,合肥,230009
摘    要:生产者-消费者问题是操作系统课程教学中进程同步与互斥的经典问题,深刻理解此问题对理解操作系统中的进程管理具有重要意义。文章应用可视化的方法、基于多线程方式,对生产者-消费者问题进行了模拟,并通过实际测试比较了生产者、消费者之间设置单一互斥信号量与设置两个互斥信号量两种不同方式对程序运行效率的影响。在给学生以直观映像的同时,引导学生对此问题进行深入思考,激发学生的创新意识。

关 键 词:操作系统  生产者-消费者问题  进程同步  可视化  程序设计

Design and Analysis of Producer-consumer Problem Based on Semaphore Mechanism
LIU Xiao-ping,SHI Hui,LING Shi,DU Lin,TIAN Wei-dong.Design and Analysis of Producer-consumer Problem Based on Semaphore Mechanism[J].Journal of Hefei University of Technology(Social Sciences),2008,22(5):84-88.
Authors:LIU Xiao-ping  SHI Hui  LING Shi  DU Lin  TIAN Wei-dong
Institution:(School of Computer Science and Information Engineering, Hefei University of Technology, Hefei 230009, China)
Abstract:Producer-consumer problem is a classic example of processes synchronization and mutual exclusion in teaching of operating system. Deep understanding that is of great significance for right understanding of the process management. In this paper, a multi-threaded based simulation programming of this problem is presented. Two different semaphore mechanisms: producer and consumer processes with shared mutex or two different mutexes, are compared on the impact of operational efficiency by actual test. In addition to a visual image to students, it can also guide students on the problem in-depth reflection and inspire their awareness of innovation.
Keywords:operating system  producer-consumer problem  process synchronization  visualization  programming
本文献已被 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号