19
Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 1 FASILKOM Teknik Informatika

Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Embed Size (px)

Citation preview

Page 1: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Modul ke:

Fakultas

Program Studi

File System ImplementationSISTEM OPERASI

Misbahul Fajri, ST., MTI.

11

FASILKOM

Teknik Informatika

Page 2: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

File-System Structure

• File structure– Logical storage unit– Collection of related information

• File system resides on secondary storage (disks)

• File system organized into layers• File control block – storage structure

consisting of information about a file

Page 3: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Layered File System

Page 4: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

A Typical File Control Block

Page 5: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

In-Memory File System Structures• The following figure illustrates the necessary

file system structures provided by the operating systems.

• Figure 12-3(a) refers to opening a file.

• Figure 12-3(b) refers to reading a file.

Page 6: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

In-Memory File System Structures

Page 7: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Virtual File Systems

• Virtual File Systems (VFS) provide an object-oriented way of implementing file systems.

• VFS allows the same system call interface (the API) to be used for different types of file systems.

• The API is to the VFS interface, rather than any specific type of file system.

Page 8: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Schematic View of Virtual File System

Page 9: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Allocation Methods

• An allocation method refers to how disk blocks are allocated for files:

• Contiguous allocation

• Linked allocation

• Indexed allocation

Page 10: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Contiguous Allocation of Disk Space

Page 11: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Linked Allocation

Page 12: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Example of Indexed Allocation

Page 13: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Page Cache

• A page cache caches pages rather than disk blocks using virtual memory techniques

• Memory-mapped I/O uses a page cache

• Routine I/O through the file system uses the buffer (disk) cache

• This leads to the following figure

Page 14: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

I/O Without a Unified Buffer Cache

Page 15: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Unified Buffer Cache

• A unified buffer cache uses the same page cache to cache both memory-mapped pages and ordinary file system I/O

Page 16: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

I/O Using a Unified Buffer Cache

Page 17: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Log Structured File Systems• Log structured (or journaling) file systems record each update

to the file system as a transaction

• All transactions are written to a log– A transaction is considered committed once it is written to the log– However, the file system may not yet be updated

• The transactions in the log are asynchronously written to the file system– When the file system is modified, the transaction is removed from the

log

• If the file system crashes, all remaining transactions in the log must still be performed

Page 18: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Pustaka

Operating System Concepts (6th or 7th Edition). Silberschatz, Galvin, Gagne, ISBN: 0-471-25060-0. Wiley

Page 19: Modul ke: Fakultas Program Studi File System Implementation SISTEM OPERASI Misbahul Fajri, ST., MTI. 1 FASILKOM Teknik Informatika

Terima KasihMisbahul Fajri, ST., MTI.