上个orbi review吧# Hardware - 计算机硬件
h*3
1 楼
Explain the data structure and algorithms that you would use to design an in
-memory file system using java.
Assuming the file system supports any kinds of file resources (disk,
physical memory, etc)
class datablock{ byte[SIZE] byteArray; }
class vNode{ ArrayList datablocks;}
class Meta{ int size; Date last_modified; String extra_info;}
class File{
Meta metadata;
ArrayList nodes;
}
class directory{
Meta metadata;
ArrayList content;
}
class fileSystem{
void mount(){};
void unmount(){};
filed createFile(File f);
void closeFile(File f){};
dierectory createdir(directory dir);
}
the whole idea is similar to the solution on the book. I just feel using a
tree might be better.
welcome bricks.
-memory file system using java.
Assuming the file system supports any kinds of file resources (disk,
physical memory, etc)
class datablock{ byte[SIZE] byteArray; }
class vNode{ ArrayList
class Meta{ int size; Date last_modified; String extra_info;}
class File{
Meta metadata;
ArrayList
}
class directory{
Meta metadata;
ArrayList
}
class fileSystem{
void mount(){};
void unmount(){};
filed createFile(File f);
void closeFile(File f){};
dierectory createdir(directory dir);
}
the whole idea is similar to the solution on the book. I just feel using a
tree might be better.
welcome bricks.