秋霞电影网午夜鲁丝片无码,真人h视频免费观看视频,囯产av无码片毛片一级,免费夜色私人影院在线观看,亚洲美女综合香蕉片,亚洲aⅴ天堂av在线电影猫咪,日韩三级片网址入口

歡迎來(lái)到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁(yè) 裝配圖網(wǎng) > 資源分類 > PPT文檔下載  

linux內(nèi)核taskstruct結(jié)構(gòu)體字段分析課件

  • 資源ID:252417113       資源大?。?span id="mzebxcnn0" class="font-tahoma">144.11KB        全文頁(yè)數(shù):19頁(yè)
  • 資源格式: PPT        下載積分:20積分
快捷下載 游客一鍵下載
會(huì)員登錄下載
微信登錄下載
三方登錄下載: 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要20積分
郵箱/手機(jī):
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機(jī)號(hào),方便查詢和重復(fù)下載(系統(tǒng)自動(dòng)生成)
支付方式: 微信支付   
驗(yàn)證碼:   換一換

 
賬號(hào):
密碼:
驗(yàn)證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會(huì)被瀏覽器默認(rèn)打開(kāi),此種情況可以點(diǎn)擊瀏覽器菜單,保存網(wǎng)頁(yè)到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請(qǐng)使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無(wú)水印,預(yù)覽文檔經(jīng)過(guò)壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標(biāo)題沒(méi)有明確說(shuō)明有答案則都視為沒(méi)有答案,請(qǐng)知曉。

linux內(nèi)核taskstruct結(jié)構(gòu)體字段分析課件

