操作系統(tǒng)還行的課件os012mass storage system_第1頁
操作系統(tǒng)還行的課件os012mass storage system_第2頁
操作系統(tǒng)還行的課件os012mass storage system_第3頁
操作系統(tǒng)還行的課件os012mass storage system_第4頁
操作系統(tǒng)還行的課件os012mass storage system_第5頁
已閱讀5頁,還剩74頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、12.2Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n文件系統(tǒng)從邏輯上來看,可以分成3大部分lCh10. 用戶和程序所使用的文件系統(tǒng)接口lCh11.操作系統(tǒng)實現(xiàn)文件系統(tǒng)該接口所用到的數(shù)據結構和算法lCh12.最底層存儲結構:次級和3級存儲結構= todays topic12.3Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005Chapter 12: M

2、ass-Storage SystemsnOverview of Mass Storage Structure 大容量存儲器據結構簡介nDisk Structure 磁盤結構nDisk Attachment 磁盤與系統(tǒng)的連接(附屬)nDisk Scheduling 磁盤調度nDisk Management 磁盤管理nSwap-Space Management 交換空間管理nRAID Structure RAID結構nStable-Storage Implementation 穩(wěn)定存儲實現(xiàn)nTertiary Storage Devices 三級存儲結構12.4Silberschatz, Galvi

3、n and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nMagnetic disks provide bulk of secondary storage of modern computers磁盤為現(xiàn)代計算機系統(tǒng)提供了大容量的外存lDrives rotate at 60 to 200 times per second 每秒旋轉速度lTransfer rate is rate at which data flow between drive and computer 傳輸速度:在驅動器和計算機之間的數(shù)據傳輸速率lPos

4、itioning time (random-access time) is time to move disk arm to desired cylinder (seek time) and time for desired sector to rotate under the disk head (rotational latency)定位時間(隨機訪問時間):尋道時間+旋轉等待時間lHead crash results from disk head making contact with the disk surface 磁頭碰撞:可能損壞磁盤4Thats badnDisks can be

5、 removablenDrive attached to computer via I/O bus 磁盤驅動器通過磁盤驅動器通過I/O總線與計算機相連總線與計算機相連lBusses vary, including EIDE, ATA, SATA, USB, Fibre Channel, SCSIlHost controller in computer uses bus to talk to disk controller built into drive or storage array 主機控制器通過總線與磁盤控制器相連12.5Silberschatz, Galvin and Gagne 2

6、005Operating System Concepts 7th Edition, Jan 1, 200512.6Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nMagnetic tape磁帶:早期使用,主要用于備份lWas early secondary-storage mediumlRelatively permanent and holds large quantities of datalAccess time slowlRandom access 1000 ti

7、mes slower than disklMainly used for backup, storage of infrequently-used data, transfer medium between systemslKept in spool and wound or rewound past read-write headlOnce data under head, transfer rates comparable to diskl20-200GB typical storagelCommon technologies are 4mm, 8mm, 19mm, LTO-2 and S

8、DLT12.7Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nDisk drives are addressed as large 1-dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer. 磁盤驅動器可以看作是一個一維的邏輯塊的數(shù)組,邏輯塊是最小的傳輸單位nThe 1-dimensional array of logical block

9、s is mapped into the sectors of the disk sequentially.一維邏輯塊數(shù)組按順序映射到磁盤的扇區(qū)lSector 0 is the first sector of the first track on the outermost cylinder.扇區(qū)0是最外面柱面的第一個磁道的第一個扇區(qū)lMapping proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylind

10、ers from outermost to innermost.映射順序是先按磁道內扇區(qū)順序,再按柱面內磁道順序,最后按從外到內的柱面順序來排序的。12.8Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nThe operating system is responsible for using hardware efficiently for the disk drives, this means having a fast access time and disk ba

