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

操作系统读者写者实验

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

代码说明:

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

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

发表评论

0 个回复

  • hanf
    校园导航系统应用程序,内容详细,有说明。(Campus navigation system applications, and detailed, with instructions.)
    2011-10-18 19:09:37下载
    积分:1
  • Visual C++ +SQL Server数据库应用实例完全解析
    使用vc结合sqlserver开发业务系统的一些实例,对初学者有参考意义(The use of VC combined with some sqlserver examples of the development of the business system, and has a reference value for beginners)
    2017-10-12 09:28:47下载
    积分:1
  • src_mpeg2
    MPEG-2 视频解码器 , 1.1版 来源(21ic.com)字节(0.5M)热度()环境(Windows/NT)2003年12月31日16:49MPEG2 视频解码器 ,可以将MPEG1和MPEG2的视频流解为非压缩视频。(MPEG-2 video decoder, version 1.1 Source (21ic.com) byte (0.5M) heat () environment (Windows/NT) 2003 on 31 day 12 years 16:49 MPEG2 video decoder can be MPEG1 and MPEG2 video Solution of non-compressed video stream.)
    2007-09-27 16:55:40下载
    积分:1
  • stm32-EzUI
    stm32与铭正同创液晶屏通讯例程,包含数字触摸按键,按钮等例程(stm32 and Ming positive Genesis LCD screen communications routines, including digital touch keys, buttons and other routines)
    2015-09-12 15:26:13下载
    积分:1
  • ffmepg视频解码
    对视频进行ffmpeg解码,然后把解码出来的yuv用openGL 渲染出来
    2022-05-14 08:40:51下载
    积分:1
  • CodeWarrior
    CodeWarrior仿真与调试要点,CodeWarrior仿真与调试要点,CodeWarrior仿真与调试要点(CodeWarrior simulation and debugging points, CodeWarrior simulation and debugging points, CodeWarrior point emulation and debugging)
    2013-08-21 21:14:06下载
    积分:1
  • Light-cube-program
    光立方源程序代码,经本人使用,确定为可用程序,有详细注解(Light cube source program code, after I use, determine the available procedures, a detailed explanation)
    2015-07-18 14:55:47下载
    积分:1
  • C#脚本
    阴阳师脚本,实现自动循环组队,利用大漠插件获取窗口操作(The script of the Yin and Yang teachers to realize the automatic formation of the team)
    2018-01-24 17:10:08下载
    积分:1
  • 光立方1
    说明:  光立方的电路,自己买个器件把程序烧进去应该就可以了(The circuit of light cubic, buy a device oneself to burn a program in should be OK)
    2018-12-28 11:23:46下载
    积分:1
  • POCS
    matlab应用源程序,只能采集,网络连接(matlab application source code, can collect)
    2013-11-23 16:19:50下载
    积分:1
  • 696518资源总数
  • 106215会员总数
  • 5今日下载