Transcript Sistem File

Sistem File
T0542 / 13 - 01
Persyaratan penyimpanan jangka panjang
• Harus bisa menyimpan data yang banyak.
• Informasi yang disimpan harus tetap ada meskipun proses
yang memakainya sudah selesai.
• Beberapa proses harus bisa mengakses informasi secara
bersamaan.
Penamaan File
Typical file extensions
T0542 / 13 - 02
Struktur File
• Ada tiga jenis file:
• Byte sequence
• Record sequence
• Tree
T0542 / 13 - 03
Tipe File
• Regular file  ASCII/binary
• Directories
• Character special file
• Block special file
Pengaksesan File
• Akses Sequential
•membaca semua bytes/records dari awal
•tidak bisa menuju ke lokasi tertentu secara langsung
•bisa di-rewind atau back up
•lebih sesuai untuk media tape
• Akses Random
•bytes/records bisa dibaca dengan urutan sebarang
•penting untuk sistem basis data
T0542 / 13 - 04
Atribut File
Kemungkinan atribut file
T0542 / 13 - 05
Operasi File
• Create
• Delete
• Open
• Close
• Read
• Write
• Append
• Seek
• Get attributes
• Set Attributes
• Rename
T0542 / 13 - 06
Contoh Program menggunakan File System Calls
T0542 / 13 - 07
T0542 / 13 - 08
Memory-Mapped Files
(a) Proses sebelum mapping
(b) Proses setelah mapping (copy abc into xyz)
DIREKTORI
Single-Level Directory Systems
Two-level Directory Systems
Hierarchical Directory Systems
T0542 / 13 - 09
T0542 / 13 - 010
Path Names
• Absolute vs relative path
Operasi Directory
•
Create
•
Delete
•
Opendir
•
Closedir
•
Readdir
•
Rename
•
Link
•
Unlink
T0542 / 13 - 011
Implementasi Sistem File
Kemungkinan layout sistem file
T0542 / 13 - 012
1. Contiguous allocation
T0542 / 13 - 013
2. linked list of disk
blocks
3. File Allocation
Table (FAT)
T0542 / 13 - 014
4. i-node
T0542 / 13 - 015
Implementasi Direktori
Direktori entri diperlukan untuk mencari disk block dari file
yang bersangkutan
T0542 / 13 - 016
SHARED FILES
File system containing a shared file
T0542 / 13 - 017
(a) Sebelum linking
(b) Setelah linking
(c) Setelah pemilik file tidak menggunakan file tersebut
Contoh Sistem File/Direktori Entri
Sistem File CD-ROM
T0542 / 13 - 018
Sistem File CP/M
Sistem File MS-DOS
Sistem File Windows 98
T0542 / 13 - 019
Entri untuk nama panjang pada Windows 98
Contoh penyimpanan nama panjang di Windows 98
Sistem File pada UNIX
• Directory entry
• i-node
T0542 / 13 - 020