搜索资源列表
create_progress
- 进程状态有5种: e -执行态 r -高就绪态 t -低就绪态 w -等待态 c -完成态。初始每个进程均为高就绪状态,如果时间片到则转为低就绪状态。 系统分时执行各进程,规定三个进程的执行概率均为33 。通过产生随机数x来模拟时间片。若各进程的执行时间片到限,产生“时间片中断”而转入低就绪状态。 进程调度算法采用剥夺式调度算法。每次总是选择优先数最小(优先级别最高)的就绪进程投入执行。//先从 r 状态进程中选择,再从 t 状态进程中选择。 进程0完成5次计算:s1++ s2++
random_name_system
- 实现课堂随机点名系统……线程和进程的知识-Random name system to achieve the classroom ... ... knowledge of threads and processes
Producers-and-consumers
- 多进程/ 线程编程:生产者 - 消费者问题。 1,设置两类进程/ 线程,一类为生产者,一类为消费者; 2,建立缓冲区的数据结构; 3,随机启动生产者或消费者; 4,显示缓冲区状况; 5,随着进程/ 线程每次操作缓冲区,更新显示;-Multi-process/thread programming: producer- consumer issues. 1, set two types of processes/threads, one for producers, a cla
zhe-reader-zhe-writer
- 多进程/线程编程:读者-写者问题。 1,设置两类进程/线程,一类为读者,一类为写者; 2,随机启动读者或写者; 3,显示读者或写者执行状态; 4,随着进程/线程的执行,更新显示; -Multi-process/thread programming: Readers- write the problem. 1, set two types of processes/threads, o
GenerateMobileModel
- 本程序主要通过管道实现两个进程间的通信。主要功能是一个进程从手机机型文件中随机读取一个机型,然后通过管道传给另一个进程。-The program is mainly for communication between two processes through the pipeline. The main feature is a random process model reads a file the phone model, and then passed to another proc