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

正文內(nèi)容

操作系統(tǒng)進(jìn)程管理演示系統(tǒng)開發(fā)(生產(chǎn)者-消費(fèi)者)畢業(yè)論文-閱讀頁

2024-09-16 12:14本頁面
  

【正文】 i++) { (P%d,i)。 thism_PT[i]CreateThread(CREATE_SUSPENDED)。 thism_PT[i]ResumeThread()。 } 2. 啟動消費(fèi)者按紐的代碼: void CPCDlg::OnStartc() { UpdateData(true)。 if( thism_nc0amp。thism_nc11) { (false)。 for( unsigned i=0。i++) { (C%d,i)。 thism_CT[i]CreateThread(CREATE_SUSPENDED)。 thism_CT[i]ResumeThread()。 } 3. 初始狀態(tài)按紐的代碼: void CPCDlg::OnRefresh() { // TODO: Add your control notification handler code here m_continue=false。iSIZE_OF_BUFFER。 m_hEmptySemaphore[i]=CreateSemaphore(NULL,1,1,NULL)。 m_CArray[i]=0。 m_CStr[i]=。 } Invalidate()。 (true)。 } 系統(tǒng) 功能的實(shí)現(xiàn) 程序中共有 6 個(gè)線程 , 兩個(gè)生產(chǎn)者線程 , 兩個(gè)消費(fèi)者線程 ,另外兩個(gè)線程則根據(jù)相同概率改變身份來模擬生產(chǎn)者或者消費(fèi)者 , 以便構(gòu)建任意多個(gè)生產(chǎn)者 消費(fèi)者的可視化環(huán)境。生產(chǎn)者和消費(fèi)者問題需要的界面效果是 , 生產(chǎn)者在消費(fèi)者前面不停地生產(chǎn) , 而消費(fèi)者則在生產(chǎn)者后面不停的消費(fèi) , 呈現(xiàn)追趕的態(tài)勢。因此 , 用了 11個(gè)正方形方框代表 11個(gè)緩沖區(qū) 。 如果當(dāng)前沒有空緩沖區(qū)位置可以放貨 , 就進(jìn)入等待狀態(tài) , 等待消費(fèi)者消費(fèi)并讓出監(jiān)控器。消費(fèi)者則在生產(chǎn)者后面 , 消費(fèi)掉消費(fèi)者指針當(dāng)前位置緩沖區(qū)內(nèi)的產(chǎn)品 , 方框重新改變?yōu)榘咨?,然后浙江林學(xué)院天目學(xué)院本科生畢業(yè)設(shè)計(jì)(論文) 18 消費(fèi)者指針也順時(shí)針前進(jìn)一格 , 指向下一個(gè)存放了產(chǎn)品的緩沖區(qū) 。 浙江林學(xué)院天目學(xué)院本科生畢業(yè)設(shè)計(jì)(論文) 19 4 系統(tǒng)演示 系統(tǒng) 演示的準(zhǔn)備 為了驗(yàn)證上述生產(chǎn)者 消費(fèi)者問題實(shí)現(xiàn)方案的正確性, 系統(tǒng)將演示模擬效果。 1. 單生產(chǎn)者 單消費(fèi)者問題模型 。 系統(tǒng) 演示的效果 單生產(chǎn)者 單消費(fèi)者模擬 效果 首先設(shè)定緩沖區(qū)全紅,既緩沖區(qū)為滿的情況 。反之 ,生產(chǎn)者就可以把生產(chǎn)出來的數(shù)據(jù)放入該緩沖區(qū)塊中 ,然后判斷當(dāng)前阻塞隊(duì)列中是否有消費(fèi)者進(jìn)程阻塞 ,如果有則將其喚醒。反之 ,消費(fèi)者從該緩沖區(qū)塊中取出數(shù)據(jù)消費(fèi) ,然后再判斷阻塞隊(duì)列中是否有生產(chǎn)者進(jìn)程需要被喚醒。消費(fèi)者也可以從緩沖區(qū)中已存有數(shù)據(jù)的緩沖 區(qū)塊中取數(shù)消費(fèi)。這就是基于多緩沖區(qū)的生產(chǎn)者與消費(fèi)者問題 。 浙江林學(xué)院天目學(xué)院本科生畢業(yè)設(shè)計(jì)(論文) 21 圖 3 個(gè)生產(chǎn)者生產(chǎn)情況 圖 4個(gè)消費(fèi)者消費(fèi)的 4個(gè)緩沖池內(nèi)的產(chǎn)品 浙江林學(xué)院天目學(xué)院本科生畢業(yè)設(shè)計(jì)(論文) 22 系統(tǒng)演示 結(jié)論 單生產(chǎn)者 單消費(fèi)者模擬 : 從結(jié)果可以看出 ,生產(chǎn)者和消費(fèi)者線程是在并發(fā)的執(zhí)行。只有當(dāng)生產(chǎn)者將數(shù)據(jù)放入單緩沖區(qū)后 ,才可以喚醒 1個(gè)消費(fèi)者取數(shù)消費(fèi)。 多生產(chǎn)者 多消費(fèi)者模擬 : 當(dāng)循環(huán)緩沖區(qū)隊(duì)列空時(shí) ,消費(fèi)者線程阻塞 。當(dāng)有 1 個(gè)生產(chǎn)者線程往循環(huán)緩沖區(qū)中放了數(shù)據(jù)后 ,它會查看阻塞隊(duì)列中是否有消費(fèi)者線程需要被喚醒 。 系統(tǒng)準(zhǔn)確的模擬了在多緩沖區(qū)下的單生產(chǎn)者 單消費(fèi)者及多生產(chǎn)者 多消費(fèi)者問題的模擬情況,停止按紐的功能讓模擬系統(tǒng)實(shí)時(shí)的反映生產(chǎn)者 消費(fèi)者模擬的情況,實(shí) 現(xiàn)了教學(xué)演示的要求。通過可視化設(shè)計(jì), 使我們 很快地就理解并掌握了操作系統(tǒng)中 生產(chǎn)者 消費(fèi)者 進(jìn)程調(diào)度的原理及算法,并通過設(shè)計(jì)驗(yàn)證了進(jìn)程調(diào)度;同時(shí),在設(shè)計(jì)中, 我 的程序設(shè)計(jì)能力大大提高了,鞏固 了 數(shù)據(jù) 結(jié)構(gòu)、計(jì)算機(jī)算法等知識。 浙江林學(xué)院天目學(xué)院本科生畢業(yè)設(shè)計(jì)(論文) 24 參考文獻(xiàn) [1] 楊貴和 . 操作系統(tǒng)課中進(jìn)程調(diào)度的可視化設(shè)計(jì) [J]. 中國科教創(chuàng)新導(dǎo)刊 , 2020, 07 [2] 謝印寶 ,田愛奎 ,謝印智 . 關(guān)于操作系統(tǒng)生產(chǎn)者消費(fèi)者問題 [J]. 淄博學(xué)院學(xué)報(bào) (自然科學(xué)與工程版 ), 2020,03 [3] 宋新麗 ,何永強(qiáng) . 用信號量機(jī)制與 PV 操作解決進(jìn)程同步互斥問題的方法 [J]. 河南紡織高等??茖W(xué)校學(xué)報(bào) ,2020 [4] 張賢達(dá) . 現(xiàn)代信號處理 (第二版 )[M].北京 :清華大學(xué)出版社 ,2020. [5] 胡小龍 ,等 . Windows 操作系統(tǒng)進(jìn)程通信機(jī)制 [J].計(jì)算機(jī)應(yīng)用研究 ,2020 ,19 (12) [6] 賈廣雷 .多線程技術(shù)及其在串口通信中的應(yīng)用 [J].計(jì)算機(jī)工程 ,2020 ,29 (1) [7] 陳周造 .精通 C ++ Builder 5 程序設(shè)計(jì)高級教程 [M].中國青年出版社 ,2020. [8] 帖 軍 ,陳幼均 .進(jìn)程同步中的生產(chǎn)者 — 消費(fèi)者模型分析 [J].武漢科技學(xué)院學(xué) 報(bào) 2020,04 [9] 帖軍 . 同步 互斥機(jī)制中的讀者 寫者模型 [J].中南民族大學(xué)學(xué)報(bào)(自然科學(xué)版), 2020 24( 3) [10] 陸松年 .作系統(tǒng)教程(第 2版) [M].電子工業(yè)出版社 ,2020 [11] 胡明慶 ,高巍 ,鐘梅 .操作系統(tǒng)教程與實(shí)驗(yàn) .清華大學(xué)出版社 [M].2020 [12] 曹聰 ,范廉明 .操作系統(tǒng)原理與分析 .科學(xué)出版社 [M].2020,09 [13] [美 ] David Chappell. 華中科技大學(xué)出版社 [M]. [14] 彭民德 .計(jì)算機(jī)操作系統(tǒng)網(wǎng)絡(luò)教學(xué)課件 [M].清華大學(xué)出版社 ,2020,09 [15] Lamport L: On Interprocess Communications: I. Basic Formalism. Distributed Computing, 1: 7785 (1986) [16] 戴樹貴 .利用 P, V操作實(shí)現(xiàn)進(jìn)程同步與互斥 [J]. 滁州師專學(xué)報(bào) , 浙江林學(xué)院天目學(xué)院本科生畢業(yè)設(shè)計(jì)(論文) 25 致謝 本次畢業(yè)設(shè)計(jì)以及論文是在汪杭軍老師的精心指導(dǎo)和大力支持下,順利完成的,汪老師認(rèn)真負(fù)責(zé)的工作態(tài)度,嚴(yán)謹(jǐn)?shù)闹螌W(xué)精神和大膽創(chuàng)新的進(jìn)去精神,對我產(chǎn)生了重要影響。 另外我還要感謝在大學(xué)期間所有傳授我知識的老師,是你們悉心指導(dǎo)使我有了良好的專業(yè)課知識,這也是論文得以完成的基礎(chǔ)。 外文翻譯: Electric circuit exchange work and vb transfer database The result of the connection setup with circuit switching is the reservation of bandwidth all the way from the sender to the receiver. All packets follow this path. Among other properties, having all packets follow the same path means that they cannot arrive out of order. With packet switching there is no path , so different packets can follow different paths, depending on work conditions at the time they are sent. They may arrive out of order. Packet switching is more fault tolerant than circuit switching. In fact, that is why it was invented. If a switch goes down, all of the circuits using it are terminated and no more traffic can be sent on any of them. With Packet switching, packets can be routed around dead switches. Setting up a path in advance also opens up the possibility of reserving bandwidth in advance. If bandwidth is reserved, then when a packet arrives, it can be sent out immediately over the reserved bandwidth. With packet switching, no bandwidth is reserved, so packets may have to wait their turn to be forwarded. Having bandwidth reserved in advance means that no congestion can occur when a packet shows up (unless more packets show up than expected).On the other hand, when an attempt is made to establish a circuit, the attempt can fail due to congestion. Thus, congestion can occur at different times with circuit switching(at setup time) and packet switching(when packets are sent). If a circuit has been reserved for a particular user and there is no traffic to send, the bandwidth of that circuit is wasted. It cannot be used for other traffic. Packet switching does not waste bandwidth and thus is more efficient form a systemwide perspective. Understanding this tradeoff is crucial for prehending the difference between circuit switching and packet switching. The tradeoff is between guaranteed service and wasting resources versus not guaranteeing service and not wasting resources. Packet switching uses storeandforward transmission. A packet is accumulated. in a router’s memory, then sent on to the next router. With circuit switching, the bits just flow through the wire continuously. The storeandforward technique adds delay. Another difference is that circuit switching is pletely transparent. The sender and receiver can use any bit rate, format, or framing method they want to. The carrier does not know or care. With packet switching, the carrier determines the basic parameters. A rough analogy is a road versus a railroad. In the former, the user determines the size, speed, and nature of the vehicle
點(diǎn)擊復(fù)制文檔內(nèi)容
醫(yī)療健康相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1