⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test5pt1.data

📁 操作系统课内实验部分
💻 DATA
字号:
// test5pt1.data:  Tests the flushing of data to disk.// This is the first part of a two part test.  It will open up numerous// files, flush their contents to disk, and then shutdown the system.  The// second part of this test will read the files back in.  You should run// the second test after running the first (i.e. do not run other tests// in-between).// IMPORTANT: In order for this test to work correctly, your shutdown() // function must call Disk.stop(false) -- else the disk file will be cleared // in between these tests.  Further, you must be assigning inumbers in order// starting with 1.// 1. Format the disk with 100 blocks total, of which 10 are inode blocksformatDisk 100 10// 2. Create file1: has 2 contiguous blocks from the startfile1 = createinum1 = inumber file1// IMPORTANT: result for inumber should be 1// Blocks 0-1write file1 Happiness_ 1024// 3. Create file2: has 1 singly-indirect block, not block alignedfile2 = createinum2 = inumber file2// IMPORTANT: result for inumber should be 2// Blocks 20-21seek file2 10496 0write file2 is_a_ 512// 4. Create file3: has 2 sets of 3 indirect blocks, not block alignedfile3 = createinum3 = inumber file3// IMPORTANT: result for inumber should be 3// Blocks 143-146seek file3 73472 0write file3 warm_puppy_ 1536// Blocks 130221-130224seek file3 66673408 0write file3 warm_puppy_ 1536// 3. Close all filesclose file1close file2close file3// 4. Shut down and quitshutdownquit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -