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

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

于 2022-02-06 发布 文件大小:7.59 kB
0 125
下载积分: 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 个回复

  • SJF算法,最短优先算法,大家还是看看吧,同样帮修改一下阿,谢谢啦...
    SJF算法,最短优先算法,大家还是看看吧,同样帮修改一下阿,谢谢啦-SJF algorithm, the shortest priority algorithm, we still look at it, also changed a bit to help Ah, thank you
    2022-05-22 17:53:37下载
    积分:1
  • 麦克风阵列基于谱减法的语音增强的波束形成…
    基于麦克风阵波束形成的谱相减方法在语音增强中的应用-Microphone array beamforming based on the spectral subtraction method speech enhancement application
    2022-04-10 13:58:26下载
    积分: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
  • 对分析窗体结构有独到之处。可以以十六进制和十进制两种不同方式显示窗口句柄等所有数值...
    对分析窗体结构有独到之处。可以以十六进制和十进制两种不同方式显示窗口句柄等所有数值-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
  • C++编写的一个程序
    C++编写的一个操作系统程序-prepared an operating system procedures
    2022-07-09 11:23:42下载
    积分:1
  • NUTTX源码
    Nuttx 是一个实时嵌入式操作系统(Embedded RTOS),它很小巧,在微控制器环境中使用。Nuttx完全可扩展,可从从小型(8位)至中型嵌入式(32位)系统。它的设计目的还在于完全符合POSIX标准,完全实时,并完全开放。
    2022-01-24 10:11:19下载
    积分:1
  • 自己动手写
    自己动手写操作系统-to write its own operating system
    2022-01-24 18:16:16下载
    积分:1
  • 职工信息包括职工号、姓名、性别、年龄、学历、工资、住址、电话等(职工号不重复)。试设计一职工信息管理,使之能提供以下功能: (1)以菜单方式工;...
    职工信息包括职工号、姓名、性别、年龄、学历、工资、住址、电话等(职工号不重复)。试设计一职工信息管理系统,使之能提供以下功能: (1)系统以菜单方式工作; (2)职工信息录入功能(职工信息用文件保存); (3)职工信息浏览功能; (4)职工信息查询功能,查询方式:按学历、职工号查询等; (5)职工信息删除、修改功能。 -Information including the number of workers union, name, sex, age, education, salaries, addresses, telephone numbers, etc. (number of workers of non-repetition). Workers try to design a management information system so that it can provide the following functions: (1) the way the menu system to work (2) staff input function information (information workers saved documents) (3) staff information browsing (4) Information trade unions function, query methods: according to their academic qualifications, trade unions, such as its inquiries (5) information workers to delete, modify function.
    2022-11-13 10:35:04下载
    积分:1
  • DOS源代码,编程语言为asm和C。
    DOS操作系统源代码,编程语言为asm和C。-Source Code of DOS
    2022-05-20 02:28:03下载
    积分:1
  • 课件,ppt格式,总共七章,个人觉得还不错
    操作系统课件,ppt格式,总共七章,个人觉得还不错-operation system ppt
    2023-03-24 07:40:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载