登录
首页 » 操作系统 » 一个简单的例子,为多线程和信号

一个简单的例子,为多线程和信号

于 2022-01-22 发布 文件大小:1.06 kB
0 229
下载积分: 2 下载次数: 1

代码说明:

此示例实现阅读室模型。假设有 8 个席位,在阅览室里,在等候室 5 个座位。Readers" 的行动会像这样: 1) 一位读者在前台服务注册他的信息,他进入阅览室之前。他在他离开后注销。前台服务只能处理一个 time.2 的一位读者) 如果一个读者发现阅读房间里满是,他会在等待 room.3 等) 如果在候诊室里没有席位,他将 leave.*The 主线程将启动 20 个读取器线程。读取器线程将重复上述行为。读者的行为记录打印在屏幕上和写到一个文件中。

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

发表评论

0 个回复

  • 在软电话H323协议,软件编程语言的使用G711,G729…
    基于h323协议的软phone,使用软件编码语言g711,g729等。-h323 agreement on the soft phone, the use of software coding language g711, g729, etc..
    2022-04-22 10:53:05下载
    积分:1
  • 运行于T
    运行于T-engine(采用T-Kernel)之上的例子源代码,该T-Engine采用的处理器为mc9328-Running on the T-engine (the use of T-Kernel) above examples of source code, the T-Engine processor used for mc9328
    2023-03-15 12:40:04下载
    积分:1
  • 一个完成的lru算法
    一个完成的lru算法-a completed LRU algorithm
    2022-09-05 05:35:03下载
    积分:1
  • 银行家算法的程序,将文件改成c语言就行了。认真编写
    银行家算法的程序,将文件改成c语言就行了。认真编写-Banker" s algorithm process the file into c language on the list. Carefully prepared
    2022-11-26 16:05:03下载
    积分:1
  • 银行家算法 已分配和可利用的 利用银行家算法可以避免死锁的发生...
    银行家算法 已分配和可利用的 利用银行家算法可以避免死锁的发生-Banker" s algorithm has been allocated and the use of banker" s algorithm can be used to avoid the occurrence of deadlock
    2023-01-11 21:50:04下载
    积分:1
  • 这是一个(计算机科学课程)的设计。它的功能…
    这是一个操作系统(计算机系课程)的课程设计。它的功能是模拟文件管理,包括建立用户,建立文件并对文件设置属性.还包括对文件的添加,修改,删除等操作-This is an operating system (computer science courses) are designed. Its function is simulated document management, including the establishment of users, document also set up document attributes. The document also includes the addition, modification, deletion, etc
    2022-02-04 05:04:46下载
    积分:1
  • 1.实验目的: 模拟实现银行家算法,用银行家算法实现资源分配。 2.实验内容: 设计五个进程{P0,P1,P2,P3,P4}共享三类资源{A,B,C}的,{...
    1.实验目的: 模拟实现银行家算法,用银行家算法实现资源分配。 2.实验内容: 设计五个进程{P0,P1,P2,P3,P4}共享三类资源{A,B,C}的系统,{A,B,C}的资源数量分别为10,5,7。进程可动态地申请资源和释放资源,系统按各进程的申请动态地分配资源。要求程序具有显示和打印各进程的某一时刻的资源分配表和安全序列;显示和打印各进程依次要求申请的资源号以及为某进程分配资源后的有关资源数据。 3.程序设计和说明: 函数说明:anquan( )判断给某个进程请求后系统是否安全,anquan1()判断当前系统是否安全。GetAll()取得所有进程的的各个资源数据。详细说明请参见附录中的程序的文档说明。-1. The experiment : Simulation Algorithm bankers, bankers algorithm with the allocation of resources. 2. Experiment : Design 5 (process P0, P1, P2, P3, P4) (resource sharing three categories A, B, C), (A, B, C) amount of resources to 10,5,7. Dynamic process could apply to the resources and the release of resources, according to the system processes the application to dynamically allocate resources. Procedures required to display and print the process of a moment of the distribution of resources and safety sequence; Display and print the process followed for seeking resources, as well as a process of distribution of resources in the resource data. 3. Program design and description : F
    2022-04-07 18:24:35下载
    积分:1
  • 内存监视
    设计一个内存监视器,能实时地显示当前系统中内存的使用情况,包括系统地址空间的布局,物理内存的使用情况;能实时显示某个进程的虚拟地址空间布局和工作集信息等。 
    2023-02-15 17:30:03下载
    积分:1
  • for sensor network nodes TinyOS operating system design is very interesting
    用于传感器网络的节点操作系统 TinyOS 结构设计非常有意思-for sensor network nodes TinyOS operating system design is very interesting
    2022-01-22 06:48:37下载
    积分:1
  • account manager 帐户管理,管理个人常用的账号信息。
    account manager 帐户管理,管理个人常用的账号信息。-account manager account management, management of personal account information commonly used.
    2022-03-24 08:41:12下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载