-
操作系统兔子吃草
#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
-
通过IP网络控制服务器,实现BIOS级的控制。
通过IP网络控制服务器,实现BIOS级的控制。-kvm over ip
- 2022-06-30 10:06:12下载
- 积分:1
-
Sourcecode of the Linux
Sourcecode of the Linux-011 with detailed chinese annotation,it s verygood and worth reading.
- 2023-01-08 03:05:04下载
- 积分:1
-
uCOS
uCOS-II实例内核技术与应用实例。应用程序开发与调试。实时内核与应用程序框架结构分析-uCOS-II
- 2022-11-20 17:15:03下载
- 积分:1
-
一个用 java 语言编写的操作系统课程设计
很经典希望对大家有帮助...
一个用 java 语言编写的操作系统课程设计
很经典希望对大家有帮助-An operating system using java language curriculum design classic you want to help
- 2023-08-22 05:45:04下载
- 积分:1
-
minix操作系统分析
minix操作系统分析-Minix operating system analysis
- 2022-05-18 17:13:24下载
- 积分:1
-
elf 详解,主要介绍elf的文件格式,运用,表示方法等,用了大量的例子进行说明...
elf 详解,主要介绍elf的文件格式,运用,表示方法等,用了大量的例子进行说明-elf digest, introduction to elf format, implementation, using examples to demonstrate it
- 2022-01-26 02:14:53下载
- 积分:1
-
对分析窗体结构有独到之处。可以以十六进制和十进制两种不同方式显示窗口句柄等所有数值...
对分析窗体结构有独到之处。可以以十六进制和十进制两种不同方式显示窗口句柄等所有数值-Analysis of the structure of the unique form. Can hexadecimal and decimal display in two different ways, such as window handle all the numerical
- 2022-04-30 17:15:54下载
- 积分:1
-
操作系统课程设计《页面置换算法》,内含设计文档。
设计要求为:作业共有320条指令,即它的地址空间为32页,目前它的所有页都还未调入内存。再模拟过程中,...
操作系统课程设计《页面置换算法》,内含设计文档。
设计要求为:作业共有320条指令,即它的地址空间为32页,目前它的所有页都还未调入内存。再模拟过程中,如果所访问的指令已在内存,则显示其物理地址,并转下一条指令。如果所访问的指令还未装入内存,则发生缺页,此时需要记录缺页的次数,并将相应页调入内存。如果4个内存块均已装入该作业,则需要进行页面置换,最后显示其物理地址,并转向下一条指令。在所有320条指令执行完毕后,请计算并显示作业运行过程中发生的缺页率。
实现方法为:最佳置换算法(OPT)、先进先出(FIFO)算法和最近最久未使用(LRU)算法。-err
- 2023-03-14 22:50:04下载
- 积分:1
-
Bochs is a highly portable open source IA
Bochs is a highly portable open source IA-32 (x86) PC emulator
written in C++, that runs on most popular platforms. It includes
emulation of the Intel x86 CPU, common I/O devices, and a custom
BIOS. Currently, Bochs can be compiled to emulate a 386, 486,
Pentium, Pentium Pro or AMD64 CPU, including optional MMX, SSE,
SSE2 and 3DNow! instructions. Bochs is capable of running most
Operating Systems inside the emulation including Linux, DOS,
Windows 95/98 and Windows NT/2000.
Bochs was written by Kevin Lawton and is currently maintained by
the Bochs project at "http://bochs.sourceforge.net".
- 2022-02-03 13:51:22下载
- 积分:1