-
two experimental operating system : the process of scheduling strategy to achiev...
操作系统实验2:进程调度策略的模拟实现
1、 设计一个有 N个进程共行的进程调度程序。
2、 每个进程有一个进程控制块PCB来表示,进程控制块的格式为:
进程名
优先数
到达时间
需要运行时间
已占用CPU时间
进程状态
a) 进程优先数、需要运行时间、到达时间可以事先人为地指定,也可以随机产生,注意初始化上述数值时要尽量使进程并发执行,而不是按到达时间顺序调度。
b) 进程的运行时间以时间片为单位进行计算。
c) 进程状态分为就绪、运行、完成三种状态之,分别用W、R、F表示。
3、 进程调度规则如下:
a) 就绪进程获得 CPU后都只能运行一个时间片。用已占用CPU时间加1来表示。
b) 如果运行一个时间片后,进程已占用 CPU时间达到所需要运行时间,则进程完成,撤销该进程。
c) 如果运行一个时间片后,进程已占用CPU时间还未达到所需要运行时间,即进程需要继续运行,将它插入就绪队列,队列重新排序,等待CPU。
d) 重复以上过程,直到所要进程都完成为止。
-two experimental operating system : the process of scheduling strategy to achieve a simulation. Design is a process of a total of N the process scheduler. 2, each process is a process control block to PCB said that the process control block format : process a few who arrived at the priority needs time to time running CPU time a state process) process priority number. need to run time, arriving in time prior to artificially designated, can also randomly generated, Initialization attention to the above values are to m
- 2022-02-20 17:25:28下载
- 积分:1
-
利用类CEvent实现多线程同步
利用类CEvent实现多线程同步-use category CEvent multi-thread synchronization
- 2022-02-09 19:20:30下载
- 积分:1
-
银行家算法 进程控制中用到的算吧 检测是是否死锁
银行家算法 进程控制中用到的算吧 检测是是否死锁-bankers process control algorithms used in the counting detection is whether it Deadlock
- 2022-02-13 07:13:03下载
- 积分:1
-
这是一个模拟操作系统中进程控制的程序,用时间片轮转算法实现,附带试验报告...
这是一个模拟操作系统中进程控制的程序,用时间片轮转算法实现,附带试验报告-This is a simulated operating system process control procedures, time-flow algorithm, fringe Test Report
- 2023-01-24 17:10:03下载
- 积分:1
-
利用命名管道技术,在进程间进行通信的例程。希望和大家交流。...
利用命名管道技术,在进程间进行通信的例程。希望和大家交流。-use named pipes, in the process of communication between the routines. And we hope that the exchanges.
- 2022-03-01 22:05:08下载
- 积分:1
-
编译原理
编译原理-内存管理-compiler theory-Memory Management
- 2022-03-06 21:56:27下载
- 积分:1
-
program VirtualMemory {$APPTYPE CONSOLE} uses SysUtils, Windows const PageSize =...
program VirtualMemory {$APPTYPE CONSOLE} uses SysUtils, Windows const PageSize = 4096 //定义页面大小 var VmAddress, CommitAddress: Pointer //存放虚拟内存基址 Text: Pchar begin //保留二页虚拟内存 VmAddress := VirtualAlloc(nil, PageSize * 2, MEM_RESERVE, PAGE_READWRITE) if not Assigned(VmAddress) then begin WriteLn( 保留虚拟内存失败! ) ExitProcess(0) end else WriteLn(Format( 保留虚拟内存成功, 基址为:[%8.8x]! , [Longint(VmAddress)])) //提交第二页虚拟内存 CommitAddress := Pointer(Longint(VmAddress) + PageSize) CommitAddress := VirtualAlloc(CommitAddress, PageSize, MEM_COMMIT, PAGE_READWRITE) if not Assigne-program VirtualMemory ($ APPTYPE CONSOLE) uses SysUtils, Windows const PageSize = 4096// definition pages size var VmAddress, CommitAddress : Pointer// virtual memory-based storage site Text : Pchar begin// reservations two virtual memory VmAddress : = VirtualAlloc (nil. PageSize* 2, MEM_RESERVE, PAGE_READWRITE) if not Assigned (VmAddress) then begin WriteLn (reservations virtual memory failure!) ExitProcess (0) end else WriteLn (Format
- 2022-10-06 15:35:03下载
- 积分:1
-
一个多任务应用程序。带有四个彩色转轮的应用程序,每个彩色转轮都按自己的线程运行。其中两个使用OnIdle函数;另外两个则作为独立的线程运行。...
一个多任务应用程序。带有四个彩色转轮的应用程序,每个彩色转轮都按自己的线程运行。其中两个使用OnIdle函数;另外两个则作为独立的线程运行。-a multi-tasking applications. Color wheel with four applications, each color wheel has its own threads to run. Two of them use OnIdle function; The other two were used as the independent threads running.
- 2022-05-17 14:55:08下载
- 积分:1
-
MyProcess进程管理器
MyProcess进程管理器-MyProcess thead manegement
- 2022-04-15 05:22:09下载
- 积分:1
-
可用于对VC++、C++ Builder、Delphi、VB、C/C++、ASM等程序源代码进行详细的统计,可以非常精确的得到程序中代码行、注释行和空白行的行数...
可用于对VC++、C++ Builder、Delphi、VB、C/C++、ASM等程序源代码进行详细的统计,可以非常精确的得到程序中代码行、注释行和空白行的行数。程序会自动根据你选择的文件类型进行统计,并将所有文件的分析结果进行汇总,可以方便、准确的对程序代码量进行全面的统计。本软件是绿色软件,不需要安装,直接运行。-can be used to VC, C Builder, Delphi, VB, C/C, ASM source code for the procedures detailed statistics can be very precise procedure code OK, OK Notes blank line and the number of rows. The program will automatically choose your type of document statistics and the analysis of all the documents summarized results can be easily and accurately the volume of code for comprehensive statistics. The software is green software without the need for the installation, operation directly.
- 2023-05-16 05:50:03下载
- 积分:1