Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

1403 Os HW 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

‫ﺑﻪ ﻧﺎﻡ ﺧﺪﺍ‬

‫ﺩﺭﺱ ﺳﯿﺴﺘﻢ ﻋﺎﻣﻞ‬


‫ﻧﯿﻢﺳﺎﻝ ﺍﻭﻝ ‪۰۳−۰۴‬‬
‫ﺍﺳﺘﺎﺩ‪ :‬ﺩﮐﺘﺮ ﺍﺳﺪﯼ‪ ،‬ﺩﮐﺘﺮ ﺟﻠﯿﻠ‬

‫ﺩﺍﻧﺸ ﺪﻩ ﻣﻬﻨﺪﺳ ﮐﺎﻣﭙﯿﻮﺗﺮ‬

‫ﺗﻤﺮﯾﻦ ﺳﺮﯼ ﺍﻭﻝ‬

‫● ﭘﺮﺳﺶﻫﺎﯼ ﺧﻮﺩ ﺭﺍ ﺩﺭ ﺳﺎﻣﺎﻧﻪ ‪ ⅭW‬ﻭ ﺗﺎﻻﺭ ﻣﺮﺑﻮﻁ ﺑﻪ ﺗﻤﺮﯾﻦ ﻣﻄﺮﺡ ﻧﻤﺎﯾﯿﺪ‪.‬‬


