【正文】
...................... 4 進程與線程的關系 ................................................ 4 Windows自帶的任務管理器分析 .................................... 5 2 主要功能及設計思路 ...................................................... 5 主要功能 ........................................................... 5 設計思路 ........................................................... 6 3 詳細設計 ............................................................... 6 主框架的實現(xiàn) ....................................................... 6 子對話框的顯示 .................................................. 7 實現(xiàn)菜單 ....................................................... 8 提升程序權限 .................................................... 9 任務列表頁面設計 .................................................... 9 顯示任務信息 .................................................... 9 結束任務 ...................................................... 10 切換任務 ...................................................... 11 進程列表頁面設計 ................................................... 11 顯示進程信息 ................................................... 12 顯示模塊及線程信息 ............................................. 14 結束進程 ...................................................... 16 刪除文件 ...................................................... 17 保存進程信息到文件 ............................................. 18 系統(tǒng)性能頁面設計 ................................................... 18 繪制 CPU使用率圖 ............................................... 18 繪制內(nèi)存使用率圖 ............................................... 18 591 論文網(wǎng) 其他性能顯示 ................................................... 19 系統(tǒng)信息顯示 ................................................... 19 4 測試結果 .............................................................. 20 測試環(huán)境 .......................................................... 20 測試方法 .......................................................... 20 測試結果 .......................................................... 20 結 論 .................................................................. 22 參考文獻 .................................................................. 22 第 2 頁 共 25 頁 1 引言 課題背景 隨著計算機 的廣泛應用,很多的軟件被安裝在 計算機上,使計算機運行的程序進程 越來越多;很多的程序在運行時常出現(xiàn)異常(如不能正常結束、占用大量資源、發(fā)現(xiàn)異常的進程等)。 關鍵詞 : 任務管理器 ; 線程 ; 進程; API 591 論文網(wǎng) The Design and Implementation of the Processes Management Tool for Windows Abstract There are some defects in the Task Manager builtin Windows. For example, it doesn39。三個頁面分別用于顯示當前運行的窗口程序、進程及進程模塊、系統(tǒng)資源使用情況。 簡述 WINDOWS 進程管理工具的原理和實現(xiàn) 摘 要 Windows 自帶的任務管理器存在功能上的缺陷, 比 如不能查看進程的模塊及線程信息。程序還實現(xiàn)了結束任務、切換任務、終止進程等對進程管理的基本功能。t show us the information of process modules and threads. The work of my design is to follow the Windows Task Manager and develop the software which has improved function for managing process. This software is designed to be a program based on a dialog write in the VC++. There is a label control in the main dialog box, and there are three pages for task, process and system information. The label control is used to select the page and to show it. The three pages are used respectively to display the information of task runs at current, process and process modules, the utilization of system resources. This software also realized some basic function for managing process, such as ending the task, switching the task, terminating the process and so on. During the process of my program, the information for tasks, process, thread modules and the utilization of system resource is got by calling the Windows API functions. Finally I test it on the Windows XP system. And it achieves the basic function for managing process. It provides a good reference for users to view the process at current and the utilization of system resources. Key words: Task Manager。這些現(xiàn)象給我們的計算機使用及管理帶來很多的不便。微軟 Windows 操作系統(tǒng)系列 (98 和 ME 除外 )都自帶有 進程管理器,但功能不是很完善,不能查看進程模塊及線程信息,而許多其他版本的Windows 進程管理軟件都具有完善的功能。 課題 設計選擇開發(fā)一個進程管理器軟件, 能夠使自己 綜合運用以前所學知識(包括操作系統(tǒng)、編程、系統(tǒng)安全等知識)的能力,同時也使 自己 了解當今軟件編程的一些新技術;既鍛煉了 自己 的實際動手能力,又引導 自己進行了一次模擬實際產(chǎn)品的開發(fā),對于自己 以后工作能力的培養(yǎng)具有重要的意義 。內(nèi)核對象也是系統(tǒng)用來存放關于進程的統(tǒng)計信息的地方。 進程是一個動態(tài)的執(zhí)行過程,它動態(tài)地被創(chuàng)建,并被調(diào)度執(zhí)行后消亡。進程控制塊包含了有關進程的描述信息、控制信息以及資源信息,是進程動態(tài)特征的集中反應。而數(shù)據(jù)結構集是程序在執(zhí)行時必不可少的工作區(qū)和操作對象。系統(tǒng)根據(jù) PCB 結構中的狀態(tài)值控制進程。處于等待狀態(tài)的進程因等待的事件發(fā)生而被喚醒進入就緒狀態(tài) ,如圖 1。另一 個是線程堆棧,它用于維護線程在執(zhí)行代碼時需要的所有函數(shù)參數(shù)和局部變量 線程只由相關的堆棧(系統(tǒng)?;蛴脩魲#?、 寄存器和線程控制表 TCB 組成。這五種基本操作是: 派生:線程在進程內(nèi)派生出來,它既可由進程派生,也可由線程派生。 結束:如果一個線程執(zhí)行結束,它的寄存器上下文以及堆棧內(nèi)容等將被釋放。 線程與資源分配無關,它屬于某一個進程,并與進程內(nèi)的其它線程一起共享進程的資源。如果沒有線程來執(zhí)行進程的地址空間中的代碼,那么進程就沒有存在的理