Operating Systems
COMP 3430 Guderian
Today: mostly ch 39
Copyright By PowCoder代写 加微信 powcoder
¡°Data structures all the way down¡±
What filesystem do you have?
Lots of variety, what do they have the same at a high level?
Lots of variety, what do they have the same at a high level?
Hold files
Lots of variety, what do they have the same at a high level?
Hold files
Organized into directories
What is a directory?
aka a ¡°folder¡±
What is a directory?
aka a ¡°folder¡±
List of files and directories in this directory
What is a directory?
aka a ¡°folder¡±
List of files and directories in this directory access controls
What is a file?
What is a file?
Just the data
What is a file?
Just the data So… binary
What is a file?
Just the data
So… binary
How do we interpret it?
What is a file?
Just the data
So… binary
How do we interpret it?
Magic number! Or, we have to ¡°know¡± what it is.
tree and links
Unix has one root /, Windows uses many (letters). But… same idea.
Think ¡®shortcut¡¯. How would you implement it?
Think ¡®shortcut¡¯. How would you implement it? softlink (path to look up)
Think ¡®shortcut¡¯. How would you implement it?
softlink (path to look up) Unix-y ln -s
We can link to a file… but the real file
We can link to a file… but the real file Means a single file can have multiple paths
We can link to a file… but the real file Means a single file can have multiple paths hardlink (pointer to block)
So, if we unlink a file… what happens?
It depends…
PCB, file descriptors points to the block
Open file table in memory, open file table in process
Responsibilities
What are the responsibilities of a FS?
Responsibilities
What are the responsibilities of a FS? Keep the data
Responsibilities
What are the responsibilities of a FS?
Keep the data make it findable
Responsibilities
What are the responsibilities of a FS?
Keep the data
make it findable
make sure it is available to who should see it
Responsibilities
What are the responsibilities of a FS?
Keep the data
make it findable
make sure it is available to who should see it don¡¯t display it to who should not
Responsibilities
What are the responsibilities of a FS?
Keep the data
make it findable
make sure it is available to who should see it don¡¯t display it to who should not
sizes of files (how many blocks)
Responsibilities
What are the responsibilities of a FS?
Keep the data
make it findable
make sure it is available to who should see it don¡¯t display it to who should not
sizes of files (how many blocks)
who/when was it accessed
How does this work with blocks
How does this work with blocks Blocks have atomic write
How does this work with blocks
Blocks have atomic write Too small to address
How does this work with blocks
Blocks have atomic write
Too small to address
We makes bigger structures called sectors (depends…)
How does this work with blocks
Blocks have atomic write
Too small to address
We makes bigger structures called sectors (depends…)
File system manages all the sectors
What does a drive look like (to us)
What does a drive look like (to us) A big slab of 0s and 1s
What does a drive look like (to us) A big slab of 0s and 1s Block device!
mounting Mounting a file system?
Load it up… what do we need to know? How do we know it?
File systems do a lot!
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com