登录
首页 » c++ » 操作系统读者写者实验

操作系统读者写者实验

于 2022-03-23 发布 文件大小:3.02 MB
0 48
下载积分: 2 下载次数: 1

代码说明:

创建一个控制台进程。此进程包含n个线程。用这n个线程来表示n个读者或写者。每个线程按相应测试数据文件(后面有介绍)的要求进行读写操作。用信号量机制分别实现读者优先和写者优先的读者-写者问题。     读者-写者问题的读写操作限制(包括读者优先和写者优先):     1)写-写互斥,即不能有两个写者同时进行写操作。     2)读-写互斥,即不能同时有一个线程在读,而另一个线程在写。     3)读-读允许,即可以有一个或多个读者在读。     读者优先的附加限制:如果一个读者申请进行读操作时已有另一个读者正在进行读操作,则该读者可直接开始读操作。     写者优先的附加限制:如果一个读者申请进行读操作时已有另一写者在等待访问共享资源,则该读者必须等到没有写者处于等待状态后才能开始读操作。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • vc-zhuru
    一段注入代码,简单易用,适合研究 用外挂的可以看看(Inject code section, easy to use, suitable for research)
    2013-03-26 22:21:43下载
    积分:1
  • OneNET_M5310_COAP
    说明:  移动平台NB-IOT示例程序,物联网模块与平台端数据通讯(Mobile platform nb-iot sample program,data communication between Internet of things module and platform.)
    2020-04-26 22:00:55下载
    积分:1
  • 循迹小车+红外循迹
    小车可以循着黑线前进,并且速度可以通过按键调节(the car can go follow black line,and change velocity with keyscan)
    2020-06-22 22:40:02下载
    积分:1
  • 全功能源代码+舵机
    全功能源代码+舵机,路舵机,红外避障,超声波避障,循迹,跟随
    2022-03-23 21:57:26下载
    积分:1
  • Project4_BallmanFord
    (图论)实现负权重转换(Bellman-Ford) 对于输入的任何一个拓扑(部分边的权重为负),要求变换网络中边的权重,任意两节点间的最短路不变,输出变换后各边权重。如果网络中存在负环,程序要有报警功能。算法主体写在CGraph类中((Graph theory) to achieve negative weight conversion (Bellman-Ford) to the input of any topology (some edge weight is negative), requiring transform the network edge weights between any two nodes of the shortest path unchanged, the output transform each edge weights. If the negative loop exists in the network, the program should alarm function. Algorithms written in CGraph class body)
    2020-08-03 17:48:35下载
    积分:1
  • C#模拟QQ登陆,并获取qq好友列表
    获取qq好友列表
    2013-01-08下载
    积分:1
  • kmint
    Consider shadow rain attenuation and multipath effects Numerical solution of differential equations method, Energy entropy calculation.
    2017-08-26 19:57:54下载
    积分:1
  • 汉字库读取软件
    说明:  读取汉字库,并用点阵,打印到屏幕,是小型液晶显示的工具(Read Chinese ,and print)
    2020-05-22 06:05:44下载
    积分:1
  • PID_Motor_control
    利用增量式PID算法来控制直流电机稳定启动。能够快速调整外界干扰,使电机稳定在设定的速度。(Using the incremental PID algorithm to control the stable dc motor start. Can quickly adjust interference, make the speed of the motor stability in setting. )
    2014-12-31 12:32:30下载
    积分:1
  • xinghaofengxi
    数字信号处理-理论、算法与实现 一书中所涉及到的绝大部分算法。 Dsp_c C语言编写的算法程序。 Dsp_fortran FORTRAN语言编写的算法程序。 Dsp_matlab用MATLAB编写的信号处理程序,包含本书各个章节的 大部分例题。(" Digital Signal Processing- Theory, Algorithm and Implementation of a book related to most of the algorithm. The DSP_C C language algorithm. Dsp_fortran FORTRAN language written algorithm. Dsp_matlab prepared using MATLAB signal processing procedures, including most of the examples of the various chapters of the book.)
    2013-04-24 21:13:43下载
    积分:1
  • 696518资源总数
  • 105578会员总数
  • 20今日下载