NetApp Interview Question
Software Engineer / DevelopersIn accessing a large file, you could potentially stripe its access to multiple threads. For examining directories, you could switch to a single thread, but distribute the load of multiple directories to threads appropriately.
This is how you could potentially create a parallel access filesystem.
Writers follow a copy-on-write protocol / or a log-journaling protocol. The moment they modify a file, the modifications are done on a copy of the original file. And the modifications are committed to the original file when there are no readers.
Readers read the file available at the start of their request.
In accessing a large file, you could potentially stripe its access to multiple threads. And for committing the modifications in the log you could wait only till there are no readers of that particular chunk of the file the writer is modifying.
Reader Writer synch problem!!!
- sg May 23, 2010