File-System Implementation

dokumen-dokumen yang mirip
Review: Memory & File System

IKI20210 Pengantar Organisasi Komputer Kuliah no. 6c:Cache Memory. Bobby Nazief Johny Moningka

17/04/2015 SISTEM OPERASI

SISTIM OPERASI (Operating System) IKI Memory Management. Memory: Part 2 Ch. 8. Johny Moningka

Metode Alokasi dan Managemen Ruang Kosong

Virtual Memory Ch. 9. Virtual Memory. SISTIM OPERASI (Operating System) IKI Johny Moningka

File System (Interface) Ch. 10

Bab 10. Implementasi Sistem File POKOK BAHASAN: TUJUAN BELAJAR: 10.1 STRUKTUR SISTEM FILE

Manajemen File. Kebutuhan Penyimpanan Informasi

Memory Management. Memory Ch. 8. Latar Belakang. Main-Memory Management

Pengantar Hardware: Partisi dan Format Harddisk. Hanif Fakhrurroja, MT

Virtual Memory. Latar Belakang Demand Paging Pembuatan Proses Page Replacement Alokasi Frame Thrashing Contoh Sistem Operasi

Sistem File Sistem File Konsep File Aspek Sudut Pandang User

Mata Kuliah : Sistem Operasi Kode MK : IT Sistem File. Tim Teaching Grant Mata Kuliah Sistem Operasi

Sistem Operasi. Sistem File 2016

BAMBANG PUJIARTO, S.KOM

MEDIA PENYIMPANAN. Alif Finandhita, S.Kom

Memory Management Memori Latar Belakang Alamat Binding

Sistem Operasi Komputer. Pertemuan VIII Manajemen Memori

Alokasi Memori Kernel. Heri Kurniawan OS-Gasal 2009/2010

Operating System. File System. Fak. Teknik Jurusan Teknik Informatika Universitas Pasundan. Dosen : Caca E. Supriana, S.Si

PROGRAM STUDI S1 SISTEM KOMPUTER UNIVERSITAS DIPONEGORO. Oky Dwi Nurhayati, ST, MT

Virtual Memory. Latar Belakang. Latar Belakang (cont.) Virtual Memori

MANAJEMEN MEMORI. Manajemen Memori 1

Memory Management. Latar Belakang Swapping Contiguous Allocation Paging Segmentation Segmentation dengan Paging

3. Apa kekurangan paging sederhana dibandingkan dengan paging pada virtual memory?

Review: Memory & File System

Sistem Operasi 9. Virtual Memory. Antonius Rachmat C, S.Kom, M.Cs

Tujuan Pembelajaran. Memahami proses swapping Memahami proses alokasi memori berurutan (Contiguous Memori Allocation)

Organisasi Sistem Komputer. Virtual Memory. Sekolah Teknik Elektro dan Informatika ITB

Sistem Operasi. Memory Management. Part 1 of 2

KONSEP dan ATRIBUT SISTEM BERKAS

Metode Alokasi Berkas

Maintenance & Disaster Recovery

Manajemen Disk II. Kelompok : Aditya Nugraha Dani Supriyadi Wahyu Sulistio

RAID 0 (1) No redundancy Data striped across all disks Round Robin striping Increase speed

Pertemuan #5: Memori dan Memori Virtual

SISTEM OPERASI. CSP 2702 Semester/SKS : 3/3 Program Studi : Sistem Komputer Kamis, Ruang : P-22

MANAJEMEN MEMORI SISTEM OPERASI

MAKALAH SISTEM OPERASI

ARSITEKTUR DAN ORGANISASI KOMPUTER

Keuntungan Virtual Memory

Computer System Structures

Understanding Operating Systems Fifth Edition

17/04/2015 SISTEM OPERASI. File Concept Access Methods Directory and Disk Structure File-System Mounting File Sharing File Protection

MODUL 7 MANAJEMEN DISK

SISTEM FILE PADA DOS PENGANTAR TEKNOLOGI SISTEM INFORMASI B

Mengenal SD Card & FAT16. Oleh: Tim IE

Sistem Operasi 11. Implentasi File system. Antonius Rachmat C, S.Kom, M.Cs

Pertemuan 2. Struktur Sistem Operasi

Disusun oleh: Endro Ariyanto Prodi S1 Teknik Informatika Fakultas Informatika Universitas Telkom

Pengertian Partisi Mempartisi harddisk artinya membagi ruang memori pada harddisk. Setiap harddisk minimal harus dipartisi satu kali, dan menyesuaikan