11、ndwidth.操作系統(tǒng)的任務之一就是有效的使用硬件。對于磁盤驅動器來說,意味著較快的訪問速度和較寬的磁盤帶寬nAccess time has two major components訪問時間分兩部分lSeek time is the time for the disk are to move the heads to the cylinder containing the desired sector.尋道時間lRotational latency is the additional time waiting for the disk to rotate the desired sector

12、 to the disk head.旋轉延遲nDisk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer.磁盤帶寬:傳遞的總字節(jié)數(shù)/服務請求開始到最后傳遞結束的總時間12.9Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2

13、005nSeveral algorithms exist to schedule the servicing of disk I/O requests. nWe illustrate them with a request queue (0-199).98, 183, 37, 122, 14, 124, 65, 67Head pointer 5312.10Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005Illustration shows total head moveme

14、nt of 640 cylinders.12.11Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005例:一個具有40個柱面的磁盤。假設一個讀柱面11上的數(shù)據塊的請求到達。當對柱面11尋道時,又順序到達了新的請求,要求對柱面1,36,16,34,9,12上的數(shù)據進行訪問。問磁頭總共需要移動多少個柱面?答案:11112.12Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1

15、, 2005n最短尋道時間優(yōu)先算法:nSelects the request with the minimum seek time from the current head position.選擇與磁頭位置最近的待處理請求nSSTF scheduling is a form of SJF scheduling; may cause starvation of some requests. 基本上是一種短作業(yè)有線調度,可能會產生饑餓nIllustration shows total head movement of 236 cylinders.12.13Silberschatz, Galvin

16、 and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.4 Disk Scheduling磁盤調度磁盤調度初始情況初始情況:磁頭位于53號磁道當前請求隊列中離磁頭位置最近的IO請求: 磁道65磁頭移動距離 = 65-53 = 12當前總移動距離 =1212.14Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.4 Disk Scheduling磁盤調度磁盤調度磁頭位于65號磁道當前請求隊列中

17、離磁頭位置最近的IO請求: 磁道67磁頭移動距離 = 67-65 = 2當前總移動距離 =12 + 2 = 1412.15Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.4 Disk Scheduling磁盤調度磁盤調度磁頭位于67號磁道當前請求隊列中離磁頭位置最近的IO請求: 磁道37磁頭移動距離 = 67-37 = 30當前總移動距離 =14+30 = 4412.16Silberschatz, Galvin and Gagne 2005Operating Syst

18、em Concepts 7th Edition, Jan 1, 200512.4 Disk Scheduling磁盤調度磁盤調度磁頭位于37號磁道當前請求隊列中離磁頭位置最近的IO請求: 磁道14磁頭移動距離 = 37-14 = 23當前總移動距離 =44+23 = 6712.17Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.4 Disk Scheduling磁盤調度磁盤調度磁頭位于14號磁道當前請求隊列中離磁頭位置最近的IO請求: 磁道98磁頭移動距離 = 98-

19、14 = 84當前總移動距離 =67+84 = 15112.18Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.4 Disk Scheduling磁盤調度磁盤調度磁頭位于98號磁道當前請求隊列中離磁頭位置最近的IO請求: 磁道122磁頭移動距離 = 122-98 = 24當前總移動距離 =151 + 24 = 17512.19Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition

20、, Jan 1, 200512.4 Disk Scheduling磁盤調度磁盤調度磁頭位于122號磁道當前請求隊列中離磁頭位置最近的IO請求: 磁道124磁頭移動距離 = 124-122 = 2當前總移動距離 =175+2 = 17712.20Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.4 Disk Scheduling磁盤調度磁盤調度磁頭位于124號磁道當前請求隊列中離磁頭位置最近的IO請求: 磁道183磁頭移動距離 = 183-124 = 59當前總移動距離

21、=177+59 = 23612.21Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005例:一個具有40個柱面的磁盤。假設一個讀柱面11上的數(shù)據塊的請求到達。當對柱面11尋道時,又順序到達了新的請求,要求對柱面1,36,16,34,9,12上的數(shù)據進行訪問。問磁頭總共需要移動多少個柱面?訪問序列:11,12,9,16,1,34,3612.22Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edit

