⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.htm

📁 这是一个操作系统课程中的理发师算法。具体描述见readme
💻 HTM
字号:
<html><title>Ning Yu's Bonus LAB: The Sleeping-Barber Project</title><body><h1>Ning Yu's Bonus LAB: The Sleeping-Barber Project</h1><h3>Name: Ning Yu</h3><h3>Email: ningyu@siu.edu</h3><h2>NOTICE:</h2><h3>Bonus Points to replace the weak score of my homework1 (68/100). Thank you.</h3><br><h2>Description</h2><br>The program is according to the requirement of Lab3.<br>The Sleeping-Barber Project.<br><h2>Environment</h2><br>Linux + c language<br><h2>Functions</h2><br>1.A barbershop consists of a waiting room with 20 chairs and a barber room with two barber chairs. <br>2.If there are no customers to be served, the barbers (both) go to sleep<br>3.If there is only one customer being served, the other barber stay and chat with the busy barber.<br> 4.If a customer enters the barbershop and finds all chairs are occupied, then the customer leaves the shop.<br>5.If both barbers are busy but chairs in waiting room are available, then the customer sits in one of the free chairs.<br>6.If only one barber is busy, the other barber immediately serves the customer. <br>7.If both barbers are asleep, the customer wakes up them (both) and on will start to serve the customer.<br>8.Using a random number (from the range of [1, 30] minutes) to decide the arrival interval between customers<br>9.Similarly for the time (20 to 30 minutes) needed to serve one customer. <br>10.Simulate the system (customers and barbers both are simulated as threads). <br>11.Program outputs a sequence of 鈥渟napshots鈥

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -