# ProcessingDispatch **Repository Path**: yuhuajie/ProcessingDispatch ## Basic Information - **Project Name**: ProcessingDispatch - **Description**: 模拟进程调度 - **Primary Language**: JavaScript - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2015-05-22 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #ProcessingDispatch #Home# > 本应用是进程调度算法的javascript版本,实现基本的进程调度算法。 > 双击index.html,进入主界面 ###文件目录### |--index.html 执行文件 | |——script | |——main.js 主调用脚本 | |——Process.js 进程类脚本 | |——jquery.min.js | |——ReadyQueue.js 就绪队列脚本 | |——css 样式文件夹 | |——style.css 样式表 | |--README.md ---------- ####Process.js#### 构造函数 function Process(pid,status,priority,next,life){ this.pid=pid; this.status=status; this.priority=priority; this.next=next; this.life=life; } 创建进程控制块到就绪队列中 Process.prototype.create=function(){......} 进程的生命周期消减 Process.prototype.decLife=function(){......} ####ReadyQueue.js#### 构造函数 function ReadyQueue(priority,Queue){ this.priority=priority; this.Queue=Queue; this.index=-1;//-1表示当前没有进程在队列里面 } 就绪队列中插入进程 ReadyQueue.prototype.insertProcess=function(Process){。。。。。。} 就绪队列中删除进程 ReadyQueue.prototype.deleteProcess=function(){。。。。。。} ####main.js#### 消除时间循环的函数 function breakTimeOut(){ clearInterval(t); //t为要消除的时间函数对象 } 创建时间函数 function timeOut(time){。。。。。。}