處理機(jī)調(diào)度,編寫一個(gè)進(jìn)程調(diào)度程序,允許多個(gè)進(jìn)程共行的進(jìn)程調(diào)度程序。 進(jìn)程調(diào)度算法:采用最高優(yōu)先數(shù)優(yōu)先的調(diào)度算法(即把處理機(jī)分配給優(yōu)先數(shù)最高的進(jìn)程)和先來(lái)先服務(wù)算法。 每個(gè)進(jìn)程有一個(gè)進(jìn)程控制塊(PCB)表示。進(jìn)程控制塊可以包含如下信息:進(jìn)程名、優(yōu)先數(shù)、到達(dá)時(shí)間、需要運(yùn)行時(shí)間、已用CPU時(shí)間、進(jìn)程狀態(tài)等等。 進(jìn)程的優(yōu)先數(shù)及需要的運(yùn)行時(shí)間可以事先人為地指定(也可以由隨機(jī)數(shù)產(chǎn)生)。進(jìn)程的到達(dá)時(shí)間為輸入進(jìn)程的時(shí)間。 進(jìn)程的運(yùn)行時(shí)間以時(shí)間片為單位進(jìn)行計(jì)算。 每個(gè)進(jìn)程的狀態(tài)可以是就緒 W(wait)、運(yùn)行R(Run)、或完成F(Finish)三種狀態(tài)之一。 就緒進(jìn)程獲得 CPU后都只能運(yùn)行一個(gè)時(shí)間片。用已占用CPU時(shí)間加1來(lái)表示。 如果運(yùn)行一個(gè)時(shí)間片后,進(jìn)程的已占用 CPU時(shí)間已達(dá)到所需要的運(yùn)行時(shí)間,則撤消該進(jìn)程,如果運(yùn)行一個(gè)時(shí)間片后進(jìn)程的已占用CPU時(shí)間還未達(dá)所需要的運(yùn)行時(shí)間,也就是進(jìn)程還需要繼續(xù)運(yùn)行,此時(shí)應(yīng)將進(jìn)程的優(yōu)先數(shù)減1(即降低一級(jí)),然后把它插入就緒隊(duì)列等待CPU。 每進(jìn)行一次調(diào)度程序都打印一次運(yùn)行進(jìn)程、就緒隊(duì)列、以及各個(gè)進(jìn)程的 PCB,以便進(jìn)行檢查。 重復(fù)以上過(guò)程,直到所要進(jìn)程都完成為止
上傳時(shí)間: 2013-11-26
上傳用戶:tianjinfan
基于終端的訂花系統(tǒng)_socket #include<stdio.h> #include<stdlib.h> #include<errno.h> #include<string.h> #include<sys/types.h> #include<netinet/in.h> #include<sys/socket.h> #include<sys/wait.h> #include<sys/ipc.h> #include<unistd.h> #include<sys/shm.h> #include<sys/stat.h> #define MYPORT 3490 // num of port #define BACKLOG 5 // largest num of accept #define MAXDATASIZE 1
標(biāo)簽: include gt lt socket
上傳時(shí)間: 2014-01-18
上傳用戶:003030
JavaServer Pages™ Specification This document is intended for: · Web Server and Application Server vendors that want to provide JSP containers that conform to the Tag Extensions specification. · Web Authoring Tool vendors that want to generate JSP pages that conform to the Tag Extensions specification. · Service providers that want to deliver functionality as tag libraries. · Sophisticated JSP page authors that want to define new tag libraries for their use, or who are responsible for creating tag libraries for the use of a group. · Eager JSP page authors who do not want to or cannot wait for Web Authoring Tools, or even a User’s Guide. This document is not a User’s Guide, but it contains some positioning and explanatory material.
標(biāo)簽: Specification Application JavaServer document
上傳時(shí)間: 2014-01-03
上傳用戶:qilin
本書介紹了瑞薩FLASH 開發(fā)工具箱(FDT)的使用方法,簡(jiǎn)要目錄如下: 第1章簡(jiǎn)介 第2 章系統(tǒng)概要 第3 章FDT 的使用方法 第4章等待腳本(wait For Script) 第5章存取權(quán)限(Access Rights) 第6 章用戶界面的配置(Configuring the User Interface) 第7章菜單(Menus) 第8章窗口(Windows) 第9 章Simple Interface Mode (簡(jiǎn)化界面模式) 第10 章Basic Simple Interface Mode (基礎(chǔ)簡(jiǎn)化界面模式) 第11章現(xiàn)場(chǎng)寫入(Field Programming) 第12 章E8 的升級(jí) 第13 章E8Direct 第14 章QzROM 的程序設(shè)計(jì)(QzROM Programming) 第15章鎖定 第16章升級(jí)到FDT3.07
標(biāo)簽: FLASH FDT 瑞薩 開發(fā)工具
上傳時(shí)間: 2016-04-14
上傳用戶:xinzhch
北京大學(xué)ACM比賽題目 In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Every even number greater than 4 can be written as the sum of two odd prime numbers. For example: 8 = 3 + 5. Both 3 and 5 are odd prime numbers. 20 = 3 + 17 = 7 + 13. 42 = 5 + 37 = 11 + 31 = 13 + 29 = 19 + 23. Today it is still unproven whether the conjecture is right. (Oh wait, I have the proof of course, but it is too long to write it on the margin of this page.) Anyway, your task is now to verify Goldbach s conjecture for all even numbers less than a million.
標(biāo)簽: mathematician Christian Goldbach Leonhard
上傳時(shí)間: 2016-04-22
上傳用戶:wangchong
幾個(gè)實(shí)用的Linux驅(qū)動(dòng)模塊,演示了模塊的編寫,wait/sleep, I/O空間的訪問等。
標(biāo)簽: Linux 驅(qū)動(dòng)模塊
上傳時(shí)間: 2013-12-11
上傳用戶:siguazgb
Hospital queue is a regular met are very familiar with the phenomenon. It every day one way or another in the form in front of us. For example, patients to hospitals, pharmacies dispensing to patients, patients with transfusion to the infusion room, often need wait To some kind of service.
標(biāo)簽: phenomenon Hospital familiar regular
上傳時(shí)間: 2013-12-26
上傳用戶:四只眼
虛擬頻譜分析儀的設(shè)計(jì),在linux下面安裝qt3.3以上的版本才可以運(yùn)行。 安裝步驟如下: Untar the tarball Enter the directory QtDSO call ./configure call make and wait a few minutes
標(biāo)簽: 虛擬 儀的設(shè)計(jì) 頻譜分析
上傳時(shí)間: 2013-12-17
上傳用戶:498732662
Description: This program demonstrates a half-duplex 9600-baud UART using // Timer_A3 using no XTAL and an external resistor for DCO ROSC. DCO used for // TACLK UART baud generation. The program will wait in LPM4, echoing back // a received character using 8N1 protocol. On valid RX character, the // character is echoed back. // Using a 100k resistor on ROSC, with default DCO setting, set DCOCLK ~ 2MHz. // ACLK = n/a, MCLK = SMCLK ~2MHz DCOCLK
標(biāo)簽: using demonstrates Description half-duplex
上傳時(shí)間: 2014-01-14
上傳用戶:cuiyashuo
在學(xué)習(xí)Java的多線程時(shí),對(duì)于其并發(fā)控制的實(shí)現(xiàn),一直是初學(xué)者的難點(diǎn)。本實(shí)例中,詳細(xì)的實(shí)現(xiàn)了wait與notify的使用方法與技巧。對(duì)初學(xué)者具有比強(qiáng)的參考價(jià)值。
上傳時(shí)間: 2013-12-25
上傳用戶:LIKE
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1