由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - design an in-memory file system
相关主题
问一个ood 中的小问题,大牛来解释下Amazon Onsite 面经
大牛帮我看一段codeEMC面试题
amazon 面试题Create a class for filesystemsoftware engineer openings (转载)
{0xFACEB00C>>2 in decimal}@fb.com到底是啥?amazon的电面
问一道qualtric面经题如何处理多用户同时调用方法修改数据库
Linux 面试题目(付答案)收集分享Unix高手来看看GS的UNIX题
An interview question: data store schema design (转载)dropbox的challenges
dropbox 要求真高啊system desgin 真是太重要
相关话题的讨论汇总
话题: file话题: class话题: meta话题: directory话题: arraylist
进入JobHunting版参与讨论
1 (共1页)
h******3
发帖数: 351
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.
g**********y
发帖数: 14569
2
Directory could have sub-directories. You can check out Java implementation
to get ideas.
d*******d
发帖数: 2050
3
directory 里面还可能有directory
h******3
发帖数: 351
4
Here, directory is also a file which includes meta data and data blocks. So
is sub-directory.
Which implementation? tks.

implementation

【在 g**********y 的大作中提到】
: Directory could have sub-directories. You can check out Java implementation
: to get ideas.

g**********y
发帖数: 14569
5
Java source code.

So

【在 h******3 的大作中提到】
: Here, directory is also a file which includes meta data and data blocks. So
: is sub-directory.
: Which implementation? tks.
:
: implementation

h******3
发帖数: 351
6
Yes, java implementation code, do you mind sharing the package/class name?
Also, do you happen to find the source code of Double.DoubletoLongBits? this
is a static native method in the source file. No idea where to find it.
BTW, how is your Amazon Onsite interview preparation?

【在 g**********y 的大作中提到】
: Java source code.
:
: So

x***n
发帖数: 70
7
请问什么叫in memory啊?

in

【在 h******3 的大作中提到】
: 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;

1 (共1页)
进入JobHunting版参与讨论
相关主题
system desgin 真是太重要问一道qualtric面经题
2014 summer intern at Comcast Labs, Washington DC (转载)Linux 面试题目(付答案)收集分享
下一个ipo会是哪家? (转载)An interview question: data store schema design (转载)
一道dropbox面试题dropbox 要求真高啊
问一个ood 中的小问题,大牛来解释下Amazon Onsite 面经
大牛帮我看一段codeEMC面试题
amazon 面试题Create a class for filesystemsoftware engineer openings (转载)
{0xFACEB00C>>2 in decimal}@fb.com到底是啥?amazon的电面
相关话题的讨论汇总
话题: file话题: class话题: meta话题: directory话题: arraylist