1 / 27

Sistem Operasi

Sistem Operasi. “File system “. Konsep File. File adalah kumpulan informasi yang berhubungan dan tersimpan dalam secondary storage Tipe: Data (character, numeric, binary) Program Direktori Device Sifat: persistance, big size, dan sharability. File. Simple record structure Baris

Télécharger la présentation

Sistem Operasi

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SistemOperasi “File system “

  2. Konsep File • File adalah kumpulan informasi yang berhubungan dan tersimpan dalam secondary storage • Tipe: • Data (character, numeric, binary) • Program • Direktori • Device • Sifat: persistance, big size, dan sharability

  3. File • Simple record structure • Baris • Fixed length • Variable length • Complex Structures • Formatted document • Yang mengatur: • Operating system • Program

  4. Atribut File • Name – disimpan dalam human readable name • Identifier – unique tag (number) dalam file system • Type – dibutuhkan oleh sistem (ex: .txt) • Location – pointer to file location di harddisk • Size – current file size • Protection – controls siapa yang reading, writing, executing • Time, date, and user identification – data untuk protection, security, and usage monitoring • Information about files are kept in the directory structure, which is maintained on the disk

  5. Operasi File • Create: menciptakan file, size=0 • Write: menulis file dari posisi tertentu • Read: baca file dari posisi tertentu • Delete: hapus file • Truncate: menghapus isi, mempertahankan atribut, kec file length, size=0, space released • Seek • Open(Fi) – mencari directory structure pada disk untuk file Fi, dan memindahkan contentnya ke memory • Close (Fi) – memindahkan content Fi dalam memory ke directory structure pada disk

  6. Open Files • Ketika terjadi open file, data yang harus dimaintenance: • File pointer: pointer ke lokasi read/write terakhir, per process yang membuka file • File-open count: counter dari berapa kali sebuah file dibuka – untuk membuang data dari tabel open-file ketika proses terakhir menutup nya. • Misal: 1 jika dibuka, 0 jika ditutup • Lokasi disk tempat penyimpanan file: berisi cache dari informasi akses data. • Access rights: hak akses per proses file

  7. Open File Locking • Dilakukan oleh OS dan program • Terjadi ketika ada akses ke file • Ada 2 kemungkinan: • Mandatory – access is denied ketika ada perintah/request • Advisory – processes dapat menemukan status of locks dan memutuskan yang dilakukannya sendiri.

  8. File Types – Name, Extension

  9. Access Methods • Sequential Access read next write next reset no read after last write (rewrite) • Direct Access read posisi n write posisi n set position to n read next write next rewrite n n = relative block number

  10. Simulation of Sequential Access on Direct-access File

  11. Direct Access • Sangat berguna untuk pengaksesan langsung informasi dalam jumlah besar. • Contoh : database • File dilihat sebagai sederetan blok yang berindeks • Relative block number digunakan oleh sistem operasi untuk memutuskan dimana suatu file dapat ditempatkan, • dan mencegah user untuk mengakses sebagian dari sistem file yang bukan merupakan bagian dari file miliknya

  12. Example of Index and Relative Files

  13. Directory Structure • Kumpulan node yang berisi informasi tentang semua file Directory Files F 1 F 2 F 3 F 4 F n directory structure dan file-file berada dalam disk

  14. Disk Structure Disk dapat dibagi lagi menjadi partisi Disk atau partisi dapat RAID (redundant array of inexpensive disks) dilindungi terhadap kegagalan Disk atau partisi dapat digunakan mentah - tanpa sistem file, atau diformat dengan sistem berkas Partisi juga dikenal sebagai minidisks, irisan Entitas yang berisi sistem file yang dikenal sebagai volume Setiap volume berisi file system juga trek info bahwa sistem file di direktori perangkat atau tabel volume isi

  15. Direktori • Operasi terhadap direktori: • Search for a file • Create a file • Delete a file • List a directory • Rename a file • Struktur Direktori • Single-Level Directory • Two-Level Directory • Tree-Structured Directory

  16. Single Level Directory • Two Level Directory: • Membuat direktori yang terpisah untuk tiap user • Terdapat User File Directory (UFD) dan Master File Directory (MFD) • Bila beberapa user ingin mengerjakan tugas secara bersama dan ingin mengakses file user lain Single Level Directory: • Semua file terdapat dalam direktori yang sama • Tiap file memiliki nama yang unik

  17. Single-Level Directory • A single directory for all users - Naming problem - Grouping problem

  18. Two-Level Directory • Separate directory for each user • Path name • Can have the same file name for different user • Efficient searching • No grouping capability

  19. Tree structured directory • Tiap direktori dapat mengandung file dan subdirektori • Path (absolut path) adalah urutan direktori yang berasal dari MFD (master file directory) • Working dir. (relative path) adalah path yang berasal dari current directory • Current directory adalah direktori yang baru-baru ini digunakan • Contoh absolut path : /C/C/C/C

  20. Tree-Structured Directories

  21. Tree-Structured Directories (Cont) • Menciptakan sebuah file bisa dilakukan pada current directory • Delete a file rm <file-name> • Creating a new subdirectory is done in current directory mkdir <dir-name> Example: if in current directory /mail mkdir count mail prog copy prt exp count Deleting “mail”  deleting the entire subtree rooted by “mail”

  22. File System Mounting • Sebuah sistem berkas sebelum dapat digunakan harus di-mount terlebih dahulu. • Mounting: proses paling awal sebelum membuka sebuah direktori, yaitu dengan membuat sebuah direktori baru yang menjadi sub-tree dari tempat file system tsb diletakkan • Mount point: direktori kosong tempat file system yang akan di-mount diletakkan.

  23. (a) Existing. (b) Unmounted Partition

  24. Mount Point

  25. Partisi dan Mounting • Root partition di-mount pada saat boot time • Partisi yang lain di-mount secara otomatis atau manual (tergantung sistem operasi) • Windows • setiap partisi yang di-mount ditandai dengan huruf dan colon dan back slash • UNIX • file system dapat di-mount di semua direktori

  26. File Sharing • File sharing mendukung sebuah sistem operasi yang user-oriented. • Berhubungan dengan permission. • Multiple user bisa mengakses file yang sama. • On distributed systems, files may be shared across a network • Pada Multiple users: • Owner ID: user yang bisa mengganti atribut, membuka akses, dan mengontrol sebuah file atau direktori. • Group ID: sekelompok user yang men-share akses sebuah file. • Tiap user memiliki user ID masing-masing yang unik.

  27. File Sharing – Remote File Systems • Menggunakan jaringan untuk mengakses file system • Manually via programs like FTP • Automatically, seamlessly using distributed file systems • File sharing di Windows • Semi automatically via theworld wide web • Client-server model memungkinkan clients untuk mount remote file systems dari server • Server dapat melayani multiple clients • Client dan user-on-client identification biasanya insecure • NFS adalah standard UNIX client-server file sharing protocol • Standard operating system file calls ditranslasikan kedalam remote calls • Distributed Information Systems (distributed naming services) such as LDAP, DNS, NIS, Active Directory digunakan untuk remote computing

More Related