22、ion, Jan 1, 2005nThe disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets to the other end of the disk, where the head movement is reversed and servicing continues.磁臂從磁盤的一端向另一端移動,當磁頭移過每一個柱面時,處理位于該柱面上的請求服務。當?shù)竭_另一端時,改變方向繼續(xù)處理nSometimes called the eleva

23、tor algorithm.12.23Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.24Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005例:一個具有40個柱面的磁盤。假設一個讀柱面11上的數(shù)據塊的請求到達。當對柱面11尋道時,又順序到達了新的請求,要求對柱面1,36,16,34,9,12上的數(shù)據進行訪問。問磁頭總共需要移動多少個柱面?訪問序列:

24、(最初方向向大柱面)11,12,14,34,36,(40),9,112.25Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nProvides a more uniform wait time than SCAN.提供了一種更均勻的等待時間nThe head moves from one end of the disk to the other. servicing requests as it goes. When it reaches the other end, ho

25、wever, it immediately returns to the beginning of the disk, without servicing any requests on the return trip.C-SCAN也是將磁頭從磁盤一端移到另一端,隨著移動不斷的處理請求。但是,當磁頭移到另一端時,會馬上返回到磁盤開始,返回時不處理請求nTreats the cylinders as a circular list that wraps around from the last cylinder to the first one.將柱面當作一個環(huán)鏈,最后的柱面和第一個相連12.2

26、6Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.27Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nVersion of C-SCANnArm only goes as far as the last request in each direction, then reverses direction immediately, without

27、first going all the way to the end of the disk. 磁頭只移動到一個方向上最遠的請求為止,接著馬上返回,而不是移動到磁盤的盡頭12.28Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.29Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nSSTF is common and has a natural a

28、ppeal SSTF較為普通且有吸引力nSCAN and C-SCAN perform better for systems that place a heavy load on the disk.對于負荷較大的系統(tǒng)執(zhí)行的好(無饑餓)nPerformance depends on the number and types of requests.性能主要依賴于請求的數(shù)量和類型nRequests for disk service can be influenced by the file-allocation method.受文件分配方法的影響nThe disk-scheduling algor

29、ithm should be written as a separate module of the operating system, allowing it to be replaced with a different algorithm if necessary.磁盤調度算法應作為操作系統(tǒng)的一個獨立模塊,這樣必要的時候可以替換為另一個算法nEither SSTF or LOOK is a reasonable choice for the default algorithm. SSTF和LOOK是比較合理的默認算法12.30Silberschatz, Galvin and Gagne

30、2005Operating System Concepts 7th Edition, Jan 1, 2005n為了減少旋轉延遲,對同一磁道上的連續(xù)讀寫信息進行合理分布稱為旋轉優(yōu)化。n例:一個磁道上有10個扇區(qū),有10個數(shù)據塊A,B,。,J存放在各個扇區(qū)內。如果按照從A到J的順序從0扇區(qū)開始依次存放,并且順序處理這些數(shù)據。12.31Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n當磁盤旋轉速度為20毫秒(一周),處理程序讀出每個記錄后花4毫秒時間處理。則讀出并處理數(shù)據塊A后

31、,將轉到數(shù)據塊D的開始,所以,為了讀出B,必須再轉一周。于是處理10個數(shù)據塊的總時間為:n10*(2(讀)+4(處理)+16(旋轉))=220ms12.32Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n如果采用旋轉優(yōu)化,采用這種順序存放:A,H,E,B,I,F(xiàn),C,J,G,D,則讀出A后,恰好轉到了B的開始。因此,總共的時間變成了n10*(2+4)=60ms12.33Silberschatz, Galvin and Gagne 2005Operating System

32、Concepts 7th Edition, Jan 1, 200512.34Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005習題習題12.35Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n什么是文件的邏輯結構和物理結構?l文件的邏輯結構是從用戶的角度看,一個文件是如何構成,一是把文件看成由若干個記錄構成的文件;二是把文件看成流式文件。l物理結構是從系

33、統(tǒng)的角度來看,一個文件所占盤塊在外存上的分布形式。有連續(xù)、鏈接、索引和混合等形式。12.36Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n什么是絕對路徑和相對路徑?l在樹型目錄結構中,從根開始的路徑名稱為絕對路徑;而相對于當前目錄(工作目錄)的路徑名為相對路徑。l假設當前目錄/home/wang/testl需要訪問當前目錄下的hello.cpp文件l絕對路徑為/home/wang/test/hello.cppl相對路徑為./hello.cpp12.37Silbersch

34、atz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n在linux系統(tǒng)中,把輸入輸出設備看作()A、普通文件B、目錄文件C、索引文件D、特殊文件n在linux中,按文件的內部構造和處理方式把文件分成3類:普通文件、目錄文件和特殊文件。特殊文件是為了統(tǒng)一管理I/O設備而對設備的抽象。12.38Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n( )不是文件系統(tǒng)的功能之一?A、方

35、便用戶使用信息B、提供用戶共享信息的手段C、提高信息安全程序D、分配磁盤的存儲空間E、驅動外部設備n了解文件系統(tǒng)的基本功能;還包括文件操作和使用。E不是。12.39Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n文件系統(tǒng)采用樹型目錄結構后,對于不同用戶的文件,其文件名()A、應該相同B 應該不同C、可以相同也可以不同D 受系統(tǒng)約束n答案:C12.40Silberschatz, Galvin and Gagne 2005Operating System Concepts 7

36、th Edition, Jan 1, 2005n從用戶角度看,文件系統(tǒng)主要是實現(xiàn)()單選A. 文件保護B. 文件保密C. 文件共享D. 按名存取n答案:D12.41Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n在文件管理中可以利用位示圖來實現(xiàn)()A、磁盤的調度B、磁盤空間的管理C、文件的存取D、文件目錄的查找n文件相應存儲空間常用的方法包括:空閑表法、空閑鏈法、位示圖和成組鏈接法n答案:B12.42Silberschatz, Galvin and Gagne 2005O

37、perating System Concepts 7th Edition, Jan 1, 2005n文件系統(tǒng)中用( )管理文件。A.作業(yè)控制塊B.外頁表C.目錄D.軟硬件結合的方法n答案:C12.43Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n物理文件的組成方式是由()確定的。A.應用程序B.主存容量C.外存容量D.操作系統(tǒng)n答案:D12.44Silberschatz, Galvin and Gagne 2005Operating System Concepts 7t

38、h Edition, Jan 1, 2005n若用8個字(字長32位)的位示圖管理內存,假定用戶歸還一個塊號為100的內存塊,它對應的位示圖的位置是()A.字號為3,位號為5B.字號為4,位號為4C.字號為3,位號為4D.字號為4,位號為5n答案:B12.45Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005文件的二級目錄結構由()和()組成。 A.根目錄B.子目錄C.主文件目錄D.用戶文件目錄E.當前目錄 n答案:C D12.46Silberschatz, Galvin a

39、nd Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005課堂作業(yè)課堂作業(yè)nP421 12.2 12.47Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nLow-level formatting, or physical formatting Dividing a disk into sectors that the disk controller can read and write.低級格式化(物理格

40、式化):把磁盤分成扇區(qū),以便于磁盤控制器讀和寫n每個扇區(qū)都有其數(shù)據結構l頭:包括組成扇區(qū)三維地址的三個數(shù)字:扇區(qū)所在的磁頭(或盤面)、磁道(或柱面號)以及扇區(qū)在磁道上的位置即扇區(qū)號。頭標中還包括一個字段,其中有顯示扇區(qū)是否能可靠存儲數(shù)據,或者是否已發(fā)現(xiàn)某個故障因而不宜使用的標記。有些硬盤控制器在扇區(qū)頭標中 還記錄有指示字,可在原扇區(qū)出錯時指引磁盤轉到替換扇區(qū)或磁道。最后,扇區(qū)頭標以循環(huán)冗余校驗(CRC)值作為結束,以供控制器檢驗扇區(qū)頭標的讀出情況, 確保準確無誤。l數(shù)據區(qū)域l尾:保護數(shù)據的糾錯碼(ECC)。在初始準備期間,計算機用512個虛擬信息字節(jié)(實際數(shù)據的存放地)和與這些虛擬信息字節(jié)相應

