1 / 4

计算公式字符含义: b 为物理块的块号 p 为张号, P∈ ( 0,K-1) , K 为第几张。 m 为字数, m =60 n 为字长, n = 32

作业. 某系统的磁盘文件空间共有 80 个柱面,被划分成 20 道 / 柱面, 6 块 / 道, 1KB/ 块的等长物理块。每块用位示图( 64 字 / 张,使用 60 个字, 32 位 / 字,其它为控制信息)的相应位表示其空闲( 0 )或占用( 1 );试给出申请和归还一块的计算公式。. 计算公式字符含义: b 为物理块的块号 p 为张号, P∈ ( 0,K-1) , K 为第几张。 m 为字数, m =60 n 为字长, n = 32 i 为行号, i∈ ( 0,59) j 为列号, j ∈ ( 0,31) 分配: 所需位示图张数:

dakota
Download Presentation

计算公式字符含义: b 为物理块的块号 p 为张号, P∈ ( 0,K-1) , K 为第几张。 m 为字数, m =60 n 为字长, n = 32

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. 作业 • 某系统的磁盘文件空间共有80个柱面,被划分成20道/柱面,6块/道,1KB/块的等长物理块。每块用位示图(64字/张,使用60个字,32位/字,其它为控制信息)的相应位表示其空闲(0)或占用(1);试给出申请和归还一块的计算公式。

  2. 计算公式字符含义: b 为物理块的块号 p 为张号,P∈(0,K-1),K为第几张。 m 为字数,m =60 n 为字长,n = 32 i 为行号,i∈(0,59) j 为列号,j ∈(0,31) • 分配: 所需位示图张数: K=(80×20×6)/(60×32)= 5张 磁盘块号 b = n×i + j + p×m×n

  3. 第一种:磁盘物理块号按盘面号从小到大排列 盘面号 = b DIV(柱面数×块数/道) 柱面号 = [ b MOD(柱面数×块数/道)] DIV 块/道 盘块号 = [ b MOD(柱面数×块数/道)] MOD 块/道 • 回收: b = 盘面号×柱面数×块/道+柱面号×块/道+块号 p = b DIV(m × n) i = [ b MOD(m × n)] DIV n j = [ b MOD(m × n)] MOD n

  4. 第二种:磁盘物理块号按柱面号从小到大排列 柱面号 = b DIV(道/柱面×块数/道) 盘面号 = [ b MOD(道/柱面×块数/道)] DIV 块/道 盘块号 = [ b MOD(道/柱面×块数)] MOD 块/道 • 回收: b = 盘面号×道/柱面×块/道+道/柱面×块/道+块号 p = b DIV(m × n) i = [ b MOD(m × n)] DIV n j = [ b MOD(m × n)] MOD n

More Related