1 / 8

輔助記憶體

輔助記憶體. 磁碟的構造. 磁柱 (cylinder ). 磁區 (sector). 磁軌 (tr ack). 讀寫頭. 磁碟之存取時間. 磁碟之存取時間 access time = seek time + rotation time + transfer time. seek time :將讀寫頭移到資料所在的磁軌上方所需的時間 讀寫頭自最外圈移到最內圈所需時間的一半 。 rotation time :資料所在磁區回轉至讀寫頭下方所需的時間 磁碟回轉一圈所需時間的一半 。 transfer time :資料在磁碟與記憶體之間傳輸所需的時間

laird
Download Presentation

輔助記憶體

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 輔助記憶體

  2. 磁碟的構造 磁柱(cylinder) 磁區(sector) 磁軌(track) 讀寫頭

  3. 磁碟之存取時間 • 磁碟之存取時間 access time= seek time + rotation time + transfer time • seek time:將讀寫頭移到資料所在的磁軌上方所需的時間 • 讀寫頭自最外圈移到最內圈所需時間的一半。 • rotation time:資料所在磁區回轉至讀寫頭下方所需的時間 • 磁碟回轉一圈所需時間的一半。 • transfer time:資料在磁碟與記憶體之間傳輸所需的時間 • 其中以 seek time最為耗時!

  4. 磁碟之存取時間 • 例:有一磁碟機轉速為3600rpm,資料轉移(data transfer)為每秒三百萬位元組,而平均找尋時間(seek time)為16ms,則同一磁柱內的3000位元組之存取時間為多少? 解:seek time:題目已給16ms rotational time:3600rpm=每分鐘3600轉 ∴60sec/3600轉=0.0167sec/轉 =16.7ms/轉 rotational time=16.7/2=8.35ms data transfer time:3000/3000000=10-3s=1ms 存取時間為:16+8.35+1 = 25.35 ms#

  5. 磁碟之存取時間 • 練習:有一磁碟機轉速為5400rpm,資料轉移(data transfer)為每秒五百萬位元組,而讀寫頭自最外圈移至最內圈所需時間為30ms,則同一磁柱內的6000位元組之存取時間為多少? 解:seek time = 30/2 = 15 ms rotational time:5400rpm=每分鐘5400轉 ∴60sec/5400轉=0.0111sec/轉 =11.1ms/轉 rotational time=11.1/2=5.55ms data transfer time:6000/5000000=1.2x10-3s=1.2ms 存取時間為:15+5.55+1.2 = 21.75 ms#

  6. 磁碟的排程 • FCFS (First Come First Service) • 先來先做 • SSTF (Shortest Seek Time First) • 最短seek time優先 • SCAN 來回掃描法 • C-SCAN 單向掃描法

  7. 磁碟的排程 • 假設有下列依序磁軌存取請求:98, 183, 37, 122, 14, 124, 65, 67,若讀寫頭最初在53磁軌,試以下列磁碟排程法計算總共之移動磁軌數。 • FCFS • SSTF • SCAN • C-SCAN • FCFS:讀寫頭移動順序為: 53, 98, 183, 37, 122, 14, 124, 65, 67  ∴移動磁軌數=45+85+146+85+108+110+59+2=640 • SSTF:讀寫頭移動順序為: 53, 65, 67, 37, 14, 98, 122, 124, 183  ∴移動磁軌數=12+2+30+23+84+24+2+59=236 • SCAN:讀寫頭移動順序為: 53, 65, 67, 98, 122, 124, 183, 37, 14  ∴移動磁軌數=12+2+31+24+2+59+146+23=299 • C-SCAN:讀寫頭移動順序為: 53, 65, 67, 98, 122, 124, 183, 14, 37  ∴移動磁軌數=12+2+31+24+2+59+169+23=322

  8. 磁碟的排程 • 假設有下列依序磁軌存取請求:100, 181, 39, 120, 16, 122, 67, 69,若讀寫頭最初在55磁軌,試以下列磁碟排程法計算總共之移動磁軌數。 • FCFS • SSTF • SCAN • C-SCAN • FCFS: 616 • SSTF:204 • SCAN:236 • C-SCAN:

More Related