Skip to content

Instantly share code, notes, and snippets.

@AquaMorph
Last active October 6, 2016 02:01
Show Gist options
  • Save AquaMorph/dc8501bccbe564b5bef9fcbe859c6913 to your computer and use it in GitHub Desktop.
Save AquaMorph/dc8501bccbe564b5bef9fcbe859c6913 to your computer and use it in GitHub Desktop.
Assignment 2 Test Case
public class DiskParam
{
public static final int NUM_SECTORS = 50;
public static final int NUM_FILES = 30;
public static final int MAX_SIZE = 100;
public static final int SECTOR_SIZE = 10;
}
Contents of Sectors List
Start Sector End Sector
0 49
ERROR on print command: file 30 does not exist.
ERROR on print command: file 29 does not exist.
ERROR on delete command: file -1 does not exist
ERROR on delete command: file 30 does not exist
ERROR on delete command: file 29 does not exist
File 0 created, size = 34
File 1 created, size = 2
File 3 created, size = 44
File 1 deleted, 1 sectors freed
File 4 created, size = 100
ERROR on print command: file 1 does not exist.
Contents of Sectors List
Start Sector End Sector
19 49
File 21 created, size = 0
File 22 created, size = 0
File 23 created, size = 0
File 24 created, size = 0
File 21 deleted, 0 sectors freed
File 22 deleted, 0 sectors freed
File 23 deleted, 0 sectors freed
File 24 deleted, 0 sectors freed
Contents of Sectors List
Start Sector End Sector
19 49
SIMULATOR EXIT: 3 files exist, occupying 19 sectors.
p -1 0
p 30 0
p 29 0
d -1 0
d 30 0
d 29 0
c -1 0
c 30 0
c 0 34
c 1 2
c 3 44
d 1 0
c 4 100
p 1 0
p -1 -1
c 21 0
c 22 0
c 23 0
c 24 0
d 21 0
d 22 0
d 23 0
d 24 0
p -1 -1
x 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment