Operating Systems 2018F Lecture 17

From Soma-notes
Revision as of 22:00, 9 November 2018 by Soma (talk | contribs)
Jump to navigation Jump to search

Video

The video from the lecture on November 9, 2018 is now available.

Notes

In Class

Lecture 17
----------

Filesystems

What is it?


Well, what's a device file?
 - struct file_operations which gives functions for file operations
   (read, write, etc)

filesystems just take this idea further


When you access a file
 - process does a file-related system call
 - kernel calls generic system call function for requested operation
 - kernel calls filesystem-specific function for requested operation

e.g.
 - process does a write system call on file on an ext4 filesystem
 -   kernel runs generic write syscall code
 -     kernel runs ext4 write code

filesystems are abstractions of file and directory-related operations
 - allow many instantiations that we call filesystems

filesystems talk to rest of the kernel through a virtual filesystem interface
 (VFS)


Sidebar:
Microkernels vs monolithic kernels

Why microkernels
 - better security: if a service crashes, it is just a process
 - easier development: servers are just a process

Why monolithic kernels
 - faster
 - you depend on it anyway, so security benefits are illusory