Cashiers-and-customers

所属分类:操作系统开发
开发工具:Visual C++
文件大小:2KB
下载次数:10
上传日期:2015-06-05 08:11:43
上 传 者smilelp
说明:  收银员与顾客问题(信号量操作) 设计目的:了解信号量机制,了解并掌握进程同步和互斥机制,熟悉信号量的操作函数,利用信号量实现对共享资源的控制。 操作系统是一门工程性很强的课程,它不仅要求学生掌握操作系统的工作原理和理论知识,也要求学生的实际动手能力,以加深对所学习内容的理解,使学生熟练地掌握计算机的操作方法,使用各种软件工具,加强对课程内容的理解。 要求:在某超市里有一个收银员,且同时最多允许有n个顾客购物,我们可以将顾客和收银员看成是两类不同的进程,且工作流程如下图所示。为了利用PV操作正确地协调这两类进程之间的工作,设置了三个信号量S1、S2和Sn,且初值分别为0、0和n。
(Cashiers and customer issues (semaphore operation) Design Objective: To semaphore mechanism to understand and master the process synchronization and mutual exclusion mechanism, familiar semaphore manipulation functions, use semaphore control to shared resources. The operating system is a very strong engineering curriculum, which requires students to master not only the operating system principles and theories of knowledge work, also requires students practical ability, to deepen understanding of the content of the study, so that students mastered computer methods of operation, using a variety of software tools to enhance the understanding of the course content. Requirements: There is a cashier in a supermarket, and at the same time there are up to n a customer shopping, we can be the customer and cashier as two different processes, and workflow as shown below. To take advantage of PV operating correctly coordination between these two processes, a set of three semaphore S1, S2 and Sn)

文件列表:
收银员与顾客.cpp (4830, 2015-01-05)

近期下载者

相关文件


收藏者