Memori Virtual (Virtual Memory) Heri Kurniawan OS-Genap 2007/2008

File System (Interface) Ch. 10

DAFTAR ISI. Kata Pengantar... v Ucapan Terima Kasih... vi Daftar Isi... vii. I. Pengenalan... 1

Tahun Akademik 2014/2015 Semester II. DIG1I3 - Instalasi dan Penggunaan Sistem Operasi

menjadi barisan dan mungkin halaman. Source file: yaitu urutan dari berbagai subroutine dan fungsi

Managemen Memori 2016

Struktur Sistem Komputer

Manajemen Sistem File

memuat banyak proses dalam suatu waktu Sebelum masuk ke memori, suatu proses harus menunggu dalam antrian

Bab 9. Sistem File POKOK BAHASAN: TUJUAN BELAJAR: 9.1 KONSEP FILE

Struktur Sistem Komputer

Aplikasi Kombinatorial untuk Menentukan Arah Perkembangan Cache

BAB 42 KONSEP ALOKASI BLOK SISTEM BERKAS. Kelompok : Haris Sahlan ( )

KONSEP MULTIPROGRAMMING

Struktur Sistem Komputer. Abdullah Sistem Informasi Universitas Binadarma

3/30/2016. Manajemen Memori. Manajemen Memori. Manajemen memori pada sistem Monoprogramming Manajemen memori pada sistem Multiprogramming

Disk & Memory Semester Ganjil 2014 Fak. Teknik Jurusan Teknik Informatika.

Sistem Penyimpanan Disk

RESUME SISTEM OPERASI MAIN MEMORI

Sistem Operasi AGUS PAMUJI. Teknik Informatika

Sistem Operasi Komputer

Segmentasi dan Paging Pada Intel Pentium. Heri Kurniawan OS-Genap 2007/2008

Pertemuan Ke-5 EXTERNAL MEMORY

MEMORI INTERNAL Minggu 9

SISTEM OPERASI TERDISTRIBUSI

Praktikum 13. Manajemen Memori 1 ALOKASI MEMORI POKOK BAHASAN: TUJUAN BELAJAR: DASAR TEORI:

13 Sistem Penyimpanan Disk

Memori pada Sistem Linux. Heri Kurniawan OS-Gasal 2009/2010

Pengalamatan Disk. Urutan penomoran alamat logika disk mengikuti aturan :

Sistem Operasi Komputer

Tujuan Pembelajaran. Memahami pengalamatan dengan menggunakan paging

Sistem Operasi Terdistribusi

Mahasiswa dapat memahami konsep dasar deskripsi dan kontrol pada proses

Sistem Operasi 8. Memory Management. Antonius Rachmat C, S.Kom, M.Cs

DASKOM & PEMROGRAMAN. Dani Usman

Virtual Memory. Sistem Operasi

Departemen Ilmu Komputer/ Informatika Universitas Diponegoro Semester Gasal 2017/ 2018

Studi Kasus Kernel Linux

File System Journal. Oleh: Rahmad Wahyudi Elektronika dan Instrumentasi Universitas Gadjah Mada Yogyakarta

MEMORI VIRTUAL. Sistem Operasi TIKB1023 Munengsih Sari Bunga. Politeknik Indramayu. TIKB1023/Sistem Operasi/MSB 1

Arsitektur Sistem Komputer. Operasi Sistem Komputer. Struktur Sistem Komputer. Review:

Arsitektur Komputer dan Sistem Operasi. Hirarki Memori. Sekolah Teknik Elektro dan Informatika - ITB

Pengantar Memori dan Memori Internal

Struktur Sistem Komputer

Media Penyimpanan Berkas. Rudi Susanto

1 Pengertian Sistem File

Adalah membagi ruang memori pada harddisk. Setiap harddisk minimal harus dipartisi satu partisi, dan

DCH1B3 Konfigurasi Perangkat Keras Komputer

Transkripsi:

File System (Implementation) Ch. 11 SISTIM OPERASI (Operating System) IKI-20230 Johny Moningka (moningka@cs.ui.ac.id) Fakultas Ilmu Komputer Universitas Indonesia Semester 2000/2001 File-System Implementation File-System Structure Allocation Methods Free-Space Management File System JM-2000/v1.1/2 1

