FinalFall01.pdf

‫ﺑﻨﺎم ﺧﺪا‬
‫ﺗﺎرﻳﺦ‪١٣٨٠/١١/٧ :‬‬
‫اﻣﺘﺤﺎن ﭘﺎﻳﺎن ﺗﺮم ﻣﻌﻤﺎری ﮐﺎﻣﭙﻴﻮﺗﺮ ‪۴٠-٣٢٣‬‬
‫ﻣﺪت ﺁزﻣﻮن‪ ٢ :‬ﺳﺎﻋﺖ و ‪ ١۵‬دﻗﻴﻘﻪ‬
‫‪ ۱) -۱‬ﻧﻤﺮﻩ( ﻗﺎﻧﻮﻥ ﺍﹶﻣ ُﺪﻝ )‪ (Amdahl‬ﺭﺍ ﺑﻴﺎﻥ ﮐﻨﻴﺪ ﻭ ﺩﺭﺑﺎﺭﻩ ﺁﻥ ﺑﻄﻮﺭ ﻣﺨﺘﺼﺮ ﺗﻮﺿﻴﺢ ﺩﻫﻴﺪ‪.‬‬
‫‪ ۱) -۲‬ﻧﻤﺮﻩ( ﺧﺼﻮﺻﻴﺎﺕ ‪ Synthetic Benchmark‬ﻫﺎ ﭼﻴﺴﺖ؟ ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ﺁﻧﻬﺎ ﭼﻪ ﻣﻌﺎﻳﺐ ﻭ ﻣﺰﺍﻳﺎﻳﯽ‬
‫ﺩﺍﺭﺩ؟ )ﺑﻄﻮﺭ ﻣﺨﺘﺼﺮ ﺗﻮﺿﻴﺢ ﺩﻫﻴﺪ‪(.‬‬
‫‪ ۲) -۳‬ﻧﻤﺮﻩ( ﺍﻧﻮﺍﻉ ﻣﺨﺎﻃﺮﺍﺕ )‪ (Hazard‬ﺭﺍ ﺩﺭ ‪ Pipeline‬ﺑﻴﺎﻥ ﮐﺮﺩﻩ ﻭ ﺩﺭﺑﺎﺭﻩ ﻣﻨﺸﺎ ﻫﺮﮐﺪﺍﻡ ﺑﻄﻮﺭ ﻣﺨﺘﺼﺮ‬
‫ﺗﻮﺿﻴﺢ ﺩﻫﻴﺪ‪.‬‬
‫‪ ۱) -۴‬ﻧﻤﺮﻩ( ﺩﺭﺑﺎﺭﻩ ﭼﮕﻮﻧﮕﯽ ﺗﺮﺟﻤﻪ ﺁﺩﺭﺱ ﻣﺠﺎﺯﯼ ﺑﻪ ﺁﺩﺭﺱ ﻓﻴﺰﻳﮑﯽ ﺑﺎ ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ‪Inverted Page‬‬
‫‪ Table‬ﺗﻮﺿﻴﺢ ﺩﻫﻴﺪ‪.‬‬
‫‪ ۱ ) -۵‬ﻧﻤﺮﻩ( ﻣﺰﺍﻳﺎ ﻭ ﻣﻌﺎﻳﺐ ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ‪ BUS‬ﺭﺍ ﺑﻴﺎﻥ ﮐﻨﻴﺪ‪.‬‬
‫‪ ۲) -۶‬ﻧﻤﺮﻩ( ﺭﻭﺷﻬﺎﯼ ﻣﺨﺘﻠﻒ ﺩﺍﻭﺭﯼ )‪ (Arbitration‬ﺩﺭ ‪ BUS‬ﺭﺍ ﻧﺎﻡ ﺑﺒﺮﻳﺪ ﻭ ﺩﺭﺑﺎﺭﻩ ﻫﺮﻳﮏ ﺑﻄﻮﺭ‬
‫ﻣﺨﺘﺼﺮ ﺗﻮﺿﻴﺢ ﺩﻫﻴﺪ‪.‬‬
‫‪ ۳) -۷‬ﻧﻤﺮﻩ( ﭘﺮﺩﺍﺯﻧﺪﻩ‪ ۱‬ﮐﻪ ﺑﺎ ﻓﺮﮐﺎﻧﺲ ﺳﺎﻋﺖ ‪ 800 MHz‬ﮐﺎﺭ ﻣﯽ ﮐﻨﺪ ﺩﺍﺭﺍﯼ ‪ ۴‬ﻧﻮﻉ ﺩﺳﺘﻮﺭﺍﻟﻌﻤﻞ ﻣﯽ ﺑﺎﺷﺪ‬
‫ﮐﻪ ﻓﺮﮐﺎﻧﺲ ﺗﮑﺮﺍﺭ ﺁﻧﻬﺎ ﺩﺭ ﺟﺪﻭﻝ ﺯﻳﺮ ﺁﻣﺪﻩ ﺍﺳﺖ‪ .‬ﺩﻭ ﺗﻴﻢ ﻣﺴﺘﻘﻞ ﻧﺮﻡ ﺍﻓﺰﺍﺭﯼ ﻭ ﺳﺨﺖ ﺍﻓﺰﺍﺭﯼ ﺑﺮﺭﻭﯼ‬
‫ﺑﻬﺒﻮﺩ ﮐﺎﺭﺍﻳﯽ ﺳﻴﺴﺘﻢ ﺍﺯ ﻃﺮﻳﻖ ﺗﻮﻟﻴﺪ ﮐﺪﻫﺎﯼ ﺑﻬﻴﻨﻪ ﺗﺮ ﻭ ﺍﻓﺰﺍﻳﺶ ﻓﺮﮐﺎﻧﺲ ﺳﺎﻋﺖ ﭘﺮﺩﺍﺯﻧﺪﻩ ﮐﺎﺭ‬
‫ﻣﻲ ﻧﻤﺎﻳﻨﺪ‪ .‬ﮔﺮﻭﻩ ﻧﺮﻡ ﺍﻓﺰﺍﺭﯼ ﮐﺎﻣﭙﺎﻳﻠﺮ ﺟﺪﻳﺪﯼ ﺗﻮﻟﻴﺪ ﮐﺮﺩﻩ ﺍﺳﺖ ﮐﻪ ﺩﺭ ﻣﺠﻤﻮﻉ ﺩﺳﺘﻮﺭﺍﺕ ﮐﻤﺘﺮﯼ ﺭﺍ‬
‫ﻧﺴﺒﺖ ﺑﻪ ﻧﺴﺨﻪ ﻗﺒﻠﯽ ﺧﻮﺩ ﺗﻮﻟﻴﺪ ﻣﯽ ﮐﻨﺪ‪ .‬ﻧﺴﺒﺖ ﺗﻌﺪﺍﺩ ﺩﺳﺘﻮﺭﺍﺕ ﺗﻮﻟﻴﺪ ﺷﺪﻩ ﺗﻮﺳﻂ ﻧﺴﺨﻪ ﺟﺪﻳﺪ ﺑﻪ‬
‫ﺗﻌﺪﺍﺩ ﺩﺳﺘﻮﺭﺍﺕ ﺗﻮﻟﻴﺪ ﺷﺪﻩ ﺩﺭ ﻧﺴﺨﻪ ﻗﺒﻠﯽ ﺁﻥ ﺩﺭ ﺟﺪﻭﻝ ﺍﺩﺍﻣﻪ ﺁﻣﺪﻩ ﺍﺳﺖ‪ .‬ﮔﺮﻭﻩ ﺳﺨﺖ ﺍﻓﺰﺍﺭﯼ ﻧﻴﺰ‬
‫ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ ۲‬ﺭﺍ ﺑﺎ ﻓﺮﮐﺎﻧﺲ ﺳﺎﻋﺖ ‪ 1200 MHz‬ﻭ ﻫﻤﺎﻥ ﺩﺳﺘﻮﺭﺍﻟﻌﻤﻠﻬﺎﯼ ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ ۱‬ﺳﺎﺧﺘﻪ ﺍﺳﺖ‪.‬‬
‫ﻓﺮﮐﺎﻧﺲ ﺗﮑﺮﺍﺭ ﺩﺳﺘﻮﺭﺍﺕ ﺑﺮﺍﯼ ﺍﻳﻦ ﭘﺮﺩﺍﺯﻧﺪﻩ ﺩﺭ ﺟﺪﻭﻝ ﺯﻳﺮ ﺁﻣﺪﻩ ﺍﺳﺖ‪:‬‬
‫ﺩﺭﺻﺪ‬
‫ﻧﻮﻉ ﺩﺳﺘﻮﺭ‬
‫ﺩﺭﺻﺪ‬
‫‪ CPI‬ﻧﻮﻉ ﺩﺳﺘﻮﺭ‬
‫ﺩﺭﺻﺪ‬
‫‪CPI‬‬
‫ﻧﻮﻉ ﺩﺳﺘﻮﺭ‬
‫‪110‬‬
‫‪Integer‬‬
‫‪40‬‬
‫‪1‬‬
‫‪Integer‬‬
‫‪40‬‬
‫‪2‬‬
‫‪Integer‬‬
‫‪75‬‬
‫‪Branch‬‬
‫‪30‬‬
‫‪2‬‬
‫‪Branch‬‬
‫‪30‬‬
‫‪2‬‬
‫‪Branch‬‬
‫‪80‬‬
‫‪Memory‬‬
‫‪10‬‬
‫‪5‬‬
‫‪Memory‬‬
‫‪10‬‬
‫‪3‬‬
‫‪Memory‬‬
‫‪90‬‬
‫‪Floating‬‬
‫‪Point‬‬
‫‪20‬‬
‫‪5‬‬
‫‪Floating‬‬
‫‪Point‬‬
‫‪20‬‬
‫‪5‬‬
‫‪Floating‬‬
‫‪Point‬‬
‫ﮐﺎﻣﭙﺎﻳﻠﺮ ﺑﻬﻴﻨﻪ ﺳﺎﺯ‬
‫ﺻﻔﺤﻪ ‪١‬‬
‫ﭘﺮﺩﺍﺯﻧﺪﻩ ‪۲‬‬
‫ﭘﺮﺩﺍﺭﻧﺪﻩ ‪۱‬‬
‫ﺍﻟﻒ‪ CPI -‬ﻣﻴﺎﻧﮕﻴﻦ ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ ۱‬ﻭ ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ ۲‬ﺭﺍ ﻣﺤﺎﺳﺒﻪ ﮐﻨﻴﺪ‪.‬‬
‫ﺏ‪ -‬ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ ۲‬ﭼﻘﺪﺭ ﺳﺮﻳﻌﺘﺮ ﺍﺯ ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ ۱‬ﺍﺳﺖ؟‬
‫ﺝ‪ -‬ﺑﺮﻧﺎﻣﻪ ﻫﺎﯼ ﺑﻬﻴﻨﻪ ﺷﺪﻩ ﺗﻮﺳﻂ ﮐﺎﻣﭙﺎﻳﻠﺮ ﺑﻬﻴﻨﻪ ﺳﺎﺯ ﭼﻨﺪ ﺑﺮﺍﺑﺮ ﺳﺮﻳﻌﺘﺮ ﺍﺯ ﺑﺮﻧﺎﻣﻪ ﻫﺎﯼ ﺑﻬﻴﻨﻪ ﻧﺸﺪﻩ ﺑﺮﺭﻭﯼ‬
‫ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ ۱‬ﺍﺟﺮﺍ ﻣﯽ ﺷﻮﻧﺪ؟‬
‫ﺩ‪ -‬ﺑﺮﻧﺎﻣﻪ ﻫﺎﯼ ﺑﻬﻴﻨﻪ ﺷﺪﻩ ﺗﻮﺳﻂ ﮐﺎﻣﭙﺎﻳﻠﺮ ﺑﻬﻴﻨﻪ ﺳﺎﺯ‪ ,‬ﺑﺮﺭﻭﯼ ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ ۲‬ﭼﻨﺪ ﺑﺮﺍﺑﺮ ﺳﺮﻳﻌﺘﺮ ﺍﺯ ﭘﺮﺩﺍﺯﻧﺪﻩ ‪۱‬‬
‫ﺍﺟﺮﺍ ﻣﯽ ﺷﻮﻧﺪ؟‬
‫‪ ۳) -۸‬ﻧﻤﺮﻩ( ﺳﺎﺧﺘﺎﺭ ﺣﺎﻓﻈﻪ ﺳﻴﺴﺘﻤﯽ ﮐﻪ ﺑﺎ ﻓﺮﮐﺎﻧﺲ ﺳﺎﻋﺖ ‪ 500 MHz‬ﮐﺎﺭ ﻣﯽ ﮐﻨﺪ ﺑﺼﻮﺭﺕ ﺯﻳﺮ ﺍﺳﺖ‪:‬‬
‫ﻳﮏ ‪ cache‬ﺩﺳﺘﻮﺭﺍﻟﻌﻤﻞ ﺑﺎ ‪ Hit Rate = 95%‬ﻭ ﻳﮏ ‪ cache‬ﺩﺍﺩﻩ ﺑﺎ ‪Hit Time .Hit Rate= 90%‬‬
‫ﺑﺮﺍﯼ ﻫﺮ ﺩﻭ ‪ cache‬ﻫﺎﯼ ﺳﻄﺢ ‪ ۱‬ﺑﺮﺍﺑﺮ ‪ 1 cycle‬ﻣﯽ ﺑﺎﺷﺪ‪ .‬ﺣﺎﻓﻈﻪ ﺳﻴﺴﺘﻢ ﻳﮏ ‪ DRAM‬ﺑﺎ ﺯﻣﺎﻥ‬
‫ﺩﺳﺘﻴﺎﺑﯽ ‪ 10 ns‬ﻣﯽ ﺑﺎﺷﺪ‪.‬‬
‫ﺑﻪ ﺳﺎﺧﺘﺎﺭ ﺍﻳﻦ ﺳﻴﺴﺘﻢ ﻳﮏ ﺳﻄﺢ ﺩﻳﮕﺮ ‪ cache‬ﺑﻴﻦ ‪ cache‬ﻫﺎﯼ ﺳﻄﺢ ‪ ۱‬ﻭ ﺣﺎﻓﻈﻪ ﺍﺻﻠﯽ ﺍﺿﺎﻓﻪ ﻣﯽ ﮐﻨﻴﻢ‬
‫ﮐﻪ ﺑﻄﻮﺭ ﻣﺸﺘﺮﮎ ﺑﺮﺍﯼ ﺩﺳﺘﻮﺭ ﺍﻟﻌﻤﻞ ﻭ ﺩﺍﺩﻩ ﺍﺳﺘﻔﺎﺩﻩ ﻣﯽ ﺷﻮﺩ‪ .‬ﺑﺮﺍﯼ ﺍﻳﻦ ‪ ,cache‬ﮐﻪ ﺩﺭ ﺳﻄﺢ ﺩﻭﻡ ﻗﺮﺍﺭ‬
‫ﺩﺍﺭﺩ‪ Hit Rate = 90% ,‬ﻭ ‪ Hit Time‬ﺑﺮﺍﺑﺮ ‪ 2 cycles‬ﻣﯽ ﺑﺎﺷﺪ‪.‬‬
‫ﺍﻟﻒ‪ -‬ﺑﺎ ﻓﺮﺽ ‪ CPI‬ﭘﺎﻳﻪ ﺑﺮﺍﺑﺮ ‪ 1.5‬ﻭ ﻳﮏ ﺩﺳﺘﻴﺎﺑﯽ ﺑﻪ ﺣﺎﻓﻈﻪ ﺩﺳﺘﻮﺭﺍﻟﻌﻤﻞ ﺑﺮﺍﯼ ﻫﺮ ﺩﺳﺘﻮﺭ ﻭ ﺩﺳﺘﻴﺎﺑﯽ ﻧﻴﻤﯽ‬
‫ﺍﺯ ﺩﺳﺘﻮﺭﺍﺕ )ﺑﻄﻮﺭ ﻣﺘﻮﺳﻂ( ﺑﻪ ﺣﺎﻓﻈﻪ ﺩﺍﺩﻩ‪ CPI ,‬ﺳﻴﺴﺘﻢ ﺭﺍ ﺑﺮﺍﯼ ﺩﻭ ﺣﺎﻟﺖ ﺑﺪﻭﻥ‪ /‬ﺑﺎ ‪ cache‬ﺳﻄﺢ ‪۲‬‬
‫ﻣﺤﺎﺳﺒﻪ ﻧﻤﺎﻳﻴﺪ‪.‬‬
‫ﺏ‪ -‬ﺳﻴﺴﺘﻢ ﺍﻭﻟﻴﻪ ﺭﺍ ﺑﺪﻳﻦ ﺻﻮﺭﺕ ﺗﻐﻴﻴﺮ ﻣﯽ ﺩﻫﻴﻢ ﮐﻪ ﭘﺮﺩﺍﺯﻧﺪﺓ ﺁﻧﺮﺍ ﺑﺎ ﭘﺮﺩﺍﺯﻧﺪﻩ ﺟﺪﻳﺪﯼ ﺑﺎ ﺳﺮﻋﺖ ‪1 GHz‬‬
‫ﺗﻌﻮﻳﺾ ﻣﯽ ﮐﻨﻴﻢ‪ ,‬ﺍﻣﺎ ﺍﺯ ﻫﻤﺎﻥ ‪ cache‬ﻫﺎ ﻭ ‪ DRAM‬ﺑﺮﺍﯼ ﺳﻴﺴﺘﻢ ﺟﺪﻳﺪ ﺍﺳﺘﻔﺎﺩﻩ ﻣﯽ ﮐﻨﻴﻢ‪ .‬ﺩﺭ ﺍﻳﻦ ﺣﺎﻟﺖ‬
‫ﺑﺮﻧﺎﻣﻪ ﻫﺎﯼ ﻗﺒﻠﯽ ﭼﻨﺪ ﺑﺮﺍﺑﺮ ﺳﺮﻳﻌﺘﺮ ﻧﺴﺒﺖ ﺑﻪ ﺳﻴﺴﺘﻢ ﺍﻭﻟﻴﻪ ﺑﺮﺭﻭﯼ ﺳﻴﺴﺘﻢ ﺟﺪﻳﺪ ﺍﺟﺮﺍ ﻣﯽ ﺷﻮﻧﺪ؟‬
‫ﺻﻔﺤﻪ ‪٢‬‬
‫‪ ۶) -۹‬ﻧﻤﺮﻩ( ﺗﮑﻪ ﮐﺪ ﺯﻳﺮ ﺭﺍ ﻣﯽ ﺧﻮﺍﻫﻴﻢ ﺑﺮﺭﻭﯼ ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ Pipeline‬ﻧﺸﺎﻥ ﺩﺍﺩﻩ ﺷﺪﻩ ﺩﺭ ﺍﺩﺍﻣﻪ ﺍﺟﺮﺍ ﮐﻨﻴﻢ‬
‫)ﻫﻤﺎﻥ ﭘﺮﺩﺍﺯﻧﺪﻩ ‪ pipeline‬ﮐﺘﺎﺏ ﺍﺳﺖ ﮐﻪ ﺩﺭ ﮐﻼﺱ ﺍﺳﺘﻔﺎﺩﻩ ﮐﺮﺩﻩ ﺍﻳﻢ‪(.‬‬
‫‪$2, $2, $3‬‬
‫‪add‬‬
‫)‪$1, 100($5‬‬
‫‪lw‬‬
‫‪$1, $2, TARGET‬‬
‫‪beq‬‬
‫‪$1, $2, $3‬‬
‫‪add‬‬
‫)‪$1, 80($5‬‬
‫‪sw‬‬
‫‪$5, $5, 4‬‬
‫‪addi‬‬
‫‪$5, $6, LOOP‬‬
‫‪bneq‬‬
‫‪LOOP:‬‬
‫‪TARGET:‬‬
‫‪IF.Flush‬‬
‫‪Hazard‬‬
‫‪detection‬‬
‫‪unit‬‬
‫‪ID/EX‬‬
‫‪WB‬‬
‫‪EX/MEM‬‬
‫‪MEM/WB‬‬
‫‪WB‬‬
‫‪M‬‬
‫‪u‬‬
‫‪x‬‬
‫‪WB‬‬
‫‪M‬‬
‫‪M‬‬
‫‪EX‬‬
‫‪M‬‬
‫‪u‬‬
‫‪x‬‬
‫‪Control‬‬
‫‪0‬‬
‫‪IF/ID‬‬
‫‪4‬‬
‫‪Shift‬‬
‫‪left 2‬‬
‫‪M‬‬
‫‪u‬‬
‫‪x‬‬
‫‪M‬‬
‫‪u‬‬
‫‪x‬‬
‫‪Data‬‬
‫‪memory‬‬
‫=‬
‫‪Registers‬‬
‫‪Instruction‬‬
‫‪memory‬‬
‫‪ALU‬‬
‫‪PC‬‬
‫‪M‬‬
‫‪u‬‬
‫‪x‬‬
‫‪Sign‬‬
‫‪extend‬‬
‫‪M‬‬
‫‪u‬‬
‫‪x‬‬
‫‪Forwarding‬‬
‫‪unit‬‬
‫ﺍﻟﻒ‪ -‬ﮐﺪ ﺭﺍ ﺑﻪ ﮔﻮﻧﻪ ﺍﯼ ﺗﻐﻴﻴﺮ ﺩﻫﻴﺪ ﮐﻪ ﺑﺮﺭﻭﯼ ﭘﺮﺩﺍﺯﻧﺪﻩ ﻧﺸﺎﻥ ﺩﺍﺩﻩ ﺷﺪﻩ ﺩﺭ ﮐﻤﺘﺮﻳﻦ ﺯﻣﺎﻥ ﻣﻤﮑﻦ ﺑﻪ ﺩﺭﺳﺘﯽ‬
‫ﺍﺟﺮﺍ ﺷﻮﺩ‪) .‬ﻓﺮﺽ ﮐﻨﻴﺪ ﺩﺳﺘﻮﺭ ‪ nop‬ﻧﻴﺰ ﺩﺭ ﭘﺮﺩﺍﺯﻧﺪﻩ ﺗﻌﺮﻳﻒ ﺷﺪﻩ ﺍﺳﺖ‪(.‬‬
‫ﺏ‪ -‬ﺑﺮﺍﯼ ﮐﺪ ﺗﻮﻟﻴﺪ ﺷﺪﻩ ﺩﺭ ﻗﺴﻤﺖ ﺍﻟﻒ ﺩﺭ ﺟﺪﻭﻟﯽ ﻣﺸﺎﺑﻪ ﺟﺪﻭﻝ ﺯﻳﺮ ﻧﺸﺎﻥ ﺩﻫﻴﺪ ﮐﻪ ﺩﺭ ﻫﺮ ﺳﻴﮑﻞ ﺩﺭ ﻫﺮ‬
‫ﻣﺮﺣﻠﻪ ‪ pipeline‬ﭼﻪ ﺩﺳﺘﻮﺭﯼ ﺍﺟﺮﺍ ﻣﯽ ﺷﻮﺩ‪ stall) .‬ﺭﺍ ﺑﺎ – ﻧﺸﺎﻥ ﺩﻫﻴﺪ‪ (.‬ﻓﺮﺽ ﮐﻨﻴﺪ ﺣﻠﻘﻪ ﺩﻭ ﺑﺎﺭ ﺍﺟﺮﺍ‬
‫ﻣﯽ ﺷﻮﺩ ﻭ ﺑﺎﺭ ﺍﻭﻝ ﭘﺮﺵ ﺑﻪ ‪ TARGET‬ﺍﻧﺠﺎﻡ ﺷﺪﻩ ﻭ ﺑﺎﺭ ﺩﻭﻡ ﭘﺮﺵ ﺍﻧﺠﺎﻡ ﻧﻤﯽ ﺷﻮﺩ‪.‬‬
‫ﺻﻔﺤﻪ ‪٣‬‬
‫‪Write Back‬‬
‫‪Memory‬‬
‫‪Execute‬‬
‫‪Decode‬‬
‫‪I1‬‬
‫‪Fetch‬‬
‫‪I1‬‬
‫‪1‬‬
‫‪I2‬‬
‫‪2‬‬
‫‪...‬‬
‫ﺝ‪ -‬ﻣﯽ ﺧﻮﺍﻫﻴﻢ ﭘﺮﺩﺍﺯﻧﺪﻩ ﺭﺍ ﺑﻪ ﮔﻮﻧﻪ ﺍﯼ ﺗﻐﻴﻴﺮ ﺩﻫﻴﻢ ﮐﻪ ﺩﺭ ﻣﻮﺍﺭﺩﯼ ﻣﺎﻧﻨﺪ ﮐﺪ ﺑﺎﻻ‪ ,‬ﻧﻴﺎﺯﯼ ﺑﻪ ﺍﺿﺎﻓﻪ ﮐﺮﺩﻥ ‪ nop‬ﺑﻪ‬
‫ﺩﺳﺘﻮﺭﺍﺕ ﻧﺒﺎﺷﺪ‪ .‬ﺑﻠﮑﻪ ﭘﺮﺩﺍﺯﻧﺪﻩ ﺷﺮﻃﻬﺎ ﺭﺍ ﻫﻤﻮﺍﺭﻩ ﺑﺼﻮﺭﺕ ‪ Not-Taken‬ﻓﺮﺽ ﮐﺮﺩﻩ ﻭ ﻫﺮ ﺯﻣﺎﻥ ﻧﺘﻴﺠﻪ ﺷﺮﻁ‬
‫‪ Taken‬ﺗﺸﺨﻴﺺ ﺩﺍﺩﻩ ﺷﺪ‪ ,‬ﺩﺳﺘﻮﺭﺍﺗﯽ ﺭﺍ ﮐﻪ ﺑﻪ ﺍﺷﺘﺒﺎﻩ ﺩﺭﻭﻥ ‪ pipeline‬ﺁﻭﺭﺩﻩ ﺍﺳﺖ‪ Flush ,‬ﮐﺮﺩﻩ ﻭ ﺩﺳﺘﻮﺭﺍﺕ‬
‫ﺻﺤﻴﺢ ﻣﻘﺼﺪ ﭘﺮﺵ ﺭﺍ ﺩﺭﻭﻥ ﭘﺮﺩﺍﺯﻧﺪﻩ ﺷﺮﻭﻉ ﺑﻪ ﺍﺟﺮﺍ ﻧﻤﺎﻳﺪ‪.‬‬
‫ﺑﺮﺍﯼ ﺍﻳﻦ ﮐﺎﺭ ﻭﺍﺣﺪ ﺟﺪﻳﺪﯼ ﺑﻪ ﭘﺮﺩﺍﺯﻧﺪﻩ ﺍﺿﺎﻓﻪ ﮐﻨﻴﺪ‪ .‬ﻭﺭﻭﺩﻳﻬﺎ ﻭ ﺧﺮﻭﺟﻴﻬﺎﯼ ﺁﻧﺮﺍ ﺗﻌﻴﻴﻦ ﮐﺮﺩﻩ ﻭ ﻣﻌﺎﺩﻻﺕ‬
‫ﻣﺮﺑﻮﻁ ﺑﻪ ﺧﺮﻭﺟﻴﻬﺎﯼ ﺁﻧﺮﺍ ﺑﺮ ﺣﺴﺐ ﻭﺭﻭﺩﻳﻬﺎﻳﺶ ﺑﻨﻮﻳﺴﻴﺪ‪ .‬ﻭ ﺑﻄﻮﺭ ﻣﺨﺘﺼﺮ ﺩﺭﺑﺎﺭﻩ ﻧﺤﻮﻩ ﮐﺎﺭ ﺁﻥ ﺗﻮﺿﻴﺢ ﺩﻫﻴﺪ‪.‬‬
‫‪ ۲) -۱۰‬ﻧﻤﺮﻩ ﺍﺿﺎﻓﯽ( ﺳﻴﺴﺘﻢ ﺣﺎﻓﻈﻪ ﺍﯼ ﺍﺭﺍﻳﻪ ﺩﻫﻴﺪ ﮐﻪ ﺍﺯ ﻫﺮ ﺩﻭ ﺗﮑﻨﻴﮑﻬﺎﯼ ﻗﻄﻌﻪ ﺑﻨﺪﯼ )‪(segmentation‬‬
‫ﻭ ﺻﻔﺤﻪ ﺑﻨﺪﯼ )‪ (paging‬ﺩﺭ ﺁﻥ ﺍﺳﺘﻔﺎﺩﻩ ﺷﺪﻩ ﺑﺎﺷﺪ‪ .‬ﻓﺮﻣﺖ ﺁﺩﺭﺱ ﻣﺠﺎﺯﯼ ﻭ ﺁﺩﺭﺱ ﺣﻘﻴﻘﯽ‪ ,‬ﻭ ﻧﺤﻮﻩ‬
‫ﺗﺒﺪﻳﻞ ﺁﺩﺭﺳﻬﺎ ﺑﻪ ﻳﮑﺪﻳﮕﺮ ﺭﺍ ﺩﺭ ﺳﻴﺴﺘﻢ ﺧﻮﺩ ﺗﻮﺿﻴﺢ ﺩﻫﻴﺪ‪ .‬ﺑﻴﺎﻥ ﮐﻨﻴﺪ ﮐﻪ ﺳﻴﺴﺘﻢ ﺷﻤﺎ ﺍﺯ ﻫﺮﻳﮏ ﺍﺯ‬
‫ﺭﻭﺷﻬﺎﯼ ﺁﺩﺭﺱ ﺩﻫﯽ ‪unsegmented-unpaged, unsegmented-paged, segmented-unpaged,‬‬
‫‪ segmented-paged‬ﭼﮕﻮﻧﻪ ﭘﺸﺘﻴﺒﺎﻧﯽ ﻣﯽ ﮐﻨﺪ‪.‬‬
‫ﻣﻮﻓﻖ ﺑﺎﺷﻴﺪ‪.‬‬
‫ﻗﺮﻩ ﺑﺎﻏﯽ‬
‫ﺻﻔﺤﻪ ‪۴‬‬