• Tidak ada hasil yang ditemukan

Dalam sistem operasi terdistribusi yang sejati, tiap proses berada pada ala-mat segmen-segmen virtual. Proses-proses ini dapat memiliki lebih dari satu hubungan. Kaitan-kaitan ini dialokasikan ke prosesor-prosesor sampai semua prosesor habis digunakan. Hasil dari manajemen proses seperti ini meng-hasilkan utilisasi yang lebih baik, di mana tidak perlu switch apabila harus ada proses yang berat, karena satu proses dialokasikan ke satu prosesor. Sedangkan untuk proses yang tidak kebagian tempat, maka akan masuk ke antrian. Kaitan-kaitan proses ini menggunakan semaphore untuk menun-jukkan akti…tasnya

Masing- masing proses memiliki kontrol sendiri pada spasi alamatnya. Masing-masing proses dapat menambah atau menghapus segmen dari spasi alamat virtualnya melalui operasi pemetaan. Objek seperti …le yang berisi kapabilitas, dan yang membaca adalah kernel, dan apabila proses diijinkan, maka ia dapat memetakan atau menghapus pemetaan segmen pada alamat virtualnya.

Untuk membangun sebuah proses, maka pendekripsi proses mengirimkan-nya ke kernel. Hal ini diketahui sebagai pengiriman request untuk proses. Sebuah deskriptor proses dapat berisi deskriptor host, kapabilitas proses, penanganan kapabilitas, dan juga jumlah segmen. Deskriptor host berisi proses ini memiliki jenis apa, dan dapat berjalan di mana. Isinya adalah baris instruksi, kebutuhan memori, kelas mesin, informasi, dan sebagainya. Kernel harus memiliki deskriptor host yang sama untuk melanjutkan proses.

BAB 4. SISTEM OPERASI TERDISTRIBUSI 54 Kapabilitas proses adalah memiliki tingkatan lebih tinggi dari proses, yang mengatur apa yang dapat dilakukan oleh proses, atau proses ini hanya dapat dilakukan oleh siapa. Pengatur kapabilitas mirip dengan hal ini, tetapi hanya bekerja untuk proses yang tidak normal.

Alamat proses terenkapsulasi di dalam peta memori internal. Peta ini meiliki entri untuk setiap segmen dari alamat untuk proses yang potensial. Entri berisi alamat virtual, panjang segmen, pemetaan segmen, dan kapabil-itas dari objek yang mengetahui dari mana objek tersebut diinisialisasi..

Ada juga kaitan pemetaan yang mendeskripsikan atribut yang lain, ter-masuk di antaranya mende…nisikan inisial keadaan dari kaitan, status pros-esor, program counter, stack pointer, stack base, nilai register, dan keadaan sistem pemanggil. Hal ini mengijinkan deskriptor untuk digunakan di proses. Proses memiliki dua macam keadaan, yaitu proses sedang berjalan atau sedang stunned. Stunned terjadi bila proses masih ada, tetapi tidak melakukan eksekusi apapun, atau sedang dalam proses debug. Pada keadaan ini ker-nel memberitahu komunikator (kerker-nel yang lain) adanya proses yang dalam keadaan stunned. Kernel yang lain tersebut berusaha berkomunikasi den-gan proses itu sampai proses di-kill atau proses tersebut berjalan kembali. Debugging dan migrasi pada proses ini selesai setelah adanya stunning.

Bab 5

File Service

5.1 Pengenalan

Presently, our most common exposure to distributed systems that exemplify some degree of transparency is through distributed …le systems. We’d like remote …les to look and feel just like local ones.

A …le system is responsible for the organization, storage, retrieval, nam-ing, sharnam-ing, and protection of …les. File systems provide directory services, which convert a …le name (possibly a hierarchical one) into an internal iden-ti…er (e.g. inode, FAT index). They contain a representation of the …le data itself and methods for accessing it (read/write). The …le system is responsi-ble for controlling access to the data and for performing low-level operations such as bu¤ering frequentlyused data and issuing disk I/O requests.

Our goals in designing a distributed …le system are to present certain degrees of transparency to the user and the system:

² access transparency

Clients are unaware that …les are distributed and can access them in the same way as local …les are accessed.

² location transparency

A consistent name space exists encompassing local as well as remote …les. The name of a …le does not give it location.

² concurrency transparency

BAB 5. FILE SERVICE 56 All clients have the same view of the state of the …le system. This means that if one process is modifying a …le, any other processes on the same system or remote systems that are accessing the …les will see the modi…cations in a coherent manner.

² failure transparency

The client and client programs should operate correctly after a server failure.

² heterogeneity

File service should be provided across di¤erent hardware and operating system platforms.

² scalability

The …le system should work well in small environments (1 machine, a dozen machines) and also scale gracefully to huge ones (hundreds through tens of thousands of systems).

² replication transparency

To support scalability, we may wish to replicate …les across multiple servers. Clients should be unaware of this.

² migration transparency

Files should be able to move around without the client’s knowledge.

5.1.1 Konsep Sistem Files terdistribusi

A …le service is a speci…cation of what the …le system o¤ers to clients. A …le server is the implementation of a …le service and runs on one or more machines.

A …le itself contains a name, data, and attributes (such as owner, size, creation time, access rights). An immutable …le is one that, once created, cannot be changed. Immutable …les are easy to cache and to replicate across servers since their contents are guaranteed to remain unchanged.

Two forms of protection are generally used in distributed …le systems, and they are essentially the same techniques that are used in single-processor non-networked systems:

BAB 5. FILE SERVICE 57 ² capabilities

Each user is granted a ticket (capability) from some trusted source for each object to which it has access. The capability speci…es what kinds of access are allowed.

² access control lists

Each …le has a list of users associated with it and access permissions per user. Multiple users may be organized into an entity known as a group.

5.1.2 Jenis File Service

To provide a remote system with …le service, we will have to select one of two models of operation. One of these is the upload/download model. In this model, there are two fundamental operations: read …le transfers an entire …le from the server to the requesting client, and write …le copies the …le back to the server. It is a simple model and e¢cient in that it provides local access to the …le when it is being used. Three problems are evident. It can be wasteful if the client needs access to only a small amount of the …le data. It can be problematic if the client doesn’t have enough space to cache the entire …le. Finally, what happens if others need to modify the same …le? The second model is a remote access model. The …le service provides remote operations such as open, close, read bytes, write bytes, get attributes, etc. The …le system itself runs on servers. The drawback in this approach is the servers are accessed for the duration of …le access rather than once to download the …le and again to upload it.

Another important distinction in providing …le service is that of under-standing the di¤erence between directory service and …le service. A directory service, in the context of …le systems, maps human-friendly textual names for …les to their internal locations, which can be used by the …le service. The …le service itself provides the …le interface (this is mentioned above). An-other component of …le distributed …le systems is the client module. This is the client-side interface for …le and directory service. It provides a local …le system interface to client software (for example, the vnode …le system layer of a UNIX kernel).

BAB 5. FILE SERVICE 58

Dokumen terkait