Review Storage management (server): Performance management (secara global): File sharing (server), potensi user akses yang sangat banyak. Bottleneck pada I/O dari server => dedicated komputer untuk disk storage => management mudah (centralized). Teknologi: SAN (storage area network). Capacity management: Strategi untuk mendukung memori hirarkis: kapan data harus di migrasi dari storage cost/byte mahal ke storage cost/byte lebih murah => Backup dan pengarsipan. Quota dan alokasi disk high speed untuk aplikasi penting. Availability: Termasuk solusi RAID, network restore etc. Bad blocks (disk)? Hardware or software recovery. File System JM-2000/v1.1/3 File-System Structure File structure Isi file: kumpulan byte yang berhubungan dengan informasi. Logical storage unit: urutan byte, dengan akses address secara logical (offset:1 s/d sizeof file). Bagaimana layout file => disk (sektor) Data file disimpan dalam blok (kelipatan besarnya sector). Logical address disk: urutan blok data. Implementasi: Mengurangi overhead mendapatkan data (seek, rotation). Manajemen blok yang bebas (free list). File System JM-2000/v1.1/4 2

Disk Management Alokasi struktur blok disk: Contiguous allocation Linked allocation. Indexed allocation. Manajemen free list dari blok storage. Manajemen volume, partisi disk. File System JM-2000/v1.1/5 Workloads Bagaimana cara user menggunakan file? Sequential access: data besar dan berurut. Random access: data kecil dan lokasi blok tidak berurut. Hal yang menjadi dasar design file structure: Umumnya file ukurannya kecil (pengamatan). Sebagian dari blok disk digunakan oleh file yang besar (porsi terbesar). Jadi perlu dukungan untuk kedua model akses : akses random (file kecil yang banyak) dan sequential (file yang besar dan aktifitas tinggi) => trade off yang sulit dipenuhi. File System JM-2000/v1.1/6 3

Contiguous Allocation Setiap file menempati sekumpulan blok yang contiguous (sinambung) pada disk. Umumnya max. besar file telah tetap (user menentukan). Pro s: Manajemen blok yang dialokasikan sederhana. Informasi awal lokasi nomor blok dan panjang blok yang dialokasikan. Con s: Space terbuang percuma, belum tentu sebesar data/isi file (dynamic storage-allocation problem). Sulit memperbesar (demand, grow) dari file. File System JM-2000/v1.1/7 Simple mechanism Example: IBM OS/360 When creating a file, make the user specify pre-specify its length and allocate all space at once File descriptor contents: location and size Pro: simple, fast access, both sequential and random. Masalah: fragementasi => perlu penggabungan blok yang kecil menjadi contiguous blok besar what happens if file c needs 2 blok??? file a (base=1,len=3) file b (base=5,len=2) File System JM-2000/v1.1/8 4

Simple mechanism Extent-based : allocate files like segmented memory file a (base=1,len=3) file b (base=5,len=2) what happens if file c needs 2 sectors??? File System JM-2000/v1.1/9 Linked files Basically a linked list on disk. Keep a linked list of all free blocks Variably Variably sized, sized, flexibly flexibly laid laid out out files files how do you find the last block in a? file a (base=1) file b (base=5) pro: easy dynamic growth & sequential access, no fragmentation con? Examples (sort-of): Alto, TOPS-10, DOS FAT File System JM-2000/v1.1/10 5

Linked Allocation Setiap file terdiri dari linked list dari blok disk: Mekanisme pengurutan blok yang dialokasikan untuk suatu file. Blok yang dialokasikan dapat tersebar (scattered): Tidak perlu fixed allocation => menjawab dynamic allocation problem. File descriptor: a pointer to file s first block Setiap blok menyimpan pointer yang menunjuk ke blok yang berikut. block = pointer ke alokasi blok berikutnya Data File System JM-2000/v1.1/11 Linked List Allocate as needed, link together; e.g., file starts at block 9 Bagaimana melakukan random access? Follow the link, overhead besar (read blok disk; linked list) => banyak seek) File System JM-2000/v1.1/12 6

Example: DOS FS (simplified) Performance: Link dikumpulkan pada fixed-sized file allocation table (FAT) => tidak disebarkan pada setiap blok. Directory (5) 0 1 a: 6 b: 2 2 3 4 5 6 FAT (16-bit entries) free eof 1 eof 3 eof 4... file a 6 4 3 file b 2 1 FAT cukup kecil dapat disimpan cache disk => akses tanpa melakukan seek. File System JM-2000/v1.1/13 FAT discussion Entry size = 16 bits nomor blok Berapa maksimum ukuran FAT? Jika 512 byte per blok, what s the maximum size of FS yang dapat dikenal? Solusi sederhana: memperbesar ukuran blok. Reliability: how to protect against errors? FAT menempati satu area tertentu (contiguous sector) => what happen if corrupt? Buat duplikat FAT on disk. Bootstrapping: where is root directory? Fixed location on disk: FAT (opt) FAT 64k* 64k* 2 = 128K 128K 64K*.5k 64K*.5k = 32M 32M FS FS root dir File System JM-2000/v1.1/14 7

