版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、Operating SystemsReviewQuestionsWhat are two functions of an OS?What “l(fā)ayer is above the OS?What “l(fā)ayer is below the OS?Manages all system resourcesCPUMemoryI/OFilesObjectives: Security EfficiencyConvenienceQuestionsWhat causes OS to change?What is multi-programming?What is time-sharing?Or, why aren
2、t we still running MS-DOS?What is a process? What is a thread?What is address space?What is a file?ReviewWhat is (average) waiting time? Explain how SJF,FCFS,RR etc. worksTrue or False:FCFS is optimal in terms of avg waiting timeMost processes are CPU boundThe shorter the time quantum, the better6P1
3、20P232P3P4P5405660FCFSP14P212P3P4P5244060SJFP1P24P3P4P5P1812162024P2P328P4P1P2P43236404448P1P452P15660RRResponse timeEstimate by time from job submission to time to first CPU dispatchAssume all jobs submitted at same time, in order givenTurnaround timeTime interval from submission of a process until
4、 completion of the processAssume all jobs submitted at same time7Response Time CalculationsJobFCFSSJFRRP10400P220124P33248P4402412P556016Average29.61688Turnaround Time CalculationsJobFCFSSJFRRP1206060P2322444P3401232P4564056P560420Average41.62842.4ReviewWhat is a “race condition?What are 3 propertie
5、s necessary for a correct “critical region solution?mutual exclusion, progress, bounded waitingWhat is Petersons Solution?Why is semaphore better than Petersons solution and TSL?ReviewWhat is deadlock?What is the four conditions for deadlock to happen?Review of Bankers AlgorithmAllocationMaxAvailabl
6、eA B CA B CA B CP00 1 07 5 33 3 2P12 0 03 2 2P23 0 29 0 2P32 1 12 2 2P40 0 24 3 3P = P0, P1, , P4; R=A(10), B(5), C(7)Snapshot at time T0:Can request for (1,0,2) by P1 be granted?Can request for (3,3,0) by P4 be granted? Can request for (0,2,0) by P0 be granted?ReviewWhat is the Memory Management Un
7、it?How does it work during a virtualphysical address translation?Translate virtual address to physical address2041008300Review A paging scheme uses a Translation Loo-aside Buffer (TLB) A TLB access takes 10 ns and a main memory access takes 50 ns. What is the effective access time (in ns) if the TLB
8、 hit ratio is 90% and there is no fault?Tanenbaum, Modern Operating Systems 3 e, (c) 2021 Prentice-Hall, Inc. All rights reserved. 0-13-6006639Multilevel Page TablesFigure 3-13. (a) A 32-bit address with two page table fields. (b) Two-level page tables.What is the PT1 and PT2 value for a virtual add
9、ress 0 x00403004?A computer has 32-bit virtual addresses and 4-KB pages. The program and data together fit in the lowest page (0-4095) the stack fits in the highest page. How many entries are needed in the page table if traditional paging is used? How many page table entries are needed for 2-level p
10、aging, with 10 bits in each part?ReviewWhat is internal fragmentation?What is external fragmentation?What is compaction?True or FalseWith paging, a process logical address spaces is contiguousWith paging, a process physical address spaces is contiguousPaging reduces the size of the possible address
11、space used by a processReviewDoes paging have fragmentation?No? Then why not?Yes? Then what kind?What are the overheads associated with paging?ReviewTrue or False: The logical address space cannot be bigger than the physical address spaceProcesses have big address spaces because they always need the
12、mDemand paging:Is unrelated to prepagingBrings logical pages into physical memory when requested by a processIncreases memory requirements for a systemReviewPage faultsWhat is a page fault?What does an OS do during a page fault?What is a Page Replacement Algorithm?What is “Beladys Anomaly?How does t
13、he Optimal algorithm work?How does Enhanced Second Chance work?What is thrashing?How do we fix it?A computer has four page frames. The time of loading, time of last access, and the R and M bits for each page are as shown below (the times are in clock ticks): Page Loaded Last Ref. R M 0 126 285 1 0 1
14、 120 2650 0 2 140 270 0 1 3 110 280 1 1 (a) Which page will NRU replace? (b) Which page will FIFO replace? (c) Which page will LRU replace? (d) Which page will second chance replace? Cause of thrashingDegree of multiprogrammingCPU utilizationthrashing increases? Array A1024, 1024 of integer, each ro
15、w is stored in one pageProgram 1for j := 1 to 1024 dofor i := 1 to 1024 doAi,j := 0;1024 1024 page faults Program 2for i := 1 to 1024 dofor j := 1 to 1024 doAi,j := 0;1024 page faultsFirst-In-First-Out (FIFO)1233 Frames / Process1,2,3,4,1,2,5,1,2,3,4,54125349 Page FaultsHow man page faults would we
16、have if we had4 Frames/Process?How long does it take to load a 64KB program from a disk whose average seek time and rotation time are 10 msec, and whose tracks hold 32KB.For 2KB page size?For 4KB page size? Figure 4-34. A UNIX i-node.The UNIX V7 File System (2)Tanenbaum, Modern Operating Systems 3 e
17、, (c) 2021 Prentice-Hall, Inc. All rights reserved. 0-13-6006639I-NodeHow many data blocks are there?If you added 3 more data blocks to the file, what would happen?Disk blocksi-nodenullnullnullnullnull6277ReviewDirectories:In what way is a directory different than a file?In what way is a directory similar to a file?Aliases:Describe a hard-linkDescribe a soft-linkFree space manag
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 播音主持人雇傭協(xié)議
- 銷售提成獎(jiǎng)金合同
- 培訓(xùn)學(xué)校專業(yè)職業(yè)指導(dǎo)培訓(xùn)服務(wù)合同
- 終止水泥購(gòu)銷合同協(xié)議
- 安全協(xié)議與合同
- 招標(biāo)投標(biāo)表格部分的內(nèi)容解讀與分析
- 網(wǎng)絡(luò)營(yíng)銷合同范本版合同協(xié)議解讀
- 數(shù)字風(fēng)向計(jì)儀表采購(gòu)合同
- 公司總公司與分公司合作合同
- 房屋購(gòu)買委托協(xié)議范本
- 大學(xué)英語(yǔ)-高職版(湖南環(huán)境生物職業(yè)技術(shù)學(xué)院)知到智慧樹(shù)答案
- 2025北京語(yǔ)言大學(xué)新編長(zhǎng)聘人員招聘21人筆試模擬試題及答案解析
- 中國(guó)航空協(xié)會(huì):2024低空經(jīng)濟(jì)場(chǎng)景白皮書
- 大學(xué)美育學(xué)習(xí)通超星期末考試答案章節(jié)答案2024年
- DL∕T 5210.2-2018 電力建設(shè)施工質(zhì)量驗(yàn)收規(guī)程 第2部分:鍋爐機(jī)組
- 唐宋文學(xué)與中學(xué)語(yǔ)文智慧樹(shù)知到期末考試答案章節(jié)答案2024年紹興文理學(xué)院
- 大學(xué)英語(yǔ)議論文寫作模板
- 安川機(jī)器人遠(yuǎn)程控制總結(jié) 機(jī)器人端
- 良性陣發(fā)性位置性眩暈診療和治療
- Aspen換熱器詳細(xì)核算
- 貸前調(diào)查前準(zhǔn)備工作
評(píng)論
0/150
提交評(píng)論