Questions tagged [filesystems]

Questions about algorithms and data structures for storing, organizing, and naming data in durable storage systems.

74 questions
12
votes
4 answers

Why store self and parent links (. and ..) in a directory entry?

Consider an filesystem targeted at some embedded devices that does little more than store files in a hierarchical directory structure. This filesystem lacks many of the operations you may be used to in systems such as unix and Windows (for example,…
Gilles 'SO- stop being evil'
  • 44,159
  • 8
  • 120
  • 184
9
votes
2 answers

What is a file?

I'm looking for a formal definition of file that does not only include storage but also abstractions like procfs or /dev/null (or any fuse-based file) that do not relate to storage. So far I know that all files are abstractions that can be…
5
votes
2 answers

What if the electricity goes off while a file is being renamed?

Suppose I'm renaming a file and the electricity goes off right in the middle. Naively, it looks like the file could be in some “half-renamed” state. Maybe the name would have half the old name and half the new name. Or maybe the file could disappear…
Anon
  • 63
  • 2
4
votes
1 answer

Is every file an integer amount of bytes?

I'm not sure whether I'm asking on the right site, since all the other questions seem to be a lot more abstract and theoretical. If I should remove the question, please tell me. Are all files on my computer an integer amount of bytes? That is, does…
Dasherman
  • 143
  • 3
4
votes
1 answer

Why do some filesystems have fragmentation and others don't?

I try to understand why fragmentation is a problem for NTFS and FAT but not when using inodes. In all cases, files are not necessarily stored in a contiguous fashion so I don't see the problem for the former two. So where is the crucial difference?
user2459338
  • 131
  • 2
  • 6
3
votes
1 answer

Studies of file access patterns in embedded systems

I am considering what elements an operating system for Network On Chip systems might have and the issue of file systems looms large. NoCs have an embedded heritage, and their domain of use (at least initially) is likely to be similar tasks to…
3
votes
3 answers

Typical file structure

Short version The question & answers relate to the following topics: File as a collection of records vs. file as a stream of bytes Sequential File Distinction between file data and metadata Transfer of metadata along with the file File size…
bkoodaa
  • 377
  • 2
  • 3
  • 13
3
votes
2 answers

B-Tree and how it is used in practice

I understand what a B-Tree is (I already implemented a B-Tree in Java with insert and delete methods that preserve the invariant). However I do not understand exactly how it is used for example for file systems or databases. How do you choose the…
Nocta
  • 221
  • 2
  • 5
2
votes
1 answer

What exactly is a "binary file"?

I suspect this may be more of a concept / theory question, but, I haven't been able to wrap my brain around what exactly a binary file is. I've read links such as the…
Player_2
  • 21
  • 1
2
votes
1 answer

SSD vs HDD Retrieval Time

On an HDD if data is fragmented the discs need to be spun to where the next block in the file is, so how and where data is stored can make a big difference in how long it takes to retrieve the data. With an SSD is the retrieval time for fragmented…
yitzih
  • 121
  • 1
2
votes
0 answers

Importance of contiguous allocation on flash disks

All file systems I know make significant efforts to try and allocate files in contiguous blocs on a disk. But if the disk is an SSD using flash technology underneath, is there any benefit to contiguous allocation? The only benefit I can see is in…
Stefan
  • 368
  • 3
  • 10
2
votes
1 answer

What type of an algorithm is being used for directory structure scanning?

So after learning about DFS and BFS yesterday in my class I was curious as to how is scanning on various file system being done. I spent quite a bit of time trying to look for some references on the web, but so far I have failed in doing so. I'm…
brajevicm
  • 23
  • 1
  • 3
2
votes
2 answers

What is the file system of ram?

As much I know about a memory and storing data there would always be a managing type feature in every memory which manages all the data and its location. So, what is the file system of a RAM. I also like to know the format or type (mp3, pdf, png,…
Vivek Ji
  • 131
  • 6
2
votes
1 answer

How is the directory implementation done using a linear list?

I am reading Operating System Concepts by Silberchatz, Galvin, Gagne and they write that a directory can be implemented using a linear list. [pg 470, 8th ed] However, I visualize directories as a rather hierarchical data structure which can be…
user2441151
  • 193
  • 2
  • 7
2
votes
1 answer

Filing systems using index blocks

I know that a disadvantage of the index block system is that it can be wasteful of space if the files involved are mostly small in size, as index blocks are allocated from free space as required and at least one index block is needed for each file…
1
2 3 4 5