‫● ﭘﺎﺳﺦ ﺳﻮﺍﻻﺕ ﺭﺍ ﺗﺎﯾﭗ ﻧﻤﺎﯾﯿﺪ‪.‬‬
‫● ﺍﺳ ﺮﯾﻦﺷﺎﺕﻫﺎ‪ ،‬ﻋﮑﺲﻫﺎ‪ ،‬ﻓﺎﯾﻞﻫﺎﯼ ﻣﺮﺑﻮﻁ ﺑﻪ ﺳﻮﺍﻝ ﻋﻤﻠ ‪ ،‬ﮔﺰﺍﺭﺵ ﺗﻤﺮﯾﻨﺎﺕ ﻋﻤﻠ ﻭ ‪ PDF‬ﻗﺴﻤﺖ ﺗﺌﻮﺭﯼ ﺭﺍ ﺩﺭ ﭘﻮﺷﻪ ﺑﺎ ﻧﺎﻡ ﺑﻪ‬
‫ﻓﺮﻣﺖ ‪ HWNUM_StudentID1_StudentID2‬ﺫﺧﯿﺮﻩ ﻧﻤﺎﯾﯿﺪ‪ .‬ﺳﭙﺲ ﺁﻥ ﺭﺍ ‪ zip‬ﻧﻤﺎﯾﯿﺪ ﻭ ﺩﺭ ﺻﻔﺤﻪ ﺩﺭﺱ ﺑﺎﺭﮔﺬﺍﺭﯼ ﻧﻤﺎﯾﯿﺪ‪.‬‬
‫ﺑﻪ ﻋﻨﻮﺍﻥ ﻣﺜﺎﻝ ﯾ ﻓﺎﯾﻞ ﺑﺎﺭﮔﺬﺍﺭﯼ ﺷﺪﻩ ﻗﺎﺑﻞ ﻗﺒﻮﻝ ﺑﺎﯾﺪ ﺩﺍﺭﺍﯼ ﻓﺮﻣﺖ ‪ HW1_400123456_403123456.zip‬ﺑﺎﺷﺪ‪.‬‬
‫● ﻫﺮ ﺩﺍﻧﺸﺠﻮ ﻣ ﺗﻮﺍﻧﺪ ﺣﺪﺍﮐﺜﺮ ﺳﻪ ﺗﻤﺮﯾﻦ ﺭﺍ ﺑﺎ ﺩﻭ ﺭﻭﺯ ﺗﺄﺧﯿﺮ ﺑﺪﻭﻥ ﮐﺎﻫﺶ ﻧﻤﺮﻩ ﺍﺭﺳﺎﻝ ﻧﻤﺎﯾﺪ‪.‬‬
‫● ﺗﻤﺮﯾﻨﺎﺕ ﻋﻤﻠ ﻭ ﺗﺌﻮﺭﯼ ﺑﻪ ﺻﻮﺭﺕ ﮔﺮﻭەﻫﺎﯼ ﺩﻭ ﻧﻔﺮ ﺗﺤﻮﯾﻞ ﺩﺍﺩﻩ ﺷﻮﺩ‪.‬‬
‫● ﻫﺮ ﺩﻭ ﻋﻀﻮ ﮔﺮﻭﻩ ﻣﻮﻇﻒ ﻫﺴﺘﻨﺪ ﺗﻤﺮﯾﻨﺎﺕ ﺧﻮﺩ ﺭﺍ ﺑﺎﺭﮔﺬﺍﺭﯼ ﮐﻨﻨﺪ‪.‬‬
‫● ﻋﻮﺍﻗﺐ ﻋﺪﻡ ﺗﻄﺎﺑﻖ ﺑﯿﻦ ﭘﺎﺳﺦ ﺩﻭ ﻋﻀﻮ ﮔﺮﻭﻩ ﺑﺮﻋﻬﺪﻩ ﺧﻮﺩﺷﺎﻥ ﺍﺳﺖ‪.‬‬
‫● ﺗﺤﻮﯾﻞ ﺗﻤﺮﯾﻦ ﺑﻪ ﺻﻮﺭﺕ ﺍﻧﮕﻠﯿﺴ ﻣﺠﺎﺯ ﻧﯿﺴﺖ‪ .‬ﺩﺭ ﺻﻮﺭﺕ ﺗﺤﻮﯾﻞ ﺗﻤﺮﯾﻦ ﺑﻪ ﺻﻮﺭﺕ ﺍﻧﮕﻠﯿﺴ )ﺣﺘ ﺑﺨﺸ ﺍﺯ ﺗﻤﺮﯾﻦ( ﻧﻤﺮﻩ‬
‫ﺗﻤﺮﯾﻦ ﻣﻮﺭﺩﻧﻈﺮ ﺻﻔﺮ ﺩﺭ ﻧﻈﺮ ﮔﺮﻓﺘﻪ ﻣ ﺷﻮﺩ‪.‬‬
‫● ﺩﺭ ﺻﻮﺭﺕ ﻣﺸﺎﻫﺪﻩ ﺗﻘﻠﺐ ﺑﺮﺍﯼ ﺑﺎﺭ ﺍﻭﻝ ﻧﻤﺮﻩ ﻫﺮ ﺩﻭ ﻃﺮﻑ ﺻﻔﺮ ﻣ ﺷﻮﺩ‪ .‬ﺩﺭ ﺻﻮﺭﺕ ﺗﮑﺮﺍﺭ ﻧﻤﺮﻩ ﮐﻞ ﺗﻤﺮﯾﻨﺎﺕ ﺻﻔﺮ ﺧﻮﺍﻫﺪ ﺷﺪ‪.‬‬
‫● ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ﺍﺑﺰﺍﺭﻫﺎﯾﯽ ﻣﺎﻧﻨﺪ ‪ ChatGPT‬ﺑﻪ ﻣﻨﻈﻮﺭ ﺍﺑﺰﺍﺭ ﮐﻤ ﺁﻣﻮﺯﺷ ﻣﺠﺎﺯ ﺍﺳﺖ ﺑﻪ ﺷﺮﻁ ﺁﻥ ﮐﻪ ﺑﻪ ﺧﺮﻭﺟ ﺁﻥ ﺍﮐﺘﻔﺎ ﻧﺸﻮﺩ‪.‬‬
‫● ﺗﻮﺟﻪ ﺷﻮﺩ ﮐﻪ ﭘﺮﻭﮊﻩ ﻧﻬﺎﯾﯽ ﺩﺭﺱ ﺩﺭ ﮔﺮﻭەﻫﺎﯼ ﭼﻬﺎﺭ ﻧﻔﺮ ﺗﺤﻮﯾﻞ ﮔﺮﻓﺘﻪ ﻣ ﺷﻮﺩ‪.‬‬
‫● ﺳﻮﺍﻻﺕ ﺑﺎ ﻋﻨﻮﺍﻥ ﺍﺧﺘﯿﺎﺭﯼ ﻧﻤﺮەﺍﯼ ﻧﺪﺍﺭﻧﺪ ﺍﻣﺎ ﺟﻮﺍﺏ ﺩﺍﺩﻥ ﺑﻪ ﺁﻥﻫﺎ ﮐﻤ ﺑەﺳﺰﺍﯾﯽ ﺩﺭ ﯾﺎﺩﮔﯿﺮﯼ ﺩﺭﺱ ﻣ ﮐﻨﺪ‪.‬‬
‫ﺻﻔﺤﻪ ‪ ۲‬ﺍﺯ ‪۷‬‬ ‫ﺩﺭﺱ ﺳﯿﺴﺘﻢ ﻋﺎﻣﻞ‬

‫ﺗﻤﺎﺭﯾﻦ ﺗﺌﻮﺭﯼ‬
‫‪ .۱‬ﺳﯿ ﻨﺎﻝﻫﺎ‪ ،‬ﺍﻋﻼﻥﻫﺎﯼ ﻭﺭﻭﺩﯼ ﺑﻪ ﺑﺮﻧﺎﻣﻪ ﻫﺴﺘﻨﺪ‪ .‬ﺍﺯ ﺁﻧﺠﺎﯾﯽ ﮐﻪ ﻋﻤﻮﻣﺎﹰ ﻣﻨﺸﺄ ﻧﺮﻡﺍﻓﺰﺍﺭﯼ ﺩﺍﺭﻧﺪ ﮔﺎﻫ ﺑﻪ ﺁﻥﻫﺎ ﻭﻗﻔﻪ ﻧﺮﻡﺍﻓﺰﺍﺭﯼ ‪ ۱‬ﯾﺎ‬
‫ﺗﻠﻪ ‪ ۲‬ﻧﯿﺰ ﮔﻔﺘﻪ ﻣ ﺷﻮﺩ‪ .‬ﺳﯿ ﻨﺎﻝﻫﺎ ﺭﻭﻧﺪ ﻋﺎﺩﯼ ﺑﺮﻧﺎﻣﻪ ﺭﺍ ﻣﺘﻮﻗﻒ ﻣ ﮐﻨﻨﺪ ﻭ ﺩﺭ ﺍﻏﻠﺐ ﻣﻮﺍﻗﻊ ﭘﯿﺶﺑﯿﻨ ﺯﻣﺎﻥ ﻭﺭﻭﺩ ﺁﻥﻫﺎ ﻧﺎﻣﻤ ﻦ‬
‫ﺍﺳﺖ‪ .‬ﻣﻨﺸﺄ ﺍﺻﻠ ﺻﺪﻭﺭ ﺳﯿ ﻨﺎﻝﻫﺎ ﺍﺯ ﻫﺴﺘﻪ ﺳﯿﺴﺘﻢ ﺍﺳﺖ ﺍﻣﺎ ﺍﻣ ﺎﻥ ﺍﺭﺳﺎﻝ ﻭ ﺩﺭﯾﺎﻓﺖ ﺳﯿ ﻨﺎﻝ ﺑﯿﻦ ﺩﻭ ﺑﺮﻧﺎﻣﻪ ﺩﺭﺣﺎﻝ ﺍﺟﺮﺍ ﻧﯿﺰ‬
‫ﻭﺟﻮﺩ ﺩﺍﺭﺩ ﮐﻪ ﺍﺯ ﺁﻥ ﻣ ﺗﻮﺍﻥ ﺑﺮﺍﯼ ﻫﻤ ﺎﻡﺳﺎﺯﯼ ﻭ ﺍﺭﺗﺒﺎﻃﺎﺕ ﺑﯿﻦ ﻓﺮﺁﯾﻨﺪﯼ ‪ ۳‬ﺍﺳﺘﻔﺎﺩﻩ ﮐﺮﺩ ﮐﻪ ﺩﺭ ﻓﺼﻞﻫﺎﯼ ﺑﻌﺪﯼ ﺑﺎ ﺍﯾﻦ ﻣﻔﺎﻫﯿﻢ‬
‫ﺑﻪ ﺗﻔﺼﯿﻞ ﺁﺷﻨﺎ ﺧﻮﺍﻫﯿﺪ ﺷﺪ‪.‬‬

‫ﺷ ﻞ ‪ :۱‬ﻧﻤﺎﯾﯽ ﺍﺯ ﺳﺎﺧﺘﺎﺭ ﺳﯿ ﻨﺎﻝﻫﺎ ﺩﺭ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ‬

‫)ﺁ( ﭘﺲ ﺍﺯ ﻭﺭﻭﺩ ﯾ ﺳﯿ ﻨﺎﻝ‪ ،‬ﻣﻤ ﻦ ﺍﺳﺖ ﻓﺮﺁﯾﻨﺪ ﺑﻪ ﺻﻮﺭﺕ ﭘﯿﺶﻓﺮﺽ ﻣﺠﻤﻮﻋەﺍﯼ ﺍﺯ ﺭﻓﺘﺎﺭﻫﺎ ﺭﺍ ﺩﺭ ﺑﺎﺯﺧﻮﺭﺩ ﺑﻪ ﺁﻥ ﺳﯿ ﻨﺎﻝ‬
‫ﺍﻧﺠﺎﻡ ﺩﻫﺪ‪ .‬ﺗﻌﺪﺍﺩ ﺍﯾﻦ ﺭﻓﺘﺎﺭﻫﺎﯼ ﭘﯿﺶﻓﺮﺽ ﻣﺤﺪﻭﺩ ﺍﺳﺖ‪ ،‬ﺁﻥﻫﺎ ﺭﺍ ﺑﺮﺭﺳ ﮐﻨﯿﺪ ﻭ ﺩﻭ ﻧﻤﻮﻧﻪ ﺍﺯ ﺁﻥﻫﺎ ﺭﺍ ﺷﺮﺡ ﺩﻫﯿﺪ‪.‬‬
‫)ﺏ( ﺩﺭ ﻟﯿﻨﻮﮐﺲ ﺗﻘﺮﯾﺒﺎﹰ ﺗﻤﺎﻣ ﺍﺑﺰﺍﺭﻫﺎ ﻭ ﺍﺟﺰﺍ ﺑﻪ ﺷ ﻞ ﻓﺎﯾﻞﻫﺎﯼ ﻣﺠﺰﺍ ﻫﺴﺘﻨﺪ‪ .‬ﯾ ﺍﺯ ﺍﯾﻦ ﺍﻧﻮﺍﻉ ﻓﺎﯾﻞﻫﺎ ﺩﺭ ﻣﺴﯿﺮ ﺯﯾﺮ ﻗﺮﺍﺭ‬
‫ﺩﺍﺭﺩ‪ .‬ﺳﻪ ﻣﺆﻟﻔﻪ ﻣﻮﺟﻮﺩ ﺩﺭ ﺍﯾﻦ ﻓﺎﯾﻞ ﮐﻪ ﺩﺭﺑﺎﺭﻩ ﺳﯿ ﻨﺎﻝﻫﺎﯼ ﯾ ﻓﺮﺁﯾﻨﺪ ﻫﺴﺘﻨﺪ ﺭﺍ ﻣﺸﺨﺺ ﮐﺮﺩﻩ ﻭ ﮐﺎﺭﮐﺮﺩ ﺁﻥﻫﺎ ﺭﺍ ﺑﯿﺎﻥ‬
‫ﮐﻨﯿﺪ‪.‬‬
‫)‪/proc/PID/status (e.g. /proc/10/status‬‬
‫)ﺝ( ﯾ ﺍﺯ ﺍﻣ ﺎﻧﺎﺕ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﻟﯿﻨﻮﮐﺲ ﻗﺎﺑﻠﯿﺖ ﻣﺪﯾﺮﯾﺖ ﺍﯾﻦ ﺳﯿ ﻨﺎﻝﻫﺎ )‪ (Deposition Signals‬ﻭ ﺍﺭﺍﺋﻪ ﺭﻭﻧﺪﯼ ﺍﺯ‬
‫ﭘﯿﺶ ﺗﻌﯿﯿﻦ ﺷﺪﻩ ﺩﺭ ﻣﻮﺍﻗﻊ ﺑﺮﻭﺯ ﺍﯾﻦ ﻧﻮﻉ ﻭﻗﻔەﻫﺎ ﺍﺳﺖ‪ .‬ﻫﺮ ﺳﯿ ﻨﺎﻝ ﺩﺍﺭﺍﯼ ﻧﺎﻡ ﻭ ﻋﺪﺩﯼ ﺍﺳﺖ ﮐﻪ ﺩﻟﯿﻞ ﺻﺪﻭﺭ ﺁﻥ ﺭﺍ‬
‫ﻧﺸﺎﻥ ﻣ ﺩﻫﺪ‪ .‬ﺑﺮﺭﺳ ﮐﻨﯿﺪ ﺑﺮﺍﯼ ﺷﻨﺎﺳﺎﯾﯽ ﺗﻠە ﻧﺎﺷ ﺍﺯ ﻓﺮﺍﺧﻮﺍﻧ ﺳﺎﻣﺎﻧەﺍﯼ ﻧﺎﻣﻌﺘﺒﺮ ﻭ ﺧﻄﺎ ﺩﺭ ﻣﺤﺎﺳﺒﺎﺕ ﺷﻨﺎﻭﺭ ﭼﻪ‬
‫ﺳﯿ ﻨﺎﻝﻫﺎﯾﯽ ﺻﺎﺩﺭ ﻣ ﺷﻮﻧﺪ‪.‬‬
‫ﻭﻗﻔﻪ ﻭﺟﻮﺩ ﺩﺍﺭﺩ‪ .‬ﭼﺮﺍ ﻻﺯﻡ ﺍﺳﺖ ﭼﻨﯿﻦ ﻭﯾﮋﮔ ﺩﺭ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﻭﺟﻮﺩ ﺩﺍﺷﺘﻪ ﺑﺎﺷﺪ؟‬ ‫)ﺩ( ﺩﺭ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﺍﻣ ﺎﻥ ‪ mask‬ﯾ‬

‫ﭘﺮﺩﺍﺯﻧﺪﻩ ﺍﺟﺮﺍ ﻣ ﺷﻮﻧﺪ‪ .‬ﺳﻨﺎﺭﯾﻮﯼ ﺯﯾﺮ ﺭﺍ ﺩﺭ ﻧﻈﺮ‬ ‫ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﭼﻨﺪ ﻭﻇﯿﻔەﺍﯼ‪ ،‬ﭼﻨﺪﯾﻦ ﻓﺮﺁﯾﻨﺪ ﺑﻪ ﻃﻮﺭ ﻫﻤﺰﻣﺎﻥ ﺭﻭﯼ ﯾ‬ ‫‪ .۲‬ﺩﺭ ﯾ‬
‫ﺑ ﯿﺮﯾﺪ‪:‬‬

‫ﻭﻗﻔﻪ ﺳﺨﺖﺍﻓﺰﺍﺭﯼ )ﻣﺜﻼ ﺍﺯ ﮐﺎﺭﺕ ﺷﺒ ﻪ( ﺯﻣﺎﻧ ﺭﺥ ﻣ ﺩﻫﺪ ﮐﻪ ﻓﺮﺁﯾﻨﺪ ‪ A‬ﺩﺭ ﺣﺎﻟﺖ ﮐﺎﺭﺑﺮ ﺍﺟﺮﺍ ﻣ ﺷﻮﺩ‪.‬‬ ‫● ﯾ‬
‫ﺗﻠﻪ ﺑﺎ ﻓﺮﺍﺧﻮﺍﻧ ﺳﯿﺴﺘﻤ ﮐﻪ ﺗﻮﺳﻂ ﻓﺮﺁﯾﻨﺪ ‪ B‬ﺍﯾﺠﺎﺩ ﺷﺪﻩ‪ ،‬ﺭﺍەﺍﻧﺪﺍﺯﯼ ﻣ ﺷﻮﺩ‪.‬‬ ‫● ﺑﻪ ﻃﻮﺭ ﻫﻤﺰﻣﺎﻥ‪ ،‬ﯾ‬
‫ﺍﺳﺘﺜﻨﺎﯼ ﺑﺤﺮﺍﻧ )ﺑﻪ ﻋﻨﻮﺍﻥ ﻣﺜﺎﻝ ﺗﻘﺴﯿﻢ ﺑﺮ ﺻﻔﺮ( ﺩﺭ‬ ‫● ﺩﺭ ﻃﻮﻝ ﺍﺟﺮﺍﯼ ﺭﻭﺍﻝ ﺳﺮﻭﯾﺲ ﻭﻗﻔﻪ )‪ (ISR‬ﺑﺮﺍﯼ ﻭﻗﻔﻪ ﺷﺒ ﻪ‪ ،‬ﯾ‬
‫ﺣﺎﻟﺖ ﻫﺴﺘﻪ ﺭﺥ ﻣ ﺩﻫﺪ‪.‬‬

‫‪1‬‬
‫‪Software Interrupts‬‬
‫‪2‬‬
‫‪Trap‬‬
‫‪3‬‬
‫‪Inter-Process Communication‬‬
‫ﺻﻔﺤﻪ ‪ ۳‬ﺍﺯ ‪۷‬‬ ‫ﺩﺭﺱ ﺳﯿﺴﺘﻢ ﻋﺎﻣﻞ‬

‫ﻣﻮﺍﺭﺩ ﺯﯾﺮ ﺭﺍ ﺗﺤﻠﯿﻞ ﮐﻨﯿﺪ‪:‬‬


‫ﭼ ﻮﻧﻪ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﻣﺪﯾﺮﯾﺖ ﺍﯾﻦ ﺭﻭﯾﺪﺍﺩﻫﺎ ﺭﺍ ﺩﺭ ﺍﻭﻟﻮﯾﺖ ﻗﺮﺍﺭ ﻣ ﺩﻫﺪ؟‬ ‫)ﺁ(‬
‫ﺑﺮﺩﺍﺭ ﻭﻗﻔﻪ ﺩﺭ ﺍﯾﻦ ﺳﻨﺎﺭﯾﻮ ﭼﻪ ﻧﻘﺸ ﺩﺍﺭﺩ؟‬ ‫)ﺏ(‬
‫ﭼ ﻮﻧﻪ ﺳﯿﺴﺘﻢ ﺗﻀﻤﯿﻦ ﻣ ﮐﻨﺪ ﮐﻪ ﻫﯿﭻ ﯾ ﺍﺯ ﻓﺮﺁﯾﻨﺪﻫﺎ ﺣﺎﻟﺖ ﺍﺟﺮﺍﯾﯽ ﺧﻮﺩ ﺭﺍ ﺍﺯ ﺩﺳﺖ ﻧﺪﻫﻨﺪ؟‬ ‫)ﺝ(‬
‫ﺳﺎﺯﻭﮐﺎﺭﻫﺎﯼ ﺧﺎﺹ ﺑﺮﺍﯼ ﻣﺪﯾﺮﯾﺖ ﺗﻠﻪ‪ ،‬ﻭﻗﻔﻪ ﻭ ﺍﺳﺘﺜﻨﺎ ﺩﺭ ﺍﯾﻦ ﺳﻨﺎﺭﯾﻮ ﭼﯿﺴﺖ‪ .‬ﻫﻤﭽﻨﯿﻦ ﺍﯾﻦ ﺳﺎﺯﻭﮐﺎﺭﻫﺎ ﺍﺯ ﻧﻈﺮ ﺗﻮﺍﻟ‬ ‫)ﺩ(‬
‫ﻣﺪﯾﺮﯾﺖ ﻭ ﺟﺎﺑﺠﺎﯾﯽ ﺑﯿﻦ ﺣﺎﻟﺖ ﮐﺎﺭﺑﺮ ﻭ ﻫﺴﺘﻪ ﭼﻪ ﺗﻔﺎﻭﺕﻫﺎﯼ ﺩﺍﺭﻧﺪ؟‬
‫‪) .۳‬ﺁ( ﻣﺮﺍﺣﻞ ﻣﺨﺘﻠﻒ ﺑﻮﺕ ﺷﺪﻥ ﯾ ﺳﯿﺴﺘﻢ ﮐﺎﻣﭙﯿﻮﺗﺮﯼ‪ ،‬ﺍﺯ ﻟﺤﻈەﺍﯼ ﮐﻪ ﺩﮐﻤﻪ ﺭﻭﺷﻦ ﮐﺮﺩﻥ ﮐﺎﻣﭙﯿﻮﺗﺮ ﻓﺸﺮﺩﻩ ﻣ ﺷﻮﺩ ﺗﺎ ﺯﻣﺎﻧ‬
‫ﮐﻪ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﻗﺎﺩﺭ ﺑﻪ ﺳﺮﻭﯾﺲﺩﻫ ﺑﻪ ﮐﺎﺭﺑﺮ ﺍﺳﺖ ﺭﺍ ﺩﺭ ﻧﻈﺮ ﺑ ﯿﺮﯾﺪ‪ .‬ﺳﭙﺲ ﻣﻔﻬﻮﻡ ‪ Secure Boot‬ﺭﺍ ﺑﺮﺭﺳ ﮐﻨﯿﺪ‬
‫ﻭ ﺑﺮﺭﺳ ﮐﻨﯿﺪ ﺍﯾﻦ ﻣﻔﻬﻮﻡ ﯾ ﺳﯿﺴﺘﻢ ﮐﺎﻣﭙﯿﻮﺗﺮﯼ ﺭﺍ ﺩﺭ ﻣﻘﺎﺑﻞ ﭼﻪ ﺗﻬﺪﯾﺪﺍﺗ ﺍﻣﻦ ﻣ ﮐﻨﺪ‪.‬‬
‫)ﺏ( ﺣﺎﻝ ﻓﺮﺽ ﮐﻨﯿﺪ ﮐﻪ ‪ UEFI‬ﮐﺎﻣﭙﯿﻮﺗﺮ ﺷﻤﺎ ﺩﺍﺭﺍﯼ ﺣﺎﻟﺖ ‪ Secure Boot‬ﺍﺳﺖ ﻭ ﺷﻤﺎ ﻧﻤ ﺗﻮﺍﻧﯿﺪ ﺍﯾﻦ ﺣﺎﻟﺖ ﺭﺍ ﻏﯿﺮ ﻓﻌﺎﻝ‬
‫ﮐﻨﯿﺪ‪ .‬ﺍﮔﺮ ﻻﺯﻡ ﺑﺎﺷﺪ ﮐﻪ ﯾ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﻧﺼﺐ ﮐﻨﯿﺪ ﮐﻪ ‪ Bootloader‬ﺧﺎﺹ ﺧﻮﺩﺵ ﺭﺍ ﺩﺍﺭﺩ ﻭ ﺍﯾﻦ ‪Bootloader‬‬
‫ﺗﻮﺳﻂ ‪ UEFI‬ﮐﺎﻣﭙﯿﻮﺗﺮ ﺷﻤﺎ ﻗﺎﺑﻞ ﺍﻋﺘﻤﺎﺩ ﺷﻨﺎﺧﺘﻪ ﻧﺸﻮﺩ‪ ،‬ﺗﻮﺿﯿﺢ ﺩﻫﯿﺪ ﮐﻪ ﭼ ﻮﻧﻪ ﻣ ﺗﻮﺍﻥ ﺍﯾﻦ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﺭﺍ ﻧﺼﺐ‬
‫ﮐﺮﺩ‪.‬‬
‫)ﺝ( ﺩﺭ ﻣﻮﺭﺩ ‪ Mini Bootloader‬ﺗﺤﻘﯿﻖ ﮐﻨﯿﺪ ﻭ ﺍﯾﻦ ﻣﻔﻬﻮﻡ ﺭﺍ ﺷﺮﺡ ﺩﻫﯿﺪ‪ .‬ﺳﭙﺲ ﺑﺮﺭﺳ ﮐﻨﯿﺪ ﺍﯾﻦ ﻣﻔﻬﻮﻡ ﺑﺎ ‪Secure‬‬
‫‪ Boot‬ﭼﻪ ﺍﺭﺗﺒﺎﻃ ﺩﺍﺭﺩ ﻭ ﭼﻪ ﻣﺰﯾﺘ ﺑﻪ ﺁﻥ ﺍﺿﺎﻓﻪ ﻣ ﮐﻨﺪ‪.‬‬
‫‪ .۴‬ﺑﺮﺍﯼ ﻣﺪﯾﺮﯾﺖ ﺳﯿﺴﺘﻢ ﻧﯿﺎﺯﻣﻨﺪ ﻣﺤﺪﻭﺩ ﮐﺮﺩﻥ ﺳﻄﻮﺡ ﺩﺳﺘﺮﺳ ﻫﺴﺘﯿﻢ‪ .‬ﺑﺮﺍﯼ ﺍﻋﻤﺎﻝ ﻣﺤﺪﻭﺩﯾﺖﻫﺎ‪ ،‬ﻋﻼﻭﻩ ﺑﺮ ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ‪Mode‬‬
‫‪ Bit‬ﺩﺭ ‪ ،CPU‬ﺭﻭﺵﻫﺎﯼ ﻧﺮﻡﺍﻓﺰﺍﺭﯼ ﻧﯿﺰ ﺍﺳﺘﻔﺎﺩﻩ ﻣ ﮔﺮﺩﺩ‪.‬‬
‫)ﺁ( ﻣﺤﺪﻭﺩﯾﺖﻫﺎﯼ ﺩﺳﺘﺮﺳ ﻣﺨﺘﻠﻒ ﻣﺎﻧﻨﺪ ﺩﺳﺘﺮﺳ ﺭﯾﺸﻪ ‪ ،۴‬ﮐﺎﺭﺑﺮ ﻋﺎﺩﯼ ﻭ ‪ ...‬ﺭﺍ ﺑﺮﺭﺳ ﮐﻨﯿﺪ‪ .‬ﺳﭙﺲ ﺭﻭﺵ ﺍﻋﻤﺎﻝ ﺁﻥﻫﺎ‬
‫ﺩﺭ ﻟﯿﻨﻮﮐﺲ ﺭﺍ ﺑﺎ ﺫﮐﺮ ﻣﺜﺎﻝ ﺗﻮﺿﯿﺢ ﺩﻫﯿﺪ‪.‬‬
‫)ﺏ( ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ﺩﺳﺘﻮﺭ ‪ sudo‬ﺩﺭ ﻟﯿﻨﻮﮐﺲ ﭼ ﻮﻧﻪ ﺑﺎﻋﺚ ﺍﻓﺰﺍﯾﺶ ﺩﺳﺘﺮﺳ ﻣ ﺷﻮﺩ؟‬
‫)ﺝ( ﺗﻮﺿﯿﺢ ﺩﻫﯿﺪ ﺩﺭ ﺻﻮﺭﺕ ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ‪ ،sudo‬ﭼﻪ ﻣﺤﺪﻭﺩﯾﺘ ﺩﺭ ﮐﺎﺭ ﺑﺎ ﺳﯿﺴﺘﻢ ﻭﺟﻮﺩ ﺧﻮﺍﻫﺪ ﺩﺍﺷﺖ ﻭ ﻫﻤﭽﻨﯿﻦ ﺗﻔﺎﻭﺕ‬
‫ﺁﻥ ﺑﺎﺣﺎﻟﺖ ﻫﺴﺘﻪ ﺭﺍ ﺑﺮﺭﺳ ﻧﻤﺎﯾﯿﺪ؟‬
‫ﻋﻤﻠﯿﺎﺕ ‪ I/O‬ﺍﺯ ‪ DMA‬ﺍﺳﺘﻔﺎﺩﻩ ﻣ ﺷﻮﺩ‪.‬‬ ‫)ﺁ( ﻫﻤﺎﻥﻃﻮﺭ ﮐﻪ ﺩﺭ ﺩﺭﺱ ﺍﺷﺎﺭﻩ ﺷﺪ‪ ،‬ﺑﺮﺍﯼ ﺟﻠﻮﮔﯿﺮﯼ ﺍﺯ ﺍﯾﺠﺎﺩ ﻣﺪﺍﻭﻡ ﻭﻗﻔﻪ ﺩﺭ ﯾ‬ ‫‪.۵‬‬
‫‪۵‬‬
‫ﺩﺭ ﻋﯿﻦ ﺣﺎﻝ ﻣﻌﻤﻮﻻ ﺑﺪﻧەﯼ ﮐﻨﺘﺮﻝ ﮐﻨﻨﺪەﻫﺎﯼ ﻭﻗﻔﻪ ﺩﺍﺭﺍﯼ ﮐﺪ ﭘﯿﭽﯿﺪەﺍﯼ ﺑﺮﺍﯼ ﺍﺟﺮﺍ ﻧﯿﺴﺘﻨﺪ ﻭ ﺑﻪ ﺳﺮﻋﺖ ﺍﺟﺮﺍ ﻣ ﺷﻮﻧﺪ‪.‬‬
‫ﺩﺭ ﺍﯾﻦ ﺻﻮﺭﺕ ﭼﺮﺍ ﺍﯾﺠﺎﺩ ﻣﺪﺍﻭﻡ ﻭﻗﻔﻪ ﺑﺎﻋﺚ ﺍﻓﺖ ﮐﺎﺭﺍﯾﯽ ﻣ ﺷﻮﺩ؟‬
‫)ﺏ( ﭘﺮﺩﺍﺯﻧﺪەﻫﺎﯼ ‪ x86‬ﯾ ﺣﺎﻟﺖ ﺍﺟﺮﺍﯾﯽ ﺑﻪ ﻧﺎﻡ ‪ ۶ SMM‬ﺩﺍﺭﻧﺪ‪ .‬ﺑﺎ ﺗﺸﺮﯾﺢ ﻋﻤﻠ ﺮﺩ ﺍﯾﻦ ﺣﺎﻟﺖ‪ ،‬ﺳﻪ ﻧﻤﻮﻧﻪ ﺍﺯ ﻓﻌﺎﻟﯿﺖﻫﺎﯼ‬
‫ﺍﺻﻠ ﺍﯾﻦ ﺣﺎﻟﺖ ﺍﺟﺮﺍﯾﯽ ﺭﺍ ﺗﻮﺿﯿﺢ ﺩﻫﯿﺪ‪.‬‬
‫)ﺝ( ﺩﺭ ﻣﻮﺭﺩ ﺗﻔﺎﻭﺕ ﻭﻗﻔﻪ‪ ،‬ﺍﺳﺘﺜﻨﺎ ﻭ ﺗﻠﻪ ﺗﻮﺿﯿﺢ ﺩﻫﯿﺪ ﻭ ﺑﺮﺍﯼ ﻫﺮ ﯾ ﻣﺜﺎﻟ ﺑﯿﺎﻭﺭﯾﺪ‪.‬‬
‫‪ .۶‬ﻓﺮﺽ ﮐﻨﯿﺪ ﻣ ﺧﻮﺍﻫﯿﺪ ﺳﯿﺴﺘﻢﻋﺎﻣﻠ ﺑﺮﺍﯼ ﻣﺤﯿﻂ ﺗﻌﺎﻣﻠ ﺑﺎ ﮐﺎﺭﺑﺮ ﺗﻮﺳﻌﻪ ﺩﻫﯿﺪ ﮐﻪ ﺯﻣﺎﻥ ﺑﺎﺯﺧﻮﺭﺩ ﻭﺭﻭﺩﯼﻫﺎﯼ ﮐﺎﺭﺑﺮ ﺍﻭﻟﻮﯾﺖ‬
‫ﺑﺎﻻﺗﺮﯼ ﻧﺴﺒﺖ ﺑﻪ ﮐﺎﺭﺍﯾﯽ ﮐﻞ ﺳﺎﻣﺎﻧﻪ ﺩﺍﺭﺩ‪ .‬ﺳﺎﻣﺎﻧﻪ ﻣﻮﺭﺩ ﻧﻈﺮ ﻓﻘﻂ ﺩﺍﺭﺍﯼ ﯾ ﻫﺴﺘﻪ ﭘﺮﺩﺍﺯﺷ ﺍﺳﺖ‪.‬‬
‫ﺑﺮﺍﯼ ﺑﻬﺒﻮﺩ ﺯﻣﺎﻥ ﭘﺎﺳﺦﺩﻫ ﺑﻪ ﮐﺎﺭﺑﺮ ﺍﺳﺘﻔﺎﺩﻩ ﻣ ﮐﻨﯿﺪ؟ ﺗﻮﺿﯿﺢ ﺩﻫﯿﺪ‪.‬‬ ‫)ﺁ( ﺩﺭ ﺍﯾﻦ ﺻﻮﺭﺕ ﺍﺯ ﭼﻪ ﺗﮑﻨﯿ‬
‫)ﺏ( ﺁﯾﺎ ﻣﻤ ﻦ ﺍﺳﺖ ﺩﺭ ﺳﺎﻣﺎﻧەﻫﺎﯼ ﭼﻨﺪﭘﺮﺩﺍﺯﻧﺪﻩ ﺩﺭ ﺩﺳﺘﺮﺳ ﺑﻪ ﺣﺎﻓﻈﻪ ﭼﺎﻟﺶ ﺧﺎﺻ ﻭﺟﻮﺩ ﺩﺍﺷﺘﻪ ﺑﺎﺷﺪ؟ ﺗﻮﺿﯿﺢ ﺩﻫﯿﺪ‪.‬‬
‫)ﺝ( ﻣﻌﻤﺎﺭﯼ ﻣﺘﻘﺎﺭﻥ ‪ ۷‬ﻭ ﻧﺎﻣﺘﻘﺎﺭﻥ ‪ ۸‬ﺩﺭ ﺳﺎﻣﺎﻧەﻫﺎﯼ ﭼﻨﺪﭘﺮﺩﺍﺯﻧﺪﻩ ﺭﺍ ﻣﻘﺎﯾﺴﻪ ﮐﻨﯿﺪ‪.‬‬
‫)ﺩ( ﺁﯾﺎ ﻣﺪﯾﺮﯾﺖ ﺣﺎﻓﻈﻪ ﻧﻬﺎﻥ ﺩﺭ ﭘﺮﺩﺍﺯﻧﺪەﻫﺎﯼ ﭼﻨﺪﻫﺴﺘەﺍﯼ ﺗﻔﺎﻭﺗ ﺑﺎ ﭘﺮﺩﺍﺯﻧﺪەﻫﺎﯼ ﺗﮏﻫﺴﺘەﺍﯼ ﺩﺍﺭﺩ؟ ﺗﻮﺿﯿﺢ ﺩﻫﯿﺪ‪.‬‬

‫‪root۴‬‬
‫‪5‬‬
‫‪Interrupt Handler‬‬
‫‪6‬‬
‫‪System Management Mode‬‬
‫‪7‬‬
‫‪Symmetric‬‬
‫‪8‬‬
‫‪Asymmetric‬‬
‫ﺻﻔﺤﻪ ‪ ۴‬ﺍﺯ ‪۷‬‬ ‫ﺩﺭﺱ ﺳﯿﺴﺘﻢ ﻋﺎﻣﻞ‬

‫ﺗﻤﺎﺭﯾﻦ ﻋﻤﻠ‬
‫‪ .۱‬ﯾ ﺍﺯ ﺳﻮﺍﻻﺕ ﺗﻤﺮﯾﻨﺎﺕ ﻋﻤﻠ ﺍﯾﻦ ﺩﺭﺱ ﻣﺒﺘﻨ ﺑﺮ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ‪ xv6‬ﺳﺎﺧﺘﻪ ﺷﺪﻩ ﺗﻮﺳﻂ ﺩﺍﻧﺸ ﺎﻩ ‪ MIT‬ﺍﺳﺖ ﮐﻪ ﯾ‬
‫ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﺑﺮﺍﯼ ﺍﻫﺪﺍﻑ ﺁﻣﻮﺯﺷ ﺍﺳﺖ‪ .‬ﻟﯿﻨﮏ ﻣﺴﺘﻨﺪﺍﺕ ﻭ ﻓﯿﻠﻢﻫﺎﯼ ﺁﻣﻮﺯﺷ ﻣﺮﺑﻮﻁ ﺑﻪ ﺍﯾﻦ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﺩﺭ ﺻﻔﺤەﯼ ‪cw‬‬
‫ﺩﺭﺱ ﻗﺮﺍﺭ ﺩﺍﺩﻩ ﺷﺪﻩ ﺍﺳﺖ‪.‬‬

‫ﺁ⁃ ﺑﺎ ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ﻓﯿﻠﻢ ﺁﻣﻮﺯﺷ ﻣﻮﺟﻮﺩ ﺩﺭ ‪ cw‬ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ‪ xv6‬ﺭﺍ ﺍﺟﺮﺍ ﮐﻨﯿﺪ ﻭ ﺍﺯ ﻣﺮﺍﺣﻞ ﺁﻥ ﺍﺳ ﺮﯾﻦﺷﺎﺕ ﺗﻬﯿﻪ ﮐﻨﯿﺪ‪.‬‬
‫ﭘﯿﺸﻨﻬﺎﺩ ﻣﺎ ﺍﯾﻦ ﺍﺳﺖ ﮐﻪ ﻧﺴﺨەﯼ ‪ ۱۲‬ﺗﻮﺯﯾﻊ ‪ Debian‬ﺍﺳﺘﻔﺎﺩﻩ ﮐﻨﯿﺪ‪ .‬ﺩﺭ ﺻﻮﺭﺗ ﮐﻪ ﺍﺯ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﻟﯿﻨﻮﮐﺲ ﺍﺳﺘﻔﺎﺩﻩ‬
‫ﻧﻤ ﮐﻨﯿﺪ ﻣ ﺗﻮﺍﻧﯿﺪ ﺑﻪ ﮐﻤ ﻟﯿﻨﮏ ﺯﯾﺮ ﯾ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ ‪ Debian‬ﺑﺎﻻ ﺑﯿﺎﻭﺭﯾﺪ‪:‬‬
‫‪https://www.makeuseof.com/how-to-install-debian-on-virtualbox/‬‬
‫‪ $‬ﻣ ﺑﯿﻨﯿﺪ ﮐﻪ ﻧﺸﺎﻥ ﺩﻫﻨﺪەﯼ ﺧﻂ ﻓﺮﻣﺎﻥ‬ ‫ﺏ⁃ ﺩﺭ ﺍﺑﺘﺪﺍ ﺯﻣﺎﻧ ﮐﻪ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﺑﺎﻻ ﻣ ﺁﯾﺪ ﻭ ﺩﺳﺘﺮﺳ ‪ shell‬ﻓﻌﺎﻝ ﻣ ﺷﻮﺩ ﯾ‬
‫ﺷﻤﺎ ﺍﺳﺖ‪ .‬ﺑﺎ ﺗﻐﯿﯿﺮ ﺑﺮﻧﺎﻣەﯼ ‪ sh‬ﺍﺳﻢ ﺧﻮﺩ ﺭﺍ ﻗﺒﻞ ﺍﺯ ‪ $‬ﺑﻨﻮﯾﺴﯿﺪ‪.‬‬
‫ﺭﺍﻫﻨﻤﺎﯾﯽ‪ :‬ﺑﺮﺍﯼ ﺍﯾﻦ ﮐﺎﺭ ﻓﺎﯾﻞ ‪ sh.c‬ﺭﺍ ﺩﺭ ﭘﻮﺷەﯼ ‪ user‬ﻧﮕﺎﻩ ﮐﻨﯿﺪ‪ .‬ﺷﻤﺎ ﺑﺎﯾﺪ ﺑﻪ ﺩﻧﺒﺎﻝ ﻓﺮﺍﺧﻮﺍﻧ ﻧﻮﺷﺘﻨ ﺩﺭ ﺍﯾﻦ ﻓﺎﯾﻞ‬
‫ﺑﺎﺷﯿﺪ ﮐﻪ ﻣﺴﺌﻮﻝ ﭼﺎﭖ ‪ $‬ﺍﺳﺖ‪ .‬ﺑﺮﺍﯼ ﺍﻃﻼﻋﺎﺕ ﺑﯿﺸﺘﺮ ﺑﻪ ﻟﯿﻨﮏ ﺯﯾﺮ ﻣﺮﺍﺟﻌﻪ ﮐﻨﯿﺪ‪:‬‬
‫‪https://man7.org/linux/man-pages/man2/write.2.html‬‬
‫ﺝ⁃ ﺍﺧﺘﯿﺎﺭﯼ‪ :‬ﺍﻭﻟﯿﻦ ﭘﺎﺭﺍﻣﺘﺮ ﺗﺎﺑﻊ ‪ write‬ﺩﺭ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ‪ xv6‬ﻭ ‪ Linux‬ﭼﯿﺴﺖ؟ ﺩﺭ ﻓﺎﯾﻞ ‪ sh.c‬ﻣﺸﺎﻫﺪﻩ ﻣ ﺷﻮﺩ ﮐﻪ ﻣﻘﺪﺍﺭ‬
‫ﺍﯾﻦ ﺁﺭﮔﻮﻣﺎﻥ ‪ ۲‬ﺍﺳﺖ‪ .‬ﭼﺮﺍ؟‬
‫ﺩ⁃ ﺍﺧﺘﯿﺎﺭﯼ‪ :‬ﺳﯿﺴﺘﻢﻋﺎﻣﻞﻫﺎﯼ ‪ POSIX-compliant‬ﭼﻪ ﺳﯿﺴﺘﻢﻋﺎﻣﻞﻫﺎﯾﯽ ﻫﺴﺘﻨﺪ؟‬

‫‪ .۲‬ﺍﺯ ﺍﯾﻦ ﭘﺲ ﺩﺭ ﺗﻤﺮﯾﻦ ﻋﻤﻠ ﺩﻭﻡ‪ ،‬ﺍﻗﺪﺍﻡ ﺑﻪ ﻓﺮﺍﮔﯿﺮﯼ ﻗﺎﺑﻠﯿﺖﻫﺎﯼ ﻋﻤﻮﻣ ﻭ ﭘﺮﮐﺎﺭﺑﺮﺩ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ‪ GNU Linux‬ﺧﻮﺍﻫﯿﻢ‬
‫ﮐﺮﺩ‪ .‬ﺳﯿﺴﺘﻢﻋﺎﻣﻞﻫﺎﯼ ﻣﺒﺘﻨ ﺑﺮ ﮐﺮﻧﻞ ﻟﯿﻨﻮﮐﺲ ﺗﻨﻮﻉ ﺑﺎﻻﯾﯽ ﺩﺍﺭﻧﺪ ﻭ ﻫﻤ ﺑﺮ ﻣﺒﻨﺎﯼ ﯾ ﻫﺴﺘﻪ ﯾ ﺴﺎﻥ ﺗﻮﺳﻌﻪ ﯾﺎﻓﺘەﺍﻧﺪ‪ .‬ﺍﺑﺘﺪﺍ‬
‫ﮐﻠﯿﺪﻭﺍﮊەﯼ ‪ GNU Linux‬ﺭﺍ ﺟﺴﺘﺠﻮ ﮐﺮﺩﻩ ﻭ ﺩﺭ ﭘﺎﺳﺦ ﺗﻤﺮﯾﻦ ﺧﻮﺩ ﺑﻨﻮﯾﺴﯿﺪ ﮐﺪﺍﻡ ﯾ ﺍﺯ ﺗﻮﺯﯾﻊﻫﺎﯼ ‪Debian, Red Hat,‬‬
‫‪ Android‬ﺟﺰﻭ ﺍﯾﻦ ﺩﺳﺘﻪ ﻫﺴﺘﻨﺪ‪.‬‬
‫ﺩﺭ ﺍﺩﺍﻣﻪ‪ ،‬ﺍﻗﺪﺍﻡ ﺑﻪ ﺭﺍەﺍﻧﺪﺍﺯﯼ ﯾ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ ‪ ۹ Ubuntu 20.04 Desktop‬ﻣ ﮐﻨﯿﻢ‪ .‬ﺗﻮﺟﻪ ﺩﺍﺷﺘﻪ ﺑﺎﺷﯿﺪ ﮐﻪ ﺍﯾﻦ ﻣﺎﺷﯿﻦ‬
‫ﻣﺠﺎﺯﯼ ﺩﺭ ﺗﻤﺎﺭﯾﻦ ﺑﻌﺪﯼ ﺍﺳﺘﻔﺎﺩﻩ ﺧﻮﺍﻫﺪ ﺷﺪ‪ .‬ﻧﺴﺨەﯼ ﺍﻧﺘﺨﺎﺑﯽ ﺷﺎﻣﻞ ﮐﺮﻧﻞ ﻟﯿﻨﻮﮐﺲ ﻧﺴﺨەﯼ ‪ ۵‬ﺍﺳﺖ ﮐﻪ ﺑﺮﺍﯼ ﺗﻤﺮﯾﻨﺎﺕ ﺁﯾﻨﺪﻩ‬
‫ﺿﺮﻭﺭﯼ ﺍﺳﺖ‪ .‬ﺍﺯ ﻧﺼﺐ ﻧﺴﺨەﻫﺎﯼ ﺟﺪﯾﺪﺗﺮ ﯾﺎ ﻗﺪﯾﻤ ﺗﺮ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﻭ ﻫﻤﭽﻨﯿﻦ ﺍﺯ ﺁﭘﺪﯾﺖ ﮐﺮﻧﻞ ﺑﻌﺪ ﺍﺯ ﻧﺼﺐ ﺍﮐﯿﺪﺍﹰ ﺧﻮﺩﺩﺍﺭﯼ‬
‫ﻓﺮﻣﺎﯾﯿﺪ‪ .‬ﺣﺘﻤﺎﹰ ﺑﺮﺍﯼ ﺍﻧﺠﺎﻡ ﺑﺨﺶ ﻋﻤﻠ ﺩﻭﻡ ﺩﺭ ﻫﺮ ﺳﺮﯼ ﺗﻤﺮﯾﻦ ﺍﺯ ﺍﯾﻦ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﺑەﺻﻮﺭﺕ ﻣﺠﺎﺯﯼ ﺍﺳﺘﻔﺎﺩﻩ ﮐﻨﯿﺪ‪ .‬ﺩﺭ ﺍﺩﺍﻣﻪ‬
‫ﺍﺯ ﺑﺮﺧ ﻗﺎﺑﻠﯿﺖﻫﺎﯼ ﻣﺠﺎﺯﯼﺳﺎﺯﯼ ﺍﺳﺘﻔﺎﺩﻩ ﺧﻮﺍﻫﯿﺪ ﮐﺮﺩ‪.‬‬
‫ﺑﺮﺍﯼ ﻣﺠﺎﺯﯼﺳﺎﺯﯼ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﻣ ﺗﻮﺍﻧﯿﺪ ﺍﺯ ﺍﺑﺰﺍﺭﻫﺎﯼ ﻣﺠﺎﺯﯼﺳﺎﺯﯼ ﻣﺎﻧﻨﺪ ‪ VMware, Parallels, VirtualBox‬ﻭ ﯾﺎ‬
‫ﺍﺑﺰﺍﺭﻫﺎﯼ ﻣﺸﺎﺑﻪ ﺍﺳﺘﻔﺎﺩﻩ ﮐﻨﯿﺪ‪ .‬ﺗﻮﺻﯿﻪ ﻣ ﺷﻮﺩ ﺍﺯ ﺷﺒﯿەﺳﺎﺯ ‪ Qemu‬ﺍﺳﺘﻔﺎﺩﻩ ﮐﻨﯿﺪ‪ ،‬ﺯﯾﺮﺍ ﺑﺨﺸ ﺍﺯ ﭘﺮﻭﮊەﻫﺎﯼ ﺍﻧﺘﻬﺎﯾﯽ ﺗﺮﻡ ﺑەﻃﻮﺭ‬
‫ﺧﺎﺹ ﺑﺮ ﻣﺒﻨﺎﯼ ﺍﯾﻦ ﺷﺒﯿەﺳﺎﺯ ﻃﺮﺍﺣ ﺷﺪەﺍﻧﺪ‪ .‬ﺑﺮﺍﯼ ﻣﻄﺎﻟﻌﻪ ﺑﯿﺸﺘﺮ ﺩﺭ ﻣﻮﺭﺩ ﺍﯾﻦ ﺷﺒﯿەﺳﺎﺯ ﻣ ﺗﻮﺍﻧﯿﺪ ﺑﻪ ﻭﺑﺴﺎﯾﺖ ‪qemu.org‬‬
‫ﻣﺮﺍﺟﻌﻪ ﮐﻨﯿﺪ‪.‬‬

‫ﻣﻨﺎﺑﻊ ﻣﻮﺭﺩ ﻧﯿﺎﺯ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ‪:‬‬

‫ﺑﺎ ﺗﻮﺟﻪ ﺑﻪ ﻧﯿﺎﺯﻫﺎﯼ ﭘﺮﺩﺍﺯﺷ ﻭ ﺫﺧﯿﺮەﺳﺎﺯﯼ ﺗﻤﺎﺭﯾﻦ ﺑﻌﺪﯼ‪ ،‬ﺣﺪﺍﻗﻞ ﻓﻀﺎﯼ ‪ ۴۰‬ﮔﯿ ﺎﺑﺎﯾﺖ ﺑﻪ ﺍﯾﻦ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ ﺍﺧﺘﺼﺎﺹ‬
‫ﺩﻫﯿﺪ‪ .‬ﭘﯿﺸﻨﻬﺎﺩ ﻣ ﺷﻮﺩ ﺑﺮﺍﯼ ﺣﺎﻓﻈﻪ ‪ RAM‬ﻭ ﺗﻌﺪﺍﺩ ﺭﺷﺘەﻫﺎﯼ ﭘﺮﺩﺍﺯﺷ ‪ ،‬ﺣﺪﺍﻗﻞ ‪ ۲‬ﺭﺷﺘﻪ ﭘﺮﺩﺍﺯﺷ ﻭ ‪ ۴‬ﮔﯿ ﺎﺑﺎﯾﺖ ﺣﺎﻓﻈﻪ‬
‫ﺑﺮﺍﯼ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ ﻣﯿﺰﺑﺎﻥ ﮐﻨﺎﺭ ﺑ ﺬﺍﺭﯾﺪ‪ .‬ﺑەﻋﻨﻮﺍﻥ ﻣﺜﺎﻝ‪ ،‬ﺍﮔﺮ ﺳﯿﺴﺘﻢ ﺷﻤﺎ ﺷﺎﻣﻞ ‪ ۸‬ﮔﯿ ﺎﺑﺎﯾﺖ ﺣﺎﻓﻈﻪ ﻭ ‪ ۸‬ﺭﺷﺘﻪ ﭘﺮﺩﺍﺯﺷ ﺍﺳﺖ‪،‬‬
‫ﻣﻘﺪﺍﺭ ‪ ۴‬ﮔﯿ ﺎﺑﺎﯾﺖ ﺣﺎﻓﻈﻪ ﻭ ‪ ۶‬ﺭﺷﺘﻪ ﺑﻪ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ ﺍﺧﺘﺼﺎﺹ ﺩﻫﯿﺪ‪.‬‬

‫‪9‬‬
‫‪ftp://ftp.sharif.ir/OS/Linux/ubuntu-20.04-desktop-amd64.iso‬‬
‫ﺻﻔﺤﻪ ‪ ۵‬ﺍﺯ ‪۷‬‬ ‫ﺩﺭﺱ ﺳﯿﺴﺘﻢ ﻋﺎﻣﻞ‬

‫ﭘﯿﺸﻨﻬﺎﺩﺍﺕ ﻧﺼﺐ ﺍﻭﺑﻮﻧﺘﻮ‪:‬‬


‫ﺩﺭ ﻫﻨﮕﺎﻡ ﻧﺼﺐ ﺍﻭﺑﻮﻧﺘﻮ ﺑﺮ ﺭﻭﯼ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ‪ ،‬ﭘﯿﺸﻨﻬﺎﺩ ﻣ ﺷﻮﺩ ﮔﺰﯾﻨەﻫﺎﯼ ﺯﯾﺮ ﺍﻧﺘﺨﺎﺏ ﺷﻮﻧﺪ‪ .‬ﺑﺎ ﺍﻧﺘﺨﺎﺏ ﻧﺴﺨەﯼ ‪ⅿiniⅿaⅼ،‬‬
‫ﺍﺑﺰﺍﺭﻫﺎﯼ ﻏﯿﺮﺿﺮﻭﺭﯼ ﻧﺼﺐ ﻧﺸﺪﻩ ﻭ ﻓﻀﺎﯼ ﮐﻤﺘﺮﯼ ﺍﺷﻐﺎﻝ ﻣ ﺷﻮﺩ‪ .‬ﻫﻤﭽﻨﯿﻦ ﺑﺎ ﺍﻧﺘﺨﺎﺏ ﻧﺼﺐ ﺑەﺭﻭﺯﺭﺳﺎﻧ ﻫﺎ ﺩﺭ ﺣﯿﻦ ﻧﺼﺐ‪،‬‬
‫ﺑﺴﺘەﻫﺎ ﺑﻪ ﺁﺧﺮﯾﻦ ﻧﺴﺨەﯼ ﻣﻮﺟﻮﺩ ﻭ ﺳﺎﺯﮔﺎﺭ ﺧﻮﺩ ﺑﺮﻭﺯﺭﺳﺎﻧ ﺧﻮﺍﻫﻨﺪ ﺷﺪ‪.‬‬

‫ﺷ ﻞ ‪ :۲‬ﺗﻨﻈﯿﻤﺎﺕ ﻧﺼﺐ ﭘ ﯿﺞﻫﺎ ﻭ ﺑەﺭﻭﺯﺭﺳﺎﻧ ﻫﺎﯼ ﺍﻭﺑﻮﻧﺘﻮ‬

‫ﭘﺎﺭﺗﯿﺸﻦ ﻣﻮﺭﺩ ﺍﺳﺘﻔﺎﺩﻩ ﻗﺮﺍﺭ ﻣ ﮔﯿﺮﺩ‪.‬‬ ‫ﺑﺎ ﺍﻧﺘﺨﺎﺏ ﮔﺰﯾﻨەﯼ ﺯﯾﺮ‪ ،‬ﮐﻞ ﻓﻀﺎﯼ ﺍﺧﺘﺼﺎﺹ ﺩﺍﺩﻩ ﺷﺪﻩ ﺑﻪ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ ﺗﺤﺖ ﯾ‬

‫ﺷ ﻞ ‪ :۳‬ﺗﻨﻈﯿﻤﺎﺕ ﭘﺎﺭﺗﯿﺸﻦﺑﻨﺪﯼ ﺳﯿﺴﺘﻢﻋﺎﻣﻞ‬

‫ﺩﺭ ﻧﻬﺎﯾﺖ‪ ،‬ﺑﺮﺍﯼ ﺍﻧﺘﺨﺎﺏ ﻧﺎﻡ ﮐﺎﺭﺑﺮﯼ ﻭ ﻧﺎﻡ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ‪ ،‬ﺍﺯ ﻧﺎﻡ ﻭ ﺷﻤﺎﺭﻩ ﺩﺍﻧﺸﺠﻮﯾﯽ ﺍﻋﻀﺎﯼ ﺗﯿﻢ ﺍﺳﺘﻔﺎﺩﻩ ﮐﻨﯿﺪ‪.‬‬
‫ﺻﻔﺤﻪ ‪ ۶‬ﺍﺯ ‪۷‬‬ ‫ﺩﺭﺱ ﺳﯿﺴﺘﻢ ﻋﺎﻣﻞ‬

‫ﺷ ﻞ ‪ :۴‬ﺗﻨﻈﯿﻤﺎﺕ ﻧﺎﻡ ﮐﺎﺭﺑﺮﯼ ﻭ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ‬

‫ﺗﺴﺖ ﻧﺴﺨەﯼ ﮐﺮﻧﻞ‪:‬‬


‫ﭘﺲ ﺍﺯ ﻧﺼﺐ ﻣﺎﺷﯿﻦ ﻣﺠﺎﺯﯼ ﻭ ﺭﺍەﺍﻧﺪﺍﺯﯼ ﻣﺠﺪﺩ ‪ ۱۰‬ﺷﺪﻥ ﺁﻥ‪ ،‬ﺑﺎ ﻓﺸﺮﺩﻥ ﮐﻠﯿﺪﻫﺎﯼ ‪ Ctrl + Alt + t‬ﻣ ﺗﻮﺍﻧﯿﺪ ﯾ ﺗﺮﻣﯿﻨﺎﻝ‬
‫ﺑﺎﺯ ﮐﺮﺩﻩ ﻭ ﺑﺎ ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ﺩﺳﺘﻮﺭ ‪ uname -r‬ﻧﺴﺨەﯼ ﻫﺴﺘﻪ ﺭﺍ ﻣﺸﺎﻫﺪﻩ ﮐﻨﯿﺪ‪ .‬ﺩﻗﺖ ﮐﻨﯿﺪ ﮐﻪ ﻧﺴﺨەﯼ ﻣﻄﻠﻮﺏ ﺑﺮﺍﯼ ﺗﻤﺎﺭﯾﻦ‬
‫ﻋﻤﻠ ﺩﻭﻡ‪ ،‬ﻧﺴﺨەﻫﺎﯼ ﮐﺮﻧﻞ ‪ ۵‬ﻟﯿﻨﻮﮐﺲ ﻣ ﺑﺎﺷﺪ‪.‬‬

‫ﺩﺍﯾﺮﮐﺘﻮﺭﯼﻫﺎﯼ ﺭﯾﺸەﯼ ‪Linux‬‬


‫ﺩﺭﺑﺎﺭەﯼ ﺍﯾﻦ ﺩﺍﯾﺮﮐﺘﻮﺭﯼﻫﺎﯼ ﺭﯾﺸەﯼ ‪ Linux‬ﺗﺤﻘﯿﻖ ﮐﻨﯿﺪ ﻭ ﮐﺎﺭﺑﺮﺩﺷﺎﻥ ﺭﺍ ﺑﻨﻮﯾﺴﯿﺪ‪:‬‬
‫ﺁ⁃ ‪) /proc‬ﺗﻔﺎﻭﺕ ﺩﺍﯾﺮﮐﺘﻮﺭﯼﻫﺎﯼ ﻋﺪﺩﯼ ﻭ ﺑﺎﻗ ﻓﺎﯾﻞﻫﺎﯼ ﺍﯾﻦ ﺩﺍﯾﺮﮐﺘﻮﺭﯼ ﺭﺍ ﺑﯿﺎﻥ ﮐﻨﯿﺪ(‬
‫ﺏ⁃ ‪) /bin‬ﺗﻔﺎﻭﺗﺶ ﺭﺍ ﺑﺎ ‪ /usr/bin‬ﻭ ‪ /usr/local/bin‬ﺑﯿﺎﻥ ﮐﻨﯿﺪ(‬
‫ﻧﻤﻮﻧﻪ ﺩﺭ ﺍﯾﻦ ﺩﺍﯾﺮﮐﺘﻮﺭﯼ‬ ‫ﺝ⁃ ‪) /dev‬ﺗﻔﺎﻭﺕ ‪ Character Device‬ﻭ ‪ Block Device‬ﺭﺍ ﺑ ﻮﯾﯿﺪ‪ ،‬ﻭ ﺍﺯ ﻫﺮ ﮐﺪﺍﻡ ﯾ‬
‫ﻣﺜﺎﻝ ﺑﺰﻧﯿﺪ(‬
‫ﺩ⁃ ‪) /boot‬ﻓﺎﯾﻞﻫﺎﯼ ‪ ،config ،initrd ،System.Map‬ﻭ ‪ vmlinuz‬ﺭﺍ ﺷﺮﺡ ﺩﻫﯿﺪ(‬
‫ﻩ⁃ ‪) /usr‬ﮐﺎﺭﺑﺮﺩ ‪ /usr/lib‬ﻭ ‪ /usr/share‬ﺭﺍ ﺑﻪ ﻃﻮﺭ ﺧﺎﺹ ﻣﺸﺨﺺ ﮐﻨﯿﺪ(‬
‫ﻭ⁃ ‪/etc‬‬
‫ﺯ⁃ ‪) /var‬ﮐﺎﺭﺑﺮﺩ ‪ /var/log‬ﻭ ‪ /var/crash‬ﺭﺍ ﺑﻪ ﻃﻮﺭ ﺧﺎﺹ ﻣﺸﺨﺺ ﮐﻨﯿﺪ(‬
‫ﺡ⁃ ‪/media‬‬

‫ﺁﺷﻨﺎﯾﯽ ﺑﺎ ﺩﺳﺘﻮﺭﻫﺎﯼ ﭘﺎﯾەﯼ ‪Linux‬‬


‫ﺁ⁃ ﺩﺳﺘﻮﺭﻫﺎﯼ ﺯﯾﺮ ﺩﺭﺑﺎﺭەﯼ ﻣﺸﺨﺼﺎﺕ ﮐﺎﻣﭙﯿﻮﺗﺮ ﻫﺴﺘﻨﺪ‪ .‬ﺁﻥﻫﺎ ﺭﺍ ﺍﺟﺮﺍ ﮐﻨﯿﺪ ﻭ ﺩﺭﺑﺎﺭەﯼ ﮐﺎﺭﺑﺮﺩ ﻭ ﺧﺮﻭﺟ ﻫﺮ ﮐﺪﺍﻡ ﺗﻮﺿﯿﺢ‬
‫ﺩﻫﯿﺪ‪lsblk, lscpu, lspci, lsusb, ifconfig, free :‬‬
‫‪10‬‬
‫‪Restart‬‬
‫ﺻﻔﺤﻪ ‪ ۷‬ﺍﺯ ‪۷‬‬ ‫ﺩﺭﺱ ﺳﯿﺴﺘﻢ ﻋﺎﻣﻞ‬

‫ﺏ⁃ ﺩﺳﺘﻮﺭ ‪ top‬ﺭﺍ ﺍﺟﺮﺍ ﮐﻨﯿﺪ ﻭ ﺧﺮﻭﺟ ﺁﻥ ﺭﺍ ﺗﻮﺿﯿﺢ ﺩﻫﯿﺪ‪.‬‬


‫ﺝ⁃ ﮐﺎﺭﮐﺮﺩ ﺩﺳﺘﻮﺭﻫﺎﯼ ‪sudo, man, ls, echo, cat, cd, mkdir, touch, head, tail, chown, chmod, wc,‬‬
‫‪ grep‬ﺭﺍ ﺑﻪ ﻃﻮﺭ ﺧﻼﺻﻪ ﺑﯿﺎﻥ ﮐﻨﯿﺪ‪.‬‬
‫ﺩ⁃ ﮐﺎﺭﮐﺮﺩ ﻋﻤﻠ ﺮﻫﺎﯼ )> >(‪ pipe (|), redirect(>), append‬ﺭﺍ ﺗﺸﺮﯾﺢ ﮐﻨﯿﺪ‪.‬‬
‫ﻩ⁃ ﺑﺎ ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ﺩﺳﺘﻮﺭﻫﺎ ﻭ ﻋﻤﻠ ﺮﻫﺎﯼ ﮔﻔﺘﻪ ﺷﺪﻩ‪ ،‬ﻭ ﺩﺭ ﺻﻮﺭﺕ ﻧﯿﺎﺯ ﺟﺴﺖﻭﺟﻮ ﺩﺭ ﻣﻨﺎﺑﻊ ﺍﯾﻨﺘﺮﻧﺘ ‪ ،‬ﮐﺪﯼ ﺑﻪ ﺯﺑﺎﻥ ‪Bash‬‬
‫ﺑﺮﺍﯼ ﺍﯾﻦ ﺳﻨﺎﺭﯾﻮ ﺑﻨﻮﯾﺴﯿﺪ‪:‬‬
‫)ﺁ( ﮐﺎﺭﺑﺮ ﺑﻪ ﺩﺍﯾﺮﮐﺘﻮﺭﯼ ﺧﺎﻧﻪ ﻣ ﺭﻭﺩ ﻭ ﻣﺠﻤﻮﻉ ﺗﻌﺪﺍﺩ ﻓﺎﯾﻞﻫﺎ ﻭ ﺩﺍﯾﺮﮐﺘﻮﺭﯼﻫﺎﯼ ﺁﻧﺠﺎ ﺭﺍ ﭼﺎﭖ ﻣ ﮐﻨﺪ‪.‬‬
‫)ﺏ( ﺳﭙﺲ ﯾ ﺩﺍﯾﺮﮐﺘﻮﺭﯼ ﺑﺎ ﻧﺎﻡ ‪ test‬ﻣ ﺳﺎﺯﺩ ﻭ ﺩﺭ ﺁﻥ ﻓﺎﯾﻞﻫﺎﯼ ‪ a.sh ،log.txt‬ﻭ ‪ b.sh‬ﺭﺍ ﻣ ﺳﺎﺯﺩ‪ .‬ﻓﺎﯾﻞﻫﺎﯼ ‪a.sh‬‬
‫ﻭ ‪ b.sh‬ﺭﺍ ﺑﻪ ﺣﺎﻟﺖ ﺍﺟﺮﺍﭘﺬﯾﺮ ﺩﺭ ﻣ ﺁﻭﺭﺩ‪.‬‬
‫)ﺝ( ﮐﺪﯼ ﺩﺭ ‪ a.sh‬ﻭﺍﺭﺩ ﻣ ﮐﻨﺪ ﮐﻪ ﯾ ﻭﺭﻭﺩﯼ ﺑ ﯿﺮﺩ ﻭ ﺁﻥ ﺭﺍ ﺩﺭ ﯾ ﺳﻄﺮ ﻣﺠﺰﺍ ﺩﺭ ﺍﻧﺘﻬﺎﯼ ‪ log.txt‬ﺑﻨﻮﯾﺴﺪ‪.‬‬
‫ﻭﺭﻭﺩﯼ ﺑ ﯿﺮﺩ ﻭ ﺍﻭﻟﯿﻦ ﺳﻄﺮﯼ ﺍﺯ ‪ log.txt‬ﺭﺍ ﭼﺎﭖ ﮐﻨﺪ ﮐﻪ ﺷﺎﻣﻞ ﺁﻥ ﻭﺭﻭﺩﯼ‬ ‫)ﺩ( ﮐﺪﯼ ﺩﺭ ‪ b.sh‬ﻭﺍﺭﺩ ﻣ ﮐﻨﺪ ﮐﻪ ﯾ‬
‫ﺍﺳﺖ‪.‬‬
‫)ﻩ( ﺳﻪ ﺑﺎﺭ ﮐﺪ ‪ a.sh‬ﺭﺍ ﺑﺎ ﺳﻪ ﻭﺭﻭﺩﯼ ‪ hello, here, there‬ﺍﺟﺮﺍ ﻣ ﮐﻨﺪ‪.‬‬
‫)ﻭ( ﺳﻪ ﺑﺎﺭ ﮐﺪ ‪ b.sh‬ﺭﺍ ﺑﺎ ﺳﻪ ﻭﺭﻭﺩﯼ ‪ ere, hell, xyz‬ﺍﺟﺮﺍ ﻣ ﮐﻨﺪ‪.‬‬

You might also like