苏州科技大学操作系统复习题库1

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1ABCDB2ABCDD3ABCDC4ABCDA5AB.CD.B6CPUABCDA7ABC.DB8ABCDB9A.BC.D.B10.ABCDA11.ABCDB12A.BCDC13A.BC.DC14ABCDB15.ABCDA16.6A1B2C3D4C17.A.BCCPUDD18.A.B.C.DA19.ABC.DB20?(1)(2)(3)(4)(5)(6)(1)(3)(4)(6)21A.BC.D.B22A.CPUB.C.DC23.ABCPUCD.A24CPUCPUABCDACD25ABCDA26.A.B.C.DD27.A.B.C.DC28ABCDC29ABCDC30ABCDC31.ABC.DB32.AB.C.DC33A.BC.DC34ABCDD35.A.B.C.D.D36UNIXA.BC.D.A37A.MS-DOSB.Windows98C.UNIXD.WindowsNTD1()23CPU456789CPUI/O10111213141516171819IEEEPOSIX2021OSOSOS12123453?CPUIOCPUIOCPUIO44(1)(2)(3)(4)()1.A.BCDC2ABCDB3PVABCDA4ABCDB5ABCDB6PVS21A0B1C2D3B7ABCDDB8ABCDC9ABCDA10PVA1B0C1DC11VABCDB12ABC.DB13PVABCDD14ABCDD15ABCPCBPCBDD16ABCDC17AJCBBPCBCDCTDCHCTB18PVABCDA19ABCDB20ACPUBPCBDD21ACPUBCDA22ABC.DC23mutexmutex=0ABCDB24ABCDA25ABCDD2653A5B3C1D0B27CPUA.B.C.D.D28ABC.DA29ABCDB30ABC.DB31ABC.DD32ABCDCPUD33CPUCPUABCDD34ABCDC35ABCDA12345PCBPCB678PCB9PVPV101112m1(m1)13n(n2)42n1n111n21n11454015SPS016CPUCPU171819201??(1)(2)(3)(4)(5)2?(1)(2)(3)()(4)3cs4CPUNN010N10N5n(1)(2)mmn??(1)1101,(n1)(2)mmm1,1,0,,,(nm)1sfsesfose1intse=1;intsf=0;main(){cobeginget();compute();coend}get(){while(){p(se);v(sf);}}compute(){while(){p(sf);v(se);}}2PVSlS1S2S3S2S3S4b2b3b4S2S3S40intb2=0;intb3=0;intb4=0;main(){cobegins1();s2();s3();s4();coend}s1(){,v(b2);v(b3);}s2(){p(b2);,v(b4);}s3(){p(b3);,v(b4);}s4(){p(b4);p(b4);/*s2s3b4vp*/,}3PVbeginS,Sr:Semaphore;rc:integer;S:=1;Sr:=1;rc:=0;cobeginPROCESSReaderi(i=1,2...)beginP(Sr)rc:=rc+1;ifrc=1thenP(S);V(Sr);readfile;P(Sr);rc:=rc-1ifrc=0thenV(S);V(Sr);end;PROCESSWriterj(j=1,2...)beginP(S);Writefile;V(S)end;coend;end;1Sr(1)(2)351Srrc2ifrc=1thenPSPSPS3S55PS5PSrVS52VSr4.PVs1s2s10s20Pvints1=0;ints2=0;main(){cobegindriver();busman();coend}driver(){while(1){p(s1);v(s2);}}busman(){while(1){v(s1);p(s2);}}1AB.C.D.C2ABCD.B4ABCD.A5.ABC.DC6AB.C.DD7ABCDC8ABC.D.B9.A.BCDB10.34.A9B10C11D12B11A.BCDB12AB,CDB13A.B.C.DC14A.BC.DB15ABC.DC16ABC.DC17.A.BC.DB18.ABC.DD19.A.BC.DA20ABCDD21.ABC.DA22..ABC.DC23.A4.5B10.5C4.75D10.25D24A.BCD.B25.A.BC.DB26.ABCDB27APBvCDC28ABCDD2942A1B5C2.5D8B303JlJ2J3T1T2T3T1T2T3A.T1T2T3B(T1T2+T3)/3C.(3T12T2+T3)/3D(T12T2+3T3)/3C3180011000A.2B.1C.3D.0.5C323A.J1,J2,J3B.J1,J3,J2C.J2,J3,J1D.J3,J2,J1B33A.B.C.D.B353J1J2J3l23A.J1,J2,J3B.J1,J3,J2C.J2,J1,J3D.J2,J3,J136A.B.C.D.A37A.B.C.D.D38A.B.C.D.B39ABC.DB40CPUABC.DC1234567891011I/OCPU1214321314SJF1516171812(1)?(2)?(3)?(1)()()()(2)(3)1.CPU1102243330()(1)(2)??(3)??(1)101010101.021417164.032313113.712.32.924()1234T=(2.02.83.13.3)/42.8W=(12.86.211)4=5.251432T=(2.0+1.8+2.4+3.6)/4=2.45W=(164.83.6)/4=3.853()1324T=(2.02.31.62.O)/4=1.975W=(14.6165)/4=6.65410P1P2P3874P1P2P3422P310P14P22P34P344P1P2455PV?Pvintfull=0;intempty=n;intmutex=1;main(){cobeginproducer();consumer();coend}producer(){while(){p(mutex);p(empty);v(full);v(mutex);}}consumer(){while(){p(full);p(mutex);v(mutex);v(empty);}}VVPP(fullnempty0mutex1)P(mutex)(mutex0)p(empty)p(full)p(mutex)6(1)?(2)P2Request2(1222)?(1){P0P3P4P1P2}(2)P2Request2(1222)Request2(1222)Need2(2,3,5,6)Request2(1222)Available(1,6,2,2)Available(0400)P21ABCDD2A.B.C.CPUD.A3A.B.C.D.B4ABCDB53()1234125123456A7B8C9D10D640KA100KB190KC330KD410KC7ABCDA8ABCDA9ABCDA10AB.CD.A11A.B.C.D.C12ABCDD13248A224B216C28D232B14ABCDB15ABCDA16ABCDD17FIFOABCDD18ABCDB19ABCD.A20BeladyABCDA21(2154)A120K2B480K154C30K154D2480KB224K0A8192B4096C2048D1024A23A.B.C.D.B24ABCDB25A.B.C.D.C26A.B.C.D.D27ABCDA28ABCDD29j+ABC.DB30SLA.jSLBj+SC.j+SkS+LDB311A.B.C.D.B32A.B.C.D.C33ABCDC34AB.C.D.B35ABCDB36ABCDB37ABCDC38AB.C.DB39ABCDD40A.B.C.D.A41A.B.C.D.A42A.B.C.D.A1234567891011121314151617181920212223242526(FIF0)271?2(1)(2)(3)(4)34CPUCPU1CPU(2)5(1)(2)(3)6m()p,n(1)?(2)?(1)m(2)p7(1)(2)8??()nm(nm)n()143214354321534()(1)(OPT)(2)(FIFO)(1)()3746(2)394102712342156212374(FIFO)(LRU)?()(FIFO)10123456(LRU)8345631152281208844610232143226016703001001FIFO2LRU1FIFO50125/10=50%2LRU620136/10=60%43232152453252FIFOLRU3(1)FIFO9(2)LRU75(1)0210500[O430][0430]210430640(2)1235020[110][110]2350+10=2360(3)210090[2500](4)31350590[3,400][3,400]13504001750(5)4193895[4l12](6)5[532]1.A.BCSPOOLingDACD2.ABCROMDA3.A.CPUI/OB.C.CPUD.I/OA4.CPUABCDC5.A.B.C.D.A6.A.B.C.D.D7.I/OCPUA.BC.DMADC8.ABC.DB9.AJCBBDCTCCOCTDCHCTA10.A.BC.DSpoolA11.ABCDA12.AI/OBC.I/ODSpoolingI/OC13.ASpoolingBC.DA14.SpoolingA.BC.DB15.SpoolingAB.C.D.A16.A.BC.SpoolingDA17.I/O.ABC.DB18.A.BC.DC19.A.BCDD20.A.B.C.D.C21.I/OA.B.I/OC.I/OI/OD.I/OA22.ABC.DA23.A.I/OBC.I/ODC24.SPOOLingA.B.C.D.D1??I/O,1CPUI/O2CPUCPUCPU9.6kbsCPU9.6kHz100usCPU8CPU1/83CPUI/O2SpoolingSpooling3?I/O123120444048012763401213292=87623120=36014020444048012762024436766864292240442012476804248872412021002337620513219611903982941840?(1)1001596133(2)10070058.3310069257.71.A.B.C.D.B2.A.B.C.D.D3.A.B.C.D.D4.A.B.C.D.B5.A.B.C.D.C6.A.B.C.D.A7.A.B.C.D.B8.A.B.C.D.B9.A.B.C.D.A10.A.B.C.D.A11.A.B.C.D.A12.A.B.C.D.A13.A.B.C.D.A14.A.B.C.D.HashB15.A.B.C.D.HashA16.A.B.C.D.D17.A.B.C.D.D18.A.B.C.D.E.F.G..H.L.J.ADFGH19.A.B.C.D.D20.A.B.C.D.D21.A.B.C.D.B22.A.B.C.D.A23.A.B.C.D.B24.A.B.C.D.C25.A.B.C.D.A26.A.B.C.D.B27.A.B.C.D.A28.A.B.C.D.D29.A.B.C.D.C30.A.B.C.D.C31.,A.B.C.D.A32.A.B.C.D.C33.A.B.C.D.A34.A.B.C.D.D35.A.B.C.D.B36.A.B.C.ABD.C37.A.B

1 / 48
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功