登录
首页 » 操作系统 » 通过研究Linux的线程机制和信号量实现读者写者(Reader

通过研究Linux的线程机制和信号量实现读者写者(Reader

于 2022-02-06 发布 文件大小:7.59 kB
0 95
下载积分: 2 下载次数: 1

代码说明:

通过研究Linux的线程机制和信号量实现读者写者(Reader-Writer)问题并发控制。 1)写-写互斥:不能有两个写者同时进行写操作; 2)读-写互斥:不能同时有一个线程在读,而另一个线程在写; 3)读-读允许:可以有一个或多个读者在读; 4)读者优先的附加限制:如果读者申请进行读操作时已有另一个读者正在进行读操作,则该读者可直接开始读操作; 5)写者优先的附加限制:如果一个读者申请进行读操作时已有另一个写者在等待访问共享资源,则该读者必须等到没有写者处于等待状态后才能开始读操作。 -By studying the Linux thread mechanism and semaphores realize readers who write (Reader-Writer) the issue of concurrency control. 1) to write- write mutex: Can not write at the same time there are two write operations 2) read- write mutex: Can not have a thread at the same time in reading and writing another thread 3) Reading- Reading of permit: can have one or more readers read 4) the priority of additional restrictions readers: If the readers apply for a read operation, there was another reader being read, the reader can be directly started reading operation 5) to write additional priority Restrictions: If an application for a reader reading write operation has been in waiting for another visit to a shared resource, the read

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

发表评论

0 个回复

  • gerneral os development
    gerneral os development
    2022-07-17 19:23:00下载
    积分:1
  • the procedures on the topic of : process management
    本次程序的题目为:进程管理――支持多个进程并发运行的简单的进程管理模拟系统,对本实验的分析要求是:⑴系统中的同步机构采用信号量上的P、V操作的机制;⑵控制机构包括阻塞和唤醒操作;⑶时间片中断处理程序处理模拟的时间片中断;⑷进程调度程序负责为各进程分配处理机;⑸根据用户的需求来创建n个进程(n为即满足用户需求,又不超出系统可容的最大进程数),各进程互斥地访问使用临界资源 S1、S2;⑹使用动态优先数(如:随阻塞次数的增加而减小优先数,以提高其优先权);⑺进程结束后应能够撤消;⑻进程间能实现“发送”和“接收”两个消息缓冲通信操作;⑼系统在运行过程中随机打印出各进程的状态变换过程、系统的调度过程及公共变量的变化情况,在一个进程运行完毕,进入完成状态后,可以将该进程撤消,也可以动态的创建另一个新的进程。-the procedures on the topic of : process management-- to support multiple concurrent processes running a simple process management simulation system for the analysis of the experimental requirements are : 1 system of institutions using synchronous signals on the amount of P, V operation of the mechanism; 2 control agencies, including obstruction and awaken operation ; 3-time interrupt handling procedures-time simulation of interruption; 4 process scheduler is responsible for the allocation process processors; together according to the user"s needs to create process n (n that meet user needs, without exceeding the system can accommodate
    2022-03-13 01:19:06下载
    积分:1
  • linux下的C。点对点一收一发测试_192.168.0.1发_192.168.0.2收
    linux下的C。点对点一收一发测试_192.168.0.1发_192.168.0.2收-linux under C. Close out a point-to-point test _192.168.0.1 issued _192.168.0.2 close
    2022-05-20 05:12:19下载
    积分:1
  • Applied to arm, avr, h8 platform of non
    应用于arm、avr、h8平台的非抢占式操作系统,简单好用,也可以很方便的移植到其他平台-Applied to arm, avr, h8 platform of non-preemptive operating system, easy-to-use, it can be easily ported to other platforms of
    2022-03-01 10:46:08下载
    积分:1
  • ucos
    uCOS-II操作系统电子书 uCOS-II操作系统电子书-uCOS-II eBook
    2023-08-18 02:40:04下载
    积分:1
  • Spooling技术模拟,的学习的实验内容之一
    Spooling技术模拟,操作系统的学习的实验内容之一-Spooling simulation technology, the operating system of learning content
    2022-01-24 12:51:45下载
    积分:1
  • Bochs是# 20010 #存在巨大的字母2001 #死亡23398 32479 2
    博克斯要么#20010#23398存在死亡巨人字母表2001#32479新2
    2023-03-11 06:10:04下载
    积分:1
  • C源代码的实时
    C源代码的实时操作系统-C source code for the real-time operating system
    2022-08-16 19:15:40下载
    积分:1
  • 这是课,期中考试的题目,用互斥信号量解决进程同步的问题...
    这是操作系统课,期中考试的题目,用互斥信号量解决进程同步的问题-This is the OS class, the subject of the examination period, with the volume contradict signal synchronization process to resolve the problem
    2023-09-05 05:55:03下载
    积分:1
  • UCOS
    UCOS-II在VC++6.0环境下的调试及编译-UCOS-II in VC++ 6.0 debugging environment and compiler
    2023-06-29 17:20:04下载
    积分:1
  • 696518资源总数
  • 106164会员总数
  • 18今日下载