Indexed files Kumpulkan pointer blok ke dalam satu indexed block. Implementasi: array pointer => max. ukuran file yang dapat ditampung oleh array tersebut. Create file: alokasikan blok pertama untuk menyimpan array pointer, blok akan diberikan on demand oleh user (dynamic). file a file b Pro: mendukung sequential access dan random (read the first block, and scan the array pointer). File System JM-2000/v1.1/15 Example of Indexed Allocation File System JM-2000/v1.1/16 8

Indexed files Issues (sama seperti masalah page table besar) 2^20 entries! 4K 4K block block size, size, 4GB 4GB file file = 1M 1M entries entries (4MB!) (4MB!) idle 2^32 file size 4K blocks Ukuran file kecil = lots of unused entries Mendukung file besar? table array menempati banyak blok yang contiguous. File System JM-2000/v1.1/17 Multi-leve indexed Pembagian struktur index hirarkis: region dengan index array (1 st level), menunjuk ke index array (2 nd level) dst. Masalah: akses ke index array => overhead idle File System JM-2000/v1.1/18 9

Indexed Allocation Mapping M outer-index index table file File System JM-2000/v1.1/19 Example UNIX: inode Untuk file kecil: 1 blok data Size: 4 Kbytes/blok Ukuran inode: 100 bytes Overhead: 2,5% File System JM-2000/v1.1/20 10

Multi-level indexed files File descriptor (inode) = 14 block pointers stuff Ptr 1 ptr 2 ptr 3 ptr 4... ptr 13 ptr 14 data blocks Indirect block Ptr 1 ptr 2 ptr 128 Ptr 1 ptr 2 ptr 128 File System JM-2000/v1.1/21 Indirect blks Double indirect block UNIX: inodes Inodes disimpan pada array (fixed) Besarnya array inode ditentuk saat disk di format (initialized) dan menempati lokasi tertentu (awal atau tersebar). Array inode tidak dapat diubah (kecuali melakuk reformat). Inode array file blocks... File system menyimpan (direktori) index yang menunjuk ke i-node (OS Unix menyebut i-number). Saat file dibuka, maka I-number diambil dari direktori dan i-node disimpan ke memori (bagian dari referensi PCB proses tsb). File System JM-2000/v1.1/22 11

Example: Unix file system Want to modify byte 4 in /a/b.c:. : 10 : dir a: 12: dir. :12 dir.. :10:dir b.c :13:inode Root directory read root directory (blk 10) refcnt=1 lookup a (blk 12); read lookup inode for b.c (13); read 14 0 0 int main() { Gunakan inode mencari byte 4 (blksize = 4KB, so offset = 0 gives blk 14); read File System JM-2000/v1.1/23 Block: OS view Berapa besar blok data suatu file system? Sistim lama (disk kecil): 512 Bytes => saat ini 4 KB. Contoh: Unix (V7) => Unix 4.2 BSD (Berkeley) Analisa performance response time FS, meningkat 4 x lebih cepat (sequential access). Why? Makin kecil ukuran block => makin banyak blok yang yang harus ditransfer atau makin banyak I/O operation yang harus dilakukan. Setiap I/O operation: faktor waktu latency sampai data dapat ditransfer. Mengapa tidak membuat blok menjadi sangat besar? Internal fragmentation (ingat: umumnya ukuran file kecil): waste of space. Notes: Windows mengenal istilah cluster untuk blok. File System JM-2000/v1.1/24 12

Free-Space Management Bit vector (n blocks) 0 1 2 n-1 bit[i] = 678 0 block[i] free 1 block[i] occupied Free list: model pembagian daftar blok yang bebas dalam linked list. Pointer (next) disimpan pada blok yang bebas. Umumnya tidak satu linked list tunggal, tapi di pilah dalam sekumpulan linked list. File System JM-2000/v1.1/25 Free-Space Management (Cont.) Bit map requires extra space. Example: block size = 2^12 bytes (4 K) disk size = 2^30 bytes (1 gigabyte) n = 2^30/2^12 = 2^18 bits (or 32K bytes) Need to protect: Pointer to free list Bit map Must be kept on disk Copy in memory and disk may differ. Solution (konsistensi check) Set bit[i] = 1 in disk. Allocate block[i] Set bit[i] = 1 in memory File System JM-2000/v1.1/26 13