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

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

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

  • GHOST 安装指南 ,有好多例子,大家可以看看!
    GHOST 安装指南 ,有好多例子,大家可以看看! -GHOST 安装指南指南,有好多例子,大家可以看看!看看!
    2022-02-02 01:11:48下载
    积分:1
  • Used for computer and NI
    用来实现计算机与NI-GPIB卡的通信,具备读写功能-Used for computer and NI-GPIB card communications, have to read and write functions
    2022-12-13 05:35:03下载
    积分:1
  • a small operation registry procedures, the pair creation, modification are prett...
    一个操作注册表的小程序,键值的创建,修改等都很不错哦-a small operation registry procedures, the pair creation, modification are pretty good oh
    2022-01-25 17:19:16下载
    积分:1
  • 一个源代码
    一个操作系统源代码-an operating system source code
    2022-06-03 15:11:00下载
    积分:1
  • 国外经典教材《分析与设计》中Minix的全部源代码。...
    国外经典教材《操作系统分析与设计》中Minix操作系统的全部源代码。-Operating Systems Design and Implementation, 3rd Edition by Andrew S. Tanenbaum and Albert S. Woodhull
    2022-01-21 00:47:13下载
    积分:1
  • 用vc编写的用来模拟中电梯调度算法的程序。
    用vc编写的用来模拟操作系统中电梯调度算法的程序。-The ones that wrote vc used the procedure of dispatcher s algorithm of the lift in the simulation operating system.
    2022-07-23 21:46:51下载
    积分:1
  • 1 : Prepare a simulation and debugging process scheduling procedures, "Prio...
    1、 :编写并调试一个模拟的进程调度程序,采用“最高优先数优先”调度算法对进程进行调度。 “最高优先数优先调度算法的基本思想是把CPU分配给就绪队列中优先数最高的进程。尝试静态优先数与动态优先数两种方法: a) 静态优先数是指优先数在整个进程运行期间不再改变。优先数可以在数据输入时指定,也可以根据到达顺序、运行时间确定。 b) 动态优先数是指进程的优先数在创建进程时可以给定一个初始值,并且可以按一定原则修改优先数。例如进程获得一次CPU后就将其优先数减少1。或者进程等待的时间超过某一时限时增加其优先数的值。 2、 编写并调试一个模拟的进程调度程序,模拟实现多级反馈队列调度算法。 3、 编写并调试一个模拟的进程调度程序,模拟实现最低松弛度优先算法。 4、 程序与报告要求: a) 对上述要求1、2、3,至少要完成一项,鼓励尝试多种算法。 b) 输出结果要尽量详细清晰,能够反映调度后队列变化,PCB内部变化。 c) 可以选择在Windows或Linux环境下编写、运行程序 d) 鼓励使用不同的开发工具在不同平台环境上进行开发比较。 e) 在实验报告中,一方面可以对实验结果进行分析,一方面可以对各种算法进行比较,分析它们的优劣,说明各种算法适用于哪些情况下的调度。 -1 : Prepare a simulation and debugging process scheduling procedures, "Priority number of the highest priority" to the process of scheduling algorithms for scheduling. "Highest priority priority scheduling algorithm for the basic idea is to place the CPU allocated to the priority queue highest process. Taste Examination several static and dynamic priority priority number two methods : a) static priority number is priority
    2022-03-26 12:38:45下载
    积分:1
  • FreeRTOS_STM32F1_MD中容量_Demo
    在嵌入式领域中,嵌入式实时操作系统正得到越来越广泛的应用。采用嵌入式实时操作系统(RTOS)可以更合理、更有效地利用CPU的资源,简化应用软件的设计,缩短系统开发时间,更好地保证系统的实时性和可靠性。
    2022-06-13 04:54:20下载
    积分:1
  • XML Parser , RSS BlogReader
    XML Parser , RSS BlogReader
    2022-04-10 00:51:35下载
    积分:1
  • 讲的很详细,希望对大家有用,一共有三部分
    讲的很详细,希望对大家有用,一共有三部分-Talked about in great detail and hope for all of us, a total of three parts
    2022-02-25 14:04:31下载
    积分:1
  • 696518资源总数
  • 106161会员总数
  • 5今日下载