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

正文內(nèi)容

threads線(xiàn)程-文庫(kù)吧

2025-07-29 14:27 本頁(yè)面


【正文】 t result for C = A + B ?三種線(xiàn)程狀態(tài) : running, ready, blocked ?線(xiàn)程無(wú)掛起狀態(tài) ?Termination of a process, will terminates all threads within the process Threads States(線(xiàn)程狀態(tài) ) User Level Threads(ULT) ? 內(nèi)核不關(guān)注線(xiàn)程的存在 ? 所有的線(xiàn)程管理由應(yīng)用程序通過(guò)調(diào)用 ULT庫(kù)實(shí)現(xiàn) ? 線(xiàn)程間的切換無(wú)需內(nèi)核模式下的特權(quán)指令(無(wú)模式轉(zhuǎn)換) ? 線(xiàn)程調(diào)度由特定的應(yīng)用 程序完成 ? 例子 POSIX Pthreads Mach Cthreads 一種 UNIX的操作系統(tǒng) ,采用微內(nèi)核 Solaris threads User Level Threads library 用戶(hù)級(jí)線(xiàn)程庫(kù) ? Contains codes for: (包含以下代碼 ) – creating and destroying threads(線(xiàn)程的創(chuàng)建和撤消 ) – passing messages and data between threads 線(xiàn)程間數(shù)據(jù)和消息的傳遞 – scheduling thread execution 對(duì)線(xiàn)程的調(diào)度 – saving and restoring thread contexts 對(duì)線(xiàn)程上下文的保存和恢復(fù) ? Advantages ? Thread switching does not involve the kernel: no mode switching 無(wú)模式 (管態(tài) /目態(tài) )轉(zhuǎn)換 ? Scheduling can be application specific: choose the best algorithm. 可選擇最好的調(diào)度算法 ? ULTs can run on any OS. Only needs a thread library 只要有庫(kù) ,就可在任何操作系統(tǒng)運(yùn)行 ? Inconveniences ? Most system calls are blocking and the kernel blocks processes. So all threads within the process will be blocked 多數(shù)的系統(tǒng)調(diào)用將阻塞該進(jìn)程的所有線(xiàn)程 ? The kernel can only assign processes to processors. Two threads within the same process cannot run simultaneously on two processors 一個(gè)進(jìn)程的兩個(gè)線(xiàn)程不能同在兩個(gè)處理器上同時(shí)運(yùn)行 用戶(hù)級(jí)線(xiàn)程的優(yōu)缺點(diǎn) Kernel Level Threads(KLT) 內(nèi)核級(jí)的線(xiàn)程 ? 內(nèi)核完成對(duì)所有線(xiàn)程的管理 ? 無(wú)線(xiàn)程庫(kù),但內(nèi)核供內(nèi)核線(xiàn)程的編程接口( API) ? 內(nèi)核需要維護(hù)進(jìn)程和線(xiàn)程的上下文信息 ? 線(xiàn)程間的調(diào)度由內(nèi)核完成 ? 調(diào)度的基本單位是線(xiàn)程 ? 例子 Windows 95/98/NT/2020 Solaris
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1