單擊此處編輯母版標(biāo)題樣式,單擊此處編輯母版文本樣式,第二級(jí),第三級(jí),第四級(jí),第五級(jí),*,*,*,linux 內(nèi)核源碼分析,進(jìn)程管理(一),郭海林,2012.9.29,linux 內(nèi)核源碼分析進(jìn)程管理(一),1,重要數(shù)據(jù)結(jié)構(gòu)雙向鏈表(1),結(jié)構(gòu)體定義:,struct list_head,struct list_head*next,*prev;,;,list_head,list_head,list_head,list_head,next,prev,next,prev,next,prev,next,prev,重要數(shù)據(jù)結(jié)構(gòu)雙向鏈表(1)結(jié)構(gòu)體定義:list_head,2,重要數(shù)據(jù)結(jié)構(gòu)雙向鏈表(2),為什么要使用這種結(jié)構(gòu)?,容器機(jī)制,將對(duì)象嵌入到另一個(gè)對(duì)象中,怎樣通過(guò)鏈表元素找到容器對(duì)象的實(shí)例?,next,prev,task_struct,list_head,next,prev,task_struct,list_head,next,prev,task_struct,list_head,重要數(shù)據(jù)結(jié)構(gòu)雙向鏈表(2)為什么要使用這種結(jié)構(gòu)?next,3,重要數(shù)據(jù)結(jié)構(gòu)雙向鏈表(3),./include/linux/list.h,list_entry(p,t,m),已知類型為t的數(shù)據(jù)結(jié)構(gòu)包含了一個(gè)list_head字段,該字段的名字是m,地址為p,返回類型為t的數(shù)據(jù)結(jié)構(gòu)地址,list_entry(0 x.,struct task_struct,tasks),重要數(shù)據(jù)結(jié)構(gòu)雙向鏈表(3)./include/lin,4,重要數(shù)據(jù)結(jié)構(gòu)散列表(1),結(jié)構(gòu)體定義,表頭:,struct hlist_head,struct hlist_node*first;,;,節(jié)點(diǎn):,struct hlist_node,struct hlist_node*next,*pprev;,;,重要數(shù)據(jù)結(jié)構(gòu)散列表(1)結(jié)構(gòu)體定義,5,重要數(shù)據(jù)結(jié)構(gòu)散列表(2),pprev,next,hlist_head,hlist_node,null,first,first,first,hlist_node,pprev,next,pprev,next,hlist_node,null,重要數(shù)據(jù)結(jié)構(gòu)散列表(2)pprevnexthlist_h,6,為什么要這么定義?,進(jìn)程結(jié)構(gòu)體剖析(1),struct task_struct,volatile long state;/*-1 unrunnable,0 runnable,0 stopped*/,/.,long exit_state;,/.,進(jìn)程的狀態(tài)宏定義:,#define,TASK_RUNNING,0,#define,TASK_INTERRUPTIBLE,1,#define,TASK_UNINTERRUPTIBLE,2,#define,_TASK_STOPPED,4,#define,_TASK_TRACED,8,/*in tsk-exit_state*/,#define,EXIT_ZOMBIE,16,#define,EXIT_DEAD,32,/.,為什么要這么定義?進(jìn)程結(jié)構(gòu)體剖析(1)struct task,7,進(jìn)程結(jié)構(gòu)體剖析(2),struct task_struct,/.,struct list_head tasks;,/,將系統(tǒng)中所有進(jìn)程通過(guò)雙向鏈表鏈接起來(lái)!,/.,怎樣訪問(wèn)所有的進(jìn)程呢?,#define,for_each_process(p),for(p=),#define,next_task(p),list_entry_rcu(p)-tasks.next,struct task_struct,tasks),給出全局pid號(hào),怎么找到相應(yīng)進(jìn)程的task_struct?,進(jìn)程結(jié)構(gòu)體剖析(2)struct task_struct,8,進(jìn)程結(jié)構(gòu)體剖析(3),struct task_struct,/.,pid_t pid;,/進(jìn)程標(biāo)識(shí)符(線程),pid_t tgid;,/線程組的領(lǐng)頭線程ID,struct task_struct*group_leader;,/threadgroup leader,/.,系統(tǒng)調(diào)用 getpid()返回什么?,進(jìn)程結(jié)構(gòu)體剖析(3)struct task_struct,9,進(jìn)程結(jié)構(gòu)體剖析(4.1),struct task_struct,/.,struct task_struct _rcu*real_parent;/*real parent process*/,struct task_struct _rcu*,parent,;/*recipient of SIGCHLD,wait4()reports*/,struct list_head,children,;/*list of my children*/,struct list_head,sibling,;/*linkage in my parents children list*/,/.,進(jìn)程之間的關(guān)系:,父子關(guān)系,兄弟關(guān)系,進(jìn)程結(jié)構(gòu)體剖析(4.1)struct task_struct,10,children,sibling,children,sibling,children,sibling,children,sibling,children,sibling,A,D,C,B,E,P,N,N,P,P,P,N,N,P,進(jìn)程結(jié)構(gòu)體剖析(4.2),假設(shè)現(xiàn)在有進(jìn)程A,生成三個(gè)子進(jìn)程B、C、D,B進(jìn)程又生成一個(gè)子進(jìn)程E。,五個(gè)task_struct怎么進(jìn)行鏈接?,childrensiblingchildrensibling,11,進(jìn)程結(jié)構(gòu)體剖析(5.1),struct task_struct,/.,/*PID/PID hash table linkage.*/,struct pid_link pidsPIDTYPE_MAX;,/.,enum pid_type,PIDTYPE_PID,PIDTYPE_PGID,PIDTYPE_SID,PIDTYPE_MAX,;,/進(jìn)程PID,/線程組領(lǐng)頭線程PID,/會(huì)話領(lǐng)頭進(jìn)程ID,/類型個(gè)數(shù),pids0,pids1,pids2,進(jìn)程結(jié)構(gòu)體剖析(5.1)struct task_struct,12,關(guān)鍵結(jié)構(gòu)體,struct,upid,int nr;,struct pid_namespace*ns;,struct hlist_node pid_chain;,;,struct,pid_link,struct hlist_node node;,struct pid*pid;,;,struct,pid,atomic_t count;,unsigned int level;,struct hlist_head tasksPIDTYPE_MAX;,struct rcu_head rcu;,struct upid numbers1;,;,count,lever,task0,task1,task2,nr,node,pid,node,pid,ns,pid_chain,關(guān)鍵結(jié)構(gòu)體struct upid struct pid_l,13,2,1,3,pid命名空間(1),1,2,3,4,5,6,7,8,10,9,2,1,3,1,lever 0,lever 1,lever 2,213pid命名空間(1)123456781092131le,14,pid命名空間(2),struct nsproxy,atomic_t count;,struct uts_namespace,*uts_ns;,struct ipc_namespace,*ipc_ns;,struct mnt_namespace*mnt_ns;,struct pid_namespace,*pid_ns;,struct net,*net_ns;,;,struct pid_namespace,/.,unsigned int,level,;,struct pid_namespace*,parent,;,/.,;,pid命名空間(2)struct nsproxy stru,15,結(jié)構(gòu)圖,見(jiàn)板書.,結(jié)構(gòu)圖見(jiàn)板書.,16,重要函數(shù)(1),根據(jù)進(jìn)程的命名空間ns以及局部PID號(hào)nr,怎么找到進(jìn)程的task_struct?,nr,ns -upid -pid -task_struct,struct pid*find_pid_ns(int nr,struct pid_namespace*ns),struct task_struct*pid_task(struct pid*pid,enum pid_type type),重要函數(shù)(1)根據(jù)進(jìn)程的命名空間ns以及局部PID號(hào)nr,怎,17,重要函數(shù)(2),給出task_struct、ID類型、命名空間,怎么取得命名空間局部的ID號(hào)?,task_struct -pid -upid -nr,struct pid*task_pid(struct task_struct*task),pid_t pid_nr_ns(struct pid*pid,struct pid_namespace*ns),重要函數(shù)(2)給出task_struct、ID類型、命名空間,18,重要函數(shù)(3),對(duì)于一個(gè)新建的進(jìn)程,怎么在各個(gè)命名空間內(nèi)生成唯一的PID號(hào)?,struct pid*alloc_pid(struct pid_namespace*ns),(見(jiàn)源代碼),重要函數(shù)(3)對(duì)于一個(gè)新建的進(jìn)程,怎么在各個(gè)命名空間內(nèi)生成唯,19,

注意事項(xiàng)

本文(linux內(nèi)核taskstruct結(jié)構(gòu)體字段分析課件)為本站會(huì)員(文****)主動(dòng)上傳,裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng)(點(diǎn)擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因?yàn)榫W(wǎng)速或其他原因下載失敗請(qǐng)重新下載,重復(fù)下載不扣分。




關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  sobing.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號(hào):ICP2024067431號(hào)-1 川公網(wǎng)安備51140202000466號(hào)


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺(tái),本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng),我們立即給予刪除!