亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? scheduler.cc

?? Nachos platform for Ubuntu
?? CC
字號:
// scheduler.cc //	Routines to choose the next thread to run, and to dispatch to//	that thread.//// 	These routines assume that interrupts are already disabled.//	If interrupts are disabled, we can assume mutual exclusion//	(since we are on a uniprocessor).//// 	NOTE: We can't use Locks to provide mutual exclusion here, since// 	if we needed to wait for a lock, and the lock was busy, we would //	end up calling FindNextToRun(), and that would put us in an //	infinite loop.//// 	Very simple implementation -- no priorities, straight FIFO.//	Might need to be improved in later assignments.//// Copyright (c) 1992-1993 The Regents of the University of California.// All rights reserved.  See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions.#include "copyright.h"#include "scheduler.h"#include "system.h"//----------------------------------------------------------------------// Scheduler::Scheduler// 	Initialize the list of ready but not running threads to empty.//----------------------------------------------------------------------Scheduler::Scheduler(){     readyList = new List; } //----------------------------------------------------------------------// Scheduler::~Scheduler// 	De-allocate the list of ready threads.//----------------------------------------------------------------------Scheduler::~Scheduler(){     delete readyList; } //----------------------------------------------------------------------// Scheduler::ReadyToRun// 	Mark a thread as ready, but not running.//	Put it on the ready list, for later scheduling onto the CPU.////	"thread" is the thread to be put on the ready list.//----------------------------------------------------------------------voidScheduler::ReadyToRun (Thread *thread){    DEBUG('t', "Putting thread %s on ready list.\n", thread->getName());    thread->setStatus(READY);    readyList->Append((void *)thread);}//----------------------------------------------------------------------// Scheduler::FindNextToRun// 	Return the next thread to be scheduled onto the CPU.//	If there are no ready threads, return NULL.// Side effect://	Thread is removed from the ready list.//----------------------------------------------------------------------Thread *Scheduler::FindNextToRun (){    return (Thread *)readyList->Remove();}//----------------------------------------------------------------------// Scheduler::Run// 	Dispatch the CPU to nextThread.  Save the state of the old thread,//	and load the state of the new thread, by calling the machine//	dependent context switch routine, SWITCH.////      Note: we assume the state of the previously running thread has//	already been changed from running to blocked or ready (depending).// Side effect://	The global variable currentThread becomes nextThread.////	"nextThread" is the thread to be put into the CPU.//----------------------------------------------------------------------voidScheduler::Run (Thread *nextThread){    Thread *oldThread = currentThread;    #ifdef USER_PROGRAM			// ignore until running user programs     if (currentThread->space != NULL) {	// if this thread is a user program,        currentThread->SaveUserState(); // save the user's CPU registers	currentThread->space->SaveState();    }#endif        oldThread->CheckOverflow();		    // check if the old thread					    // had an undetected stack overflow    currentThread = nextThread;		    // switch to the next thread    currentThread->setStatus(RUNNING);      // nextThread is now running        DEBUG('t', "Switching from thread \"%s\" to thread \"%s\"\n",	  oldThread->getName(), nextThread->getName());        // This is a machine-dependent assembly language routine defined     // in switch.s.  You may have to think    // a bit to figure out what happens after this, both from the point    // of view of the thread and from the perspective of the "outside world".    SWITCH(oldThread, nextThread);        DEBUG('t', "Now in thread \"%s\"\n", currentThread->getName());    // If the old thread gave up the processor because it was finishing,    // we need to delete its carcass.  Note we cannot delete the thread    // before now (for example, in Thread::Finish()), because up to this    // point, we were still running on the old thread's stack!    if (threadToBeDestroyed != NULL) {        delete threadToBeDestroyed;	threadToBeDestroyed = NULL;    }    #ifdef USER_PROGRAM    if (currentThread->space != NULL) {		// if there is an address space        currentThread->RestoreUserState();     // to restore, do it.	currentThread->space->RestoreState();    }#endif}//----------------------------------------------------------------------// Scheduler::Print// 	Print the scheduler state -- in other words, the contents of//	the ready list.  For debugging.//----------------------------------------------------------------------voidScheduler::Print(){    printf("Ready list contents:\n");    readyList->Mapcar((VoidFunctionPtr) ThreadPrint);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久影院午夜论| 久久影视一区二区| 国产伦精品一区二区三区免费迷 | 国产高清在线精品| 亚洲精品视频自拍| 精品欧美一区二区三区精品久久| 成人av中文字幕| 日韩高清在线电影| 依依成人精品视频| 国产女人aaa级久久久级| 欧美精品久久99久久在免费线 | 国产欧美日韩精品一区| 91激情五月电影| 国产激情偷乱视频一区二区三区 | 国产一区二区精品久久| 亚洲成人福利片| 中文字幕在线观看不卡| 亚洲精品一区二区三区香蕉| 欧美午夜宅男影院| 99久久er热在这里只有精品15| 日韩成人精品视频| 亚洲一级在线观看| 亚洲视频图片小说| 国产精品久久一卡二卡| 久久婷婷国产综合国色天香| 欧美猛男超大videosgay| 91在线视频官网| 从欧美一区二区三区| 国产一区视频网站| 久久aⅴ国产欧美74aaa| 午夜成人免费视频| 91最新地址在线播放| 国产一区二区不卡| 激情国产一区二区| 久久精品理论片| 麻豆国产精品官网| 免费高清成人在线| 免费在线成人网| 青青草原综合久久大伊人精品优势| 亚洲无人区一区| 亚洲一区免费观看| 亚洲国产三级在线| 调教+趴+乳夹+国产+精品| 亚洲最大成人网4388xx| 亚洲一区欧美一区| 亚洲国产视频网站| 日韩国产精品大片| 美女免费视频一区| 精品在线视频一区| 国产麻豆视频一区| 成人一区二区三区在线观看| 成人高清伦理免费影院在线观看| 国产成人免费在线观看| 国产成人在线视频播放| av在线不卡观看免费观看| 不卡一区二区三区四区| 色婷婷精品久久二区二区蜜臀av| 91啦中文在线观看| 欧美揉bbbbb揉bbbbb| 3d成人h动漫网站入口| 日韩免费性生活视频播放| 久久综合九色综合久久久精品综合| 久久众筹精品私拍模特| 欧美国产日韩亚洲一区| 成人欧美一区二区三区黑人麻豆 | 视频一区二区不卡| 美女脱光内衣内裤视频久久网站| 久久精品国产精品青草| 国产激情一区二区三区桃花岛亚洲| 国产一区视频在线看| 成人sese在线| 欧美午夜在线观看| 精品欧美黑人一区二区三区| 欧美激情在线观看视频免费| 亚洲图片另类小说| 91麻豆自制传媒国产之光| 在线视频你懂得一区二区三区| 欧美日韩激情一区二区三区| 欧美va亚洲va香蕉在线| 国产精品成人在线观看| 五月激情综合婷婷| 国产高清不卡二三区| 欧洲精品视频在线观看| 欧美不卡123| 日韩毛片精品高清免费| 青青草伊人久久| av毛片久久久久**hd| 在线电影院国产精品| 久久久久久99久久久精品网站| 亚洲欧美国产高清| 精品一区二区国语对白| 色欧美片视频在线观看| 26uuu国产日韩综合| 一区二区三国产精华液| 韩国视频一区二区| 欧美在线视频日韩| 亚洲国产精华液网站w| 日韩精品久久久久久| 不卡高清视频专区| 精品国产欧美一区二区| 亚洲在线观看免费| 高清免费成人av| 日韩片之四级片| 亚洲免费成人av| 国产a精品视频| 日韩欧美一区在线观看| 亚洲一区二区高清| 成人一区二区视频| 久久中文字幕电影| 免费人成精品欧美精品| 91精品办公室少妇高潮对白| 国产三级久久久| 久久av中文字幕片| 欧美二区在线观看| 亚洲国产日韩一区二区| 99久久精品免费看国产免费软件| 久久综合精品国产一区二区三区| 一区二区三区欧美激情| www.欧美色图| 国产日韩综合av| 国产尤物一区二区在线| 欧美一级片免费看| 亚洲一区二区三区三| 99久久久免费精品国产一区二区 | 国产偷国产偷精品高清尤物| 免费观看一级特黄欧美大片| 欧美午夜精品久久久久久孕妇 | 久久久久久久久一| 蜜臀久久99精品久久久画质超高清| 91传媒视频在线播放| 最新日韩av在线| 99久久久国产精品| 国产精品不卡在线观看| 成人免费视频网站在线观看| 久久综合精品国产一区二区三区| 蜜桃视频在线观看一区| 日韩欧美在线观看一区二区三区| 日日夜夜精品视频天天综合网| 欧美日韩在线一区二区| 亚洲高清不卡在线观看| 欧美日韩国产综合一区二区三区 | 一区二区在线观看av| 91麻豆swag| 一区二区三国产精华液| 91福利在线免费观看| 亚洲一区二区欧美激情| 欧美写真视频网站| 婷婷中文字幕一区三区| 9191国产精品| 欧美色图片你懂的| 亚洲成人av免费| 91精品国产综合久久久久久久久久 | 8x8x8国产精品| 免费看精品久久片| 欧美成人乱码一区二区三区| 国产一区不卡精品| 国产精品色噜噜| 色综合天天综合网国产成人综合天 | 顶级嫩模精品视频在线看| 中文字幕免费观看一区| 99视频精品免费视频| 亚洲免费毛片网站| 欧美日本韩国一区二区三区视频| 五月婷婷激情综合网| 精品国产免费久久| 福利91精品一区二区三区| 亚洲人123区| 欧美精品久久久久久久多人混战| 老司机精品视频导航| 国产精品午夜免费| 在线精品视频免费播放| 捆绑调教美女网站视频一区| 欧美激情中文字幕一区二区| 91免费看片在线观看| 日韩精品久久理论片| 国产欧美日本一区视频| 色哟哟亚洲精品| 美女诱惑一区二区| 亚洲欧美综合色| 制服视频三区第一页精品| 国产99久久久精品| 亚洲成人精品一区二区| 国产欧美一区二区三区沐欲| 色婷婷av久久久久久久| 黄页网站大全一区二区| 成人免费在线视频观看| 欧美一区二区三区成人| 国产成人精品免费网站| 亚洲成人自拍偷拍| 欧美激情在线一区二区| 欧美高清性hdvideosex| 成人中文字幕合集| 日韩电影网1区2区| 国产精品免费视频观看| 91精品欧美久久久久久动漫| 91亚洲资源网| 国产一区二区三区四区五区美女| 洋洋av久久久久久久一区| 中文字幕乱码久久午夜不卡| 欧美色电影在线|