文章目錄

Lab 8 QA

Q1

Explain how an OS supports automatically mounting file systems after plug in a USB flash drive into a computer.

keyword: hotplug, uevent, udev, udevd

  • 熱插拔事件
  • 拿到設備資料 (e.g. sysfs)
  • mknod 建立 device file
  • 透過 USB Controller driver 讀寫 device file
  • 透過 MBR/GPT 建立 partition 相關的 kernel object
  • 透過 filesystem driver 讀寫對應的 partition

Q2

How to implement a component cache mechanism if a file has multiple names (because of hard links)

兩個 directory entry 指向同一個 cluster

Q3

Does tmpfs need sync method?

No.

comments powered by Disqus