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

正文內(nèi)容

threads線程(存儲(chǔ)版)

2025-10-12 14:27上一頁面

下一頁面
  

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