freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

module4processes進(jìn)程(編輯修改稿)

2024-08-13 16:02 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU. 短程調(diào)度(或 CPU調(diào)度) 選擇可被下一個(gè)執(zhí)行并分配 CPU的進(jìn)程 Operating System Concepts Addition of Medium Term Scheduling 中程調(diào)度 Operating System Concepts Schedulers調(diào)度 (Cont.) ? Shortterm scheduler is invoked very frequently (milliseconds) ? (must be fast). 短程調(diào)度切換頻率高 ? Longterm scheduler is invoked very infrequently (seconds, minutes) ? (may be slow). 長(zhǎng)程調(diào)度不快 ? The longterm scheduler controls the degree of multiprogramming. 長(zhǎng)程調(diào)度控制了多道程序的“道” ? Processes can be described as either: 進(jìn)程可以用下列方式描述: – I/Obound process – spends more time doing I/O than putations, many short CPU bursts. I/O型進(jìn)程 花費(fèi) I/O 時(shí)間多于計(jì)算,許多短 CPU處理 – CPUbound process – spends more time doing putations。 few very long CPU bursts. CPU 型進(jìn)程 花費(fèi)更多時(shí)間于計(jì)算,許多長(zhǎng) CPU處理 Operating System Concepts Context Switch 上下文切換 ? When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process. 當(dāng) CPU切換至另一個(gè)進(jìn)程時(shí),系統(tǒng)必須保存舊進(jìn)程狀態(tài)并為新進(jìn)程調(diào)入所保留的狀態(tài) ? Contextswitch time is overhead。 the system does no useful work while switching. 上下文切換的時(shí)間開(kāi)銷(xiāo)較重;在切換時(shí),系統(tǒng)沒(méi)有做有用的工作 ? Time dependent on hardware support. 時(shí)間取決于硬件的支持 Operating System Concepts Process Creation 進(jìn)程創(chuàng)建 ? Parent process creates children processes, which, in turn create other processes, forming a tree of processes. 父進(jìn)程創(chuàng)建子進(jìn)程,如此輪流創(chuàng)建進(jìn)程下去,構(gòu)成一個(gè)進(jìn)程樹(shù) ? Resource sharing 資源共享 – Parent and children share all resources. 父進(jìn)程子進(jìn)程共享所有的資源 – Children share subset of parent’s resources. 子進(jìn)程共享父進(jìn)程資源的子集 – Parent and child share no resources. 父進(jìn)程和子進(jìn)程無(wú)資源共享 ? Execution執(zhí)行 – Parent and children execute concurrently. 父進(jìn)程和子進(jìn)程并發(fā)執(zhí)行 – Parent waits until children terminate. 父進(jìn)程等待,直到子進(jìn)程終止 Operating System Concepts Process Creation (Cont.) 進(jìn)程創(chuàng)建 ? Address space 地址空間 – Child duplicate of parent. 子女復(fù)制雙親 – Child has a program loaded into it. 子女有一個(gè)程序被調(diào)入 ? UNIX examples UNIX例子 – fork system call creates new process fork 系統(tǒng)調(diào)用創(chuàng)建新進(jìn)程 – execve system call used after a fork to replace the process’ memory space with a new program. 在 fork 用一個(gè)新程序替代了進(jìn)程的內(nèi)存空間之后,采用execve系統(tǒng)調(diào)用 Operating System Concepts Process Creation ?How to create a process? System call. ?In UNIX, a process can create another process using the fork() system call –int pid = fork()。 /* this is in C */ ?The creating process is called the parent and the new process is called the child ?The child process is created as a copy of the parent process (process image and process control structure) except for the identification and scheduling state –Parent and child processes run in two different address spaces –By default, there’s no memory sharing –Process creation is expensive because of this copying ?The exec() call is provided for the newly created process to run a different program than that of the parent Operating System Concepts Process Creation fork() fork() code exec() PCBs Operating System Concepts Example of Process Creation Using Fork ? The UNIX shell is mandline interpreter whose basic purpose is for user to run applications on a UNIX system ? cmd arg1 arg2 ... argn Operating System Concepts A Tree of Processes On A Typical UNIX System 典型 UNIX系統(tǒng)中的進(jìn)程樹(shù) Operating System Concepts Process Termination 進(jìn)程終止 ? Process executes last statement and asks the operating system to decide it (exit).進(jìn)程執(zhí)行的最后一項(xiàng)并詢(xún)問(wèn)操作系統(tǒng)作出決定(退出) Output data from child to parent (via wait). 從子進(jìn)程向父進(jìn)程輸出數(shù)據(jù))(通過(guò)等待) – Process’ resources are deallocated by operating system. 操作系統(tǒng)收回進(jìn)程的資源 ? Parent may terminate execution of children processes (abort). 父進(jìn)程可中止子進(jìn)程的執(zhí)行(終止) – Child has exceeded allocated – Task assigned to child is no longer required. 賦予子進(jìn)程的任務(wù)不再需要
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)教案相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1