41、的ECC數(shù)字填入這個部分。12.48Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nTo use a disk to hold files, the operating system still needs to record its own data structures on the disk.lPartition the disk into one or more groups of cylinders.分區(qū):由一個或多個柱面構成lLogical formattin

42、g or “making a file system”.邏輯格式化:安裝文件系統(tǒng)12.49Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005n扇區(qū)到來時,磁盤控制器讀出每個扇區(qū)的頭標,把這些頭標中的地址信息與期待檢出的磁頭和柱面號做比較(即尋道),然后,尋找要求的扇區(qū)號。n找到扇區(qū)后,磁盤控制器必須在繼續(xù)尋找下一個扇區(qū)之前對該扇區(qū)的信息進行處理。如果是讀數(shù)據,控制器計算此數(shù)據的ECC碼,然后,把ECC碼與已記錄的ECC碼相比較。如果是寫數(shù)據,控制器計算出此數(shù)據的ECC碼,與數(shù)

43、據一起存儲。在控制器對此扇區(qū)中的數(shù)據進行必要處理期間,磁 盤繼續(xù)旋轉。12.50Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nBoot block initializes system.lThe bootstrap is stored in ROM.自舉保存在只讀存儲器(ROM)中l(wèi)Bootstrap loader program.自舉加載程序l啟動塊(主引導記錄MBR):磁盤的固定位置,放置引導程序,還包含硬盤分區(qū)列表和說明系統(tǒng)引導分區(qū)的標志l引導分區(qū):包含操作系統(tǒng)和

44、設備分配程序12.51Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.52Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005磁盤有移動部件并且容錯能力小,所以經常有缺陷扇磁盤有移動部件并且容錯能力小,所以經常有缺陷扇區(qū),壞扇區(qū)區(qū),壞扇區(qū)對于簡單磁盤如使用對于簡單磁盤如使用IDE 控制器的磁盤控制器的磁盤, 壞扇區(qū)可手壞扇區(qū)可手工處理工處理 forma

45、t, chkdsk更復雜的磁盤如更復雜的磁盤如 SCSI 磁盤磁盤, 利用利用扇區(qū)備用扇區(qū)備用 或或 扇區(qū)滑扇區(qū)滑動動 來處理壞扇區(qū)來處理壞扇區(qū)扇區(qū)備用扇區(qū)備用 可能會使操作系統(tǒng)的磁盤調度算法無效可能會使操作系統(tǒng)的磁盤調度算法無效硬錯誤硬錯誤12.53Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200553n交換空間交換空間:虛擬內存使用磁盤空間作為對主存的擴展虛擬內存使用磁盤空間作為對主存的擴展n交換空間可以兩種方式實現(xiàn)交換空間可以兩種方式實現(xiàn)l在普通文件系統(tǒng)上加以創(chuàng)建在普通

46、文件系統(tǒng)上加以創(chuàng)建4e.g. Windows family, Solaris 24簡單,效率低簡單,效率低l創(chuàng)建在獨立的磁盤分區(qū)上創(chuàng)建在獨立的磁盤分區(qū)上4e.g. Unix, Linux, Solaris 24優(yōu)化速度優(yōu)化速度12.54Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200554nSolaris 2 僅在一頁被交換出物理內存的時候分配交僅在一頁被交換出物理內存的時候分配交換空間,而不是在虛擬內存頁最初生成的時候換空間,而不是在虛擬內存頁最初生成的時候12.55Sil

