-
操作系统兔子吃草
#include "stdafx.h"
#include
#include
#include
/*信号量的定义,它是负责协调各个线程, 以保证它们能够正确、合理的使用公共资源。 用于控制进程间的同步与互斥*/
typedef HANDLE Semaphore;
Semaphore g_semBuffer,g_semGlass, g_mutex; //mutex 为互斥锁
// 利用 Windows 下的 API 函数(视窗操作系统应用程序接口)来定义 P、V 操作
#define P(S) WaitForSingleObject(S,INFINITE)
#define V(S) ReleaseSemaphore(S,1,NULL)
#define rate 1000
#define CONSUMER_NUM 4 // 消费者个数
#define PRODUCER_NUM 4 // 生产者个数
#define BUFFER_NUM 4 // 缓冲区个数
char *thing[4]={"glass1","glass2","glass3","glass4"};
//公共的队列缓冲区
struct Buffer
{
int product[BUFFER_NUM];
int front,rear;
}g_buf;
//兔子线程
DWORD WINAPI Rabbit(LPVOID para)
{
int i =*(int*)para; //第 i 只小白兔&
- 2022-05-23 06:18:02下载
- 积分:1
-
操作系统实验,处理机调度,进程间通信,进程同步与互斥,存储管理
操作系统课程的实验,资源为4个Java源代码文件,实现了处理机调度,进程间通信,进程同步与互斥,存储管理,值得一看。
- 2022-12-29 10:25:04下载
- 积分:1
-
jsonparser iPhone
JsonParser for iPhone
- 2022-09-19 17:25:03下载
- 积分:1
-
西安电子科技大学操作系统的课件,共分十一章,自己认为很有价值,当然这个适应于本科学生。...
西安电子科技大学操作系统的课件,共分十一章,自己认为很有价值,当然这个适应于本科学生。-Xi" an University of Electronic Science and Technology operating system, courseware, is divided into 11 chapters, they consider valuable, of course, it adapted to undergraduate students.
- 2022-03-04 19:51:25下载
- 积分:1
-
分析了IDE接口硬盘控制寄存器模型;论述了IDE接口硬盘的读写几项技术;给出了设计硬盘克
隆软件的思想和方法,方法针对硬盘物理扇区进行读写,与硬盘上安装的具...
分析了IDE接口硬盘控制寄存器模型;论述了IDE接口硬盘的读写几项技术;给出了设计硬盘克
隆软件的思想和方法,方法针对硬盘物理扇区进行读写,与硬盘上安装的具体操作系统的类型无关,并与硬
盘驱动器的物理结构无关。-Analysis of the IDE hard disk interface control register model discusses the IDE interface hard disk read and write a number of technologies gives the design the hard disk cloning software, the ideas and methods, methods for the physical sector of the hard disk read and write, and the hard disk is installed on specific operations the type of system has nothing to do with the physical structure of the hard drive has nothing to do.
- 2022-05-12 23:10:21下载
- 积分:1
-
在手机操作系统上Mobile上开发的一个查看天气预报的程序。很好的一个实例。...
在手机操作系统上Mobile上开发的一个查看天气预报的程序。很好的一个实例。-Mobile phone operating system in developing a procedure for checking weather forecasts. Good a case in point.
- 2023-04-05 00:05:04下载
- 积分:1
-
进程调度模拟程序
进程调度模拟程序-scheduling process simulation program
- 2023-04-24 03:25:03下载
- 积分:1
-
操作系统操作系统的用户
操作系统
操作系统]
操作系统
消费者-生产者模拟程序-OS operating system] operating system consumer-producer simulation program
- 2023-02-14 05:45:04下载
- 积分:1
-
生产者和消费者
生产者和消费者实验代码,主要是为了应付操作系统实验而选择的代码。希望可以帮助到大家顺利完成实验吧,不挂科。代码有相应的注释,大家应该看得懂。代码的环境是VC6.0就可以编译,很方便。好了,大家有兴趣就下载来用用吧。
- 2022-12-01 10:45:03下载
- 积分:1
-
读mcp55芯片MACADDR DOS操作系统。
Read MCP55 chipset macaddr in dos system.
- 2022-02-21 03:48:36下载
- 积分:1