47、berschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nLinuxLinux的內核態(tài)內存空間不允許換出的內核態(tài)內存空間不允許換出nLinuxLinux的交換空間:保存換出的頁面的交換空間:保存換出的頁面l使用整個塊設備,稱作交換設備使用整個塊設備,稱作交換設備l使用一個固定長度的文件,稱作交換文件使用一個固定長度的文件,稱作交換文件l交換設備和交換文件的內部格式是一致的交換設備和交換文件的內部格式是一致的l前前40964096個字節(jié)是一個以字符串個字節(jié)是一個以字符串“SWAP_SPAC

48、ESWAP_SPACE”結尾的結尾的位圖位圖l位圖的每一位對應于一個交換空間的頁面位圖的每一位對應于一個交換空間的頁面lLinuxLinux最多允許管理最多允許管理MAX_SWAPFILESMAX_SWAPFILES(缺省值為缺省值為8 8)個)個交換空間交換空間n交換設備遠比交換文件更加有效交換設備遠比交換文件更加有效12.56Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.57Silberschatz, Galvin and Gagne 2005Operating

49、 System Concepts 7th Edition, Jan 1, 2005nRAID multiple disk drives provides reliability via redundancy.nRAID is arranged into six different levels.12.58Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nSeveral improvements in disk-use techniques involve the use o

50、f multiple disks working cooperatively.nDisk striping uses a group of disks as one storage unit.nRAID schemes improve performance and improve the reliability of the storage system by storing redundant data.lMirroring or shadowing keeps duplicate of each disk.lBlock interleaved parity uses much less

51、redundancy.12.59Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.60Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 200512.61Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nWrite-ahead log sc

52、heme requires stable storage.nTo implement stable storage:lReplicate information on more than one nonvolatile storage media with independent failure modes.lUpdate information in a controlled manner to ensure that we can recover the stable data after any failure during data transfer or recovery.12.62

53、Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nLow cost is the defining characteristic of tertiary storage.nGenerally, tertiary storage is built using removable medianCommon examples of removable media are floppy disks and CD-ROMs; other types are available.12.

54、63Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nFloppy disk thin flexible disk coated with magnetic material, enclosed in a protective plastic case.lMost floppies hold about 1 MB; similar technology is used for removable disks that hold more than 1 GB.lRemovab

55、le magnetic disks can be nearly as fast as hard disks, but they are at a greater risk of damage from exposure.12.64Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nA magneto-optic disk records data on a rigid platter coated with magnetic material.lLaser heat is u

56、sed to amplify a large, weak magnetic field to record a bit.lLaser light is also used to read data (Kerr effect).lThe magneto-optic head flies much farther from the disk surface than a magnetic disk head, and the magnetic material is covered with a protective layer of plastic or glass; resistant to

57、head crashes.nOptical disks do not use magnetism; they employ special materials that are altered by laser light.12.65Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nThe data on read-write disks can be modified over and over.nWORM (“Write Once, Read Many Times”)

58、disks can be written only once.nThin aluminum film sandwiched between two glass or plastic platters.nTo write a bit, the drive uses a laser light to burn a small hole through the aluminum; information can be destroyed by not altered.nVery durable and reliable.nRead Only disks, such ad CD-ROM and DVD

59、, com from the factory with the data pre-recorded.12.66Silberschatz, Galvin and Gagne 2005Operating System Concepts 7th Edition, Jan 1, 2005nCompared to a disk, a tape is less expensive and holds more data, but random access is much slower.nTape is an economical medium for purposes that do not requi

60、re fast random access, e.g., backup copies of disk data, holding huge volumes of data.nLarge tape installations typically use robotic tape changers that move tapes between tape drives and storage slots in a tape library.lstacker library that holds a few tapeslsilo library that holds thousands of tap

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論