Sistem Operasi           Bahan Kuliah IKI-20230Gabungan Kelompok Kerja 21–28 IKI-20230 Semester               Genap 2002/2...
Sistem Operasi: Bahan Kuliah IKI-20230oleh Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/2003$Revision: 1.3....
Persembahan   Buku ini dipersembahkan dari Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/   2003, oleh Gabun...
Daftar Isi     Kata Pengantar ...............................................................................................
2.2. Penjadualan Proses......................................................................................................
2.9.1. Penjadualan Java Thread ..............................................................................................
3.2.6.2. Kondisi Tak Aman (Unsafe state)....................................................................92            ...
4.8.2.2. Permasalahan Lain yang berhubungan dengan Demand Paging ...................121                     4.8.2.3. Persy...
5.4.1. Operasi Pada Direktori ...............................................................................................
6.1.2.5. Penyebab Interupsi.........................................................................................170   ...
6.12.2. Masalah-Masalah yang Berkaitan Dengan Sistem Operasi......................................195              6.12.3....
7.7.1.1. Objek dasar dalam layer-layer virtual file system .........................................226              7.7.1....
7.11.1.4. Mengembangkan Suatu Kebijaksanaan Keamanan .....................................253            7.11.1.5. Mengama...
Rujukan .....................................................................................................................
Daftar Tabel    3-1. Tabel Deadlock..........................................................................................
2-41. Sinkronisasi. Sumber: . . .............................................................................................
Daftar Contoh    4-1. Tabel Halaman..........................................................................................
Kata Pengantar    Buku ini merupakan hasil karya Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/    2003 Faku...
Bab 1. Pendahuluan      Bab ini berisi tiga pokok pembahasan. Pertama, membahas hal-hal umum seputar sistem operasi.      ...
Bab 1. Pendahuluan1.1.4. Sejarah Sistem Operasi      Menurut Tanenbaum, sistem operasi mengalami perkembangan yang sangat ...
Bab 1. Pendahuluan      harus dimuat ke memori utama, perangkat-parangkat masukan/ keluaran dan berkas harus di-inisialisa...
Bab 1. Pendahuluan1.2.2. Struktur I/O       Bagian ini akan membahas struktur I/O, interupsi I/O, dan DMA, serta perbedaan...
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Sistem operasi 1.3
Upcoming SlideShare
Loading in...5
×

Sistem operasi 1.3

4,576

Published on

Published in: Spiritual, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,576
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
387
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Sistem operasi 1.3

  1. 1. Sistem Operasi Bahan Kuliah IKI-20230Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/2003
  2. 2. Sistem Operasi: Bahan Kuliah IKI-20230oleh Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/2003$Revision: 1.3.0.0 $ EdisiDiterbitkan 30 September 2003Copyright (Hak Cipta) © 2003 oleh Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/ 2003. Silakan menyalin, mengedarkan, dan/ atau, memodifikasi bagian dari dokumen – $Revision: 1.3.0.0 $ – – yang dikarang oleh Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/ 2003, sesuai dengan ketentuan "GNU Free Documentation License versi 1.1" atau versi selanjutnya dari FSF (Free Software Foundation); tanpa bagian "Invariant", tanpa teks "Front-Cover", dan tanpa teks "Back-Cover". Lampiran A ini berisi salinan lengkap dari lisensi tersebut. Ketentuan ini TIDAK berlaku untuk bagian dan/ atau kutipan yang bukan dikarang oleh Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/ 2003.Catatan RevisiRevisi 1.3 30-09-2003 Revised by: RMS46Revisi ini diedit oleh Rahmat M. Samik-Ibrahim: melanjutkan perbaikan tata letak dan pengindeksan.Revisi 1.2 17-09-2003 Revised by: RMS46Revisi ini diedit oleh Rahmat M. Samik-Ibrahim: melanjutkan perbaikan.Revisi 1.1 01-09-2003 Revised by: RMS46Revisi ini diedit oleh Rahmat M. Samik-Ibrahim: melakukan perbaikan struktur SGML, tanpa terlalu banyak mengubah isi buku.Revisi 1.0 27-05-2003 Revised by: RMS46Kompilasi ulang, serta melakukan sedikit perapihan.Revisi 0.21.4 05-05-2003 Revised by: Kelompok 21Perapihan berkas dan penambahan entity.Revisi 0.21.3 29-04-2003 Revised by: Kelompok 21Perubahan dengan menyempurnakan nama file.Revisi 0.21.2 24-04-2003 Revised by: Kelompok 21Merubah Kata Pengantar.Revisi 0.21.1 21-04-2003 Revised by: Kelompok 21Menambahkan Daftar Pustaka dan Index.Revisi 0.21.0 26-03-2003 Revised by: Kelompok 21Memulai membuat tugas kelompok kuliah Sistem Operasi.
  3. 3. Persembahan Buku ini dipersembahkan dari Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/ 2003, oleh Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/ 2003, untuk siapa saja yang ingin mempelajari Sistem Operasi. Tim penyusun buku ini ialah sebagai berikut: Kelompok 21 (Koordinator) Dhani Yuliarso, Fernan, Hanny Faristin, Melanie Tedja, Paramanandana D.M., Widya Yuwanda. Kelompok 22 (Bab 1) Budiono Wibowo, Agus Setiawan, Baya U.H.S., Budi A. Azis Dede Junaedi, Heriyanto, Muhammad Rusdi. Kelompok 23 (Bab 2) Indra Agung, Ali Khumaidi, Arifullah, Baihaki A.S., Christian K.F. Daeli, Eries Nugroho, Eko Seno P., Habrar, Haris Sahlan. Kelompok 24 (Bab 3) Adzan Wahyu Jatmiko, Agung Pratomo, Dedy Kurniawan, Samiaji Adisasmito, Zidni Agni. Kelompok 25 (Bab 4) Nasrullah, Amy S. Indrasari, Ihsan Wahyu, Inge Evita Putri, Muhammad Faizal Ardhi, Muhammad Zaki Rahman, N. Rifka N. Liputo, Nelly, Nur Indah, R. Ayu P., Sita A.R. Kelompok 26 (Bab 5) Rakhmad Azhari, Adhe Aries, Adityo Pratomo, Aldiantoro Nugroho, Framadhan A., Pelangi, Satrio Baskoro Y. Kelompok 27 (Bab 6) Teuku Amir F.K., Alex Hendra Nilam, Anggraini W., Ardini Ridhatillah, R. Ferdy Ferdian, Ripta Ramelan, Suluh Legowo, Zulkifli. Kelompok 28 (Bab 7) Christiono H, Arief Purnama L.K., Arman Rahmanto, Fajar, Muhammad Ichsan, Rama P. Tardan, Unedo Sanro Simon.
  4. 4. Daftar Isi Kata Pengantar ...........................................................................................................................................i 1. Pendahuluan...........................................................................................................................................1 1.1. Sistem Operasi ............................................................................................................................1 1.1.1. Fungsi Dasar...................................................................................................................1 1.1.2. Tujuan Mempelajari Sistem Operasi ..............................................................................1 1.1.3. Sasaran Sistem Operasi ..................................................................................................1 1.1.4. Sejarah Sistem Operasi...................................................................................................2 1.1.5. Layanan Sistem Operasi .................................................................................................2 1.2. Struktur Komputer.......................................................................................................................3 1.2.1. Sistem Operasi Komputer...............................................................................................3 1.2.2. Struktur I/O.....................................................................................................................3 1.2.2.1. Interupsi I/O .......................................................................................................4 1.2.2.2. Struktur DMA ....................................................................................................4 1.2.3. Struktur Penyimpanan ....................................................................................................4 1.2.3.1. Memori Utama ...................................................................................................4 1.2.3.2. Magnetic Disk ....................................................................................................5 1.2.4. Storage Hierarchy...........................................................................................................5 1.2.5. Proteksi Perangkat Keras................................................................................................5 1.2.5.1. Operasi Dual Mode ............................................................................................6 1.2.5.2. Proteksi I/O ........................................................................................................6 1.2.5.3. Proteksi Memori.................................................................................................6 1.3. Struktur Sistem Operasi ..............................................................................................................7 1.3.1. Komponen-komponen Sistem ........................................................................................7 1.3.2. Managemen Proses.........................................................................................................7 1.3.3. Managemen Memori Utama...........................................................................................8 1.3.4. Managemen Secondary-Storage.....................................................................................8 1.3.5. Managemen Sistem I/O ..................................................................................................8 1.3.6. Managemen Berkas ........................................................................................................8 1.3.7. Sistem Proteksi ...............................................................................................................9 1.3.8. Jaringan...........................................................................................................................9 1.3.9. Command-Interpreter System.........................................................................................9 1.3.10. Layanan Sistem Operasi .............................................................................................10 1.3.11. System Calls................................................................................................................10 1.3.12. Mesin Virtual ..............................................................................................................10 1.3.13. Perancangan Sistem dan Implementasi ......................................................................11 1.3.14. System Generation (SYSGEN)...................................................................................11 1.4. Rangkuman ...............................................................................................................................12 1.5. Pertanyaan .................................................................................................................................14 1.6. Rujukan .....................................................................................................................................14 2. Proses dan Thread................................................................................................................................16 2.1. Proses ........................................................................................................................................16 2.1.1. Konsep Dasar dan Definisi Proses................................................................................16 2.1.2. Keadaan Proses.............................................................................................................16 2.1.3. Process Control Block ..................................................................................................17 2.1.4. Threads .........................................................................................................................19 iv
  5. 5. 2.2. Penjadualan Proses....................................................................................................................20 2.2.1. Penjadualan Antrian .....................................................................................................20 2.2.2. Penjadual ......................................................................................................................22 2.2.3. Alih Konteks.................................................................................................................242.3. Operasi-Operasi Pada Proses ....................................................................................................26 2.3.1. Pembuatan Proses .........................................................................................................27 2.3.2. Terminasi Proses...........................................................................................................282.4. Hubungan Antara Proses...........................................................................................................29 2.4.1. Proses yang Kooperatif.................................................................................................29 2.4.2. Komunikasi Proses Dalam Sistem................................................................................31 2.4.2.1. Sistem Penyampaian Pesan..............................................................................32 2.4.2.2. Komunikasi Langsung .....................................................................................32 2.4.2.3. Komunikasi Tidak Langsung ...........................................................................33 2.4.2.4. Sinkronisasi......................................................................................................34 2.4.2.5. Buffering ..........................................................................................................34 2.4.2.6. Contoh Produser-Konsumer.............................................................................35 2.4.2.7. Mailbox ............................................................................................................372.5. Thread .......................................................................................................................................38 2.5.1. Konsep Dasar................................................................................................................39 2.5.2. Keuntungan...................................................................................................................39 2.5.3. User Threads ................................................................................................................40 2.5.4. Kernel Threads .............................................................................................................402.6. Model Multithreading ...............................................................................................................40 2.6.1. Model Many to One......................................................................................................41 2.6.2. Model One to One ........................................................................................................42 2.6.3. Model Many to Many ...................................................................................................43 2.6.4. Thread Dalam Solaris 2................................................................................................44 2.6.5. Thread Java...................................................................................................................46 2.6.6. Managemen Thread ......................................................................................................47 2.6.7. Keadaan Thread............................................................................................................48 2.6.8. Thread dan JVM...........................................................................................................49 2.6.9. JVM dan Sistem Operasi ..............................................................................................49 2.6.10. Contoh Solusi Multithreaded .....................................................................................492.7. Penjadual CPU ..........................................................................................................................50 2.7.1. Konsep Dasar................................................................................................................50 2.7.1.1. Siklus Burst CPU-I/O ......................................................................................50 2.7.1.2. Penjadual CPU .................................................................................................51 2.7.1.3. Dispatcher........................................................................................................51 2.7.1.4. Kriteria Penjadual ............................................................................................52 2.7.2. Algoritma Penjadual First Come, First Served ............................................................52 2.7.3. Penjadual Shortest Job First .........................................................................................54 2.7.4. Penjadual Prioritas........................................................................................................56 2.7.5. Penjadual Round Robin ................................................................................................572.8. Penjadualan Multiprocessor......................................................................................................58 2.8.1. Penjadualan Multiple Processor ...................................................................................59 2.8.2. Penjadualan Real Time .................................................................................................59 2.8.3. Penjadualan Thread ......................................................................................................602.9. Java Thread dan Algoritmanya .................................................................................................60 v
  6. 6. 2.9.1. Penjadualan Java Thread ..............................................................................................60 2.9.1.1. Keunggulan Penjadualan Java Thread .............................................................60 2.9.1.2. Prioritas Thread ...............................................................................................61 2.9.1.3. Penjadualan Round-Robin dengan Java ...........................................................61 2.9.2. Evaluasi Algoritma .......................................................................................................63 2.9.2.1. Sinkronisasi dalam Java ...................................................................................63 2.9.2.2. Metoda Wait() dan Notify() .............................................................................63 2.9.2.3. Contoh Metoda Wait() dan Notify() ................................................................64 2.10. Kesimpulan .............................................................................................................................64 2.10.1. Proses..........................................................................................................................65 2.10.2. Thread.........................................................................................................................65 2.10.3. Penjadualan CPU........................................................................................................66 2.11. Soal-soal Latihan.....................................................................................................................66 2.11.1. Proses..........................................................................................................................66 2.11.2. Thread.........................................................................................................................67 2.11.3. Penjadualan CPU........................................................................................................67 2.12. Rujukan ...................................................................................................................................68 2.13. Daftar Istilah ...........................................................................................................................693. Sinkronisasi dan Deadlock ..................................................................................................................72 3.1. Sinkronisasi ...............................................................................................................................72 3.1.1. Latar Belakang..............................................................................................................72 3.1.1.1. Kasus Produsen-Konsumer ..............................................................................72 3.1.1.2. Race Condition.................................................................................................73 3.1.2. Critical Section.............................................................................................................74 3.1.2.1. Mutual Exclusion .............................................................................................76 3.1.2.2. Solusi ...............................................................................................................76 3.1.2.2.1. Algoritma 1 .........................................................................................76 3.1.2.2.2. Algoritma 2 .........................................................................................77 3.1.2.2.3. Algoritma 3 .........................................................................................77 3.1.2.2.4. Algoritma Bakery ................................................................................78 3.1.3. Solusi Hardware pada Sinkronisasi ..............................................................................79 3.1.4. Semaphore ....................................................................................................................80 3.1.4.1. Operasi Down...................................................................................................80 3.1.4.2. Operasi Up .......................................................................................................81 3.1.5. Problem Klasik pada Sinkronisasi................................................................................82 3.1.5.1. Problem Readers-Writers.................................................................................82 3.1.5.2. Problem Dining Philosopers............................................................................83 3.1.6. Monitors .......................................................................................................................84 3.2. Deadlock ...................................................................................................................................84 3.2.1. Latar Belakang..............................................................................................................84 3.2.2. Resources-Allocation Graph ........................................................................................86 3.2.3. Model Sistem................................................................................................................89 3.2.4. Strategi menghadapi Deadlock .....................................................................................90 3.2.4.1. Strategi Ostrich ................................................................................................90 3.2.5. Mencegah Deadlock .....................................................................................................90 3.2.6. Menghindari Deadlock .................................................................................................92 3.2.6.1. Kondisi Aman (Safe state) ...............................................................................92 vi
  7. 7. 3.2.6.2. Kondisi Tak Aman (Unsafe state)....................................................................92 3.2.7. Algoritma Bankir..........................................................................................................93 3.2.8. Mendeteksi Deadlock dan Memulihkan Deadlock.......................................................93 3.2.8.1. Terminasi Proses ..............................................................................................94 3.2.8.2. Resources Preemption......................................................................................94 3.3. Kesimpulan ...............................................................................................................................94 3.4. Latihan ......................................................................................................................................95 3.5. Rujukan .....................................................................................................................................96 3.5.1. Rujukan Sinkronisasi....................................................................................................96 3.5.2. Rujukan Deadlock ........................................................................................................964. Memori..................................................................................................................................................98 4.1. Latar Belakang ..........................................................................................................................98 4.1.1. Pengikatan Alamat........................................................................................................98 4.1.2. Ruang Alamat Fisik dan Logik.....................................................................................98 4.1.3. Penempatan Dinamis ....................................................................................................99 4.1.4. Perhubungan Dinamis dan Berbagi Library .................................................................99 4.1.5. Lapisan Atas ...............................................................................................................100 4.2. Penukaran (Swap) ...................................................................................................................100 4.3. Alokasi Memori Yang Berdampingan.....................................................................................102 4.4. Pemberian Halaman ................................................................................................................105 4.4.1. Metode Dasar..............................................................................................................105 4.4.2. Struktur Tabel Halaman..............................................................................................108 4.4.2.1. Dukungan Perangkat Keras............................................................................108 4.4.2.2. Pemeliharaan..................................................................................................108 4.4.3. Pemberian Halaman Secara Multilevel.......................................................................109 4.4.3.1. Tabel Halaman yang Dibalik .........................................................................110 4.4.3.2. Berbagi Halaman ...........................................................................................111 4.5. Segmentasi ..............................................................................................................................112 4.5.1. Metode Dasar..............................................................................................................113 4.5.2. Perangkat Keras..........................................................................................................113 4.5.3. Pemeliharaan dan Pembagian.....................................................................................114 4.5.4. Fragmentasi ................................................................................................................115 4.6. Segmentasi Dengan Pemberian Halaman ...............................................................................115 4.6.1. Pengertian ...................................................................................................................115 4.6.2. Kelebihan Segmentasi dengan Pemberian Halaman ..................................................115 4.6.3. Perbedaan Segmentasi dan Paging .............................................................................116 4.6.4. Pengimplementasian Segmentasi dengan Pemberian Halaman Intel i386.................116 4.6.4.1. Logical Address..............................................................................................116 4.6.4.2. Alamat Fisik...................................................................................................117 4.7. Memori Virtual........................................................................................................................118 4.7.1. Pengertian ...................................................................................................................119 4.7.2. Keuntungan.................................................................................................................119 4.7.3. Implementasi ..............................................................................................................119 4.8. Permintaan Pemberian Halaman (Demand Paging)................................................................120 4.8.1. Permasalahan pada Page Fault ...................................................................................120 4.8.2. Skema Bit Valid - Tidak Valid ....................................................................................120 4.8.2.1. Penanganan Page Fault ..................................................................................121 vii
  8. 8. 4.8.2.2. Permasalahan Lain yang berhubungan dengan Demand Paging ...................121 4.8.2.3. Persyaratan Perangkat Keras..........................................................................122 4.9. Pemindahan Halaman .............................................................................................................122 4.9.1. Skema Dasar ...............................................................................................................123 4.9.2. Pemindahan Halaman Secara FIFO............................................................................124 4.9.3. Pemindahan Halaman Secara Optimal .......................................................................124 4.9.4. Pemindahan Halaman Secara LRU ............................................................................125 4.9.5. Pemindahan Halaman Secara Perkiraan LRU ............................................................126 4.9.5.1. Algoritma Additional-Reference-Bit ..............................................................126 4.9.5.2. Algoritma Second-Chance .............................................................................126 4.9.5.3. Algoritma Second-Chance (Yang Diperbaiki) ...............................................127 4.9.6. Dasar Perhitungan Pemindahan Halaman ..................................................................127 4.9.7. Algoritma Page-Buffering ..........................................................................................127 4.10. Alokasi Frame.......................................................................................................................128 4.10.1. Jumlah Frame Minimum ..........................................................................................128 4.10.2. Algoritma Alokasi ....................................................................................................129 4.10.3. Alokasi Global lawan Local .....................................................................................129 4.11. Thrashing ..............................................................................................................................130 4.11.1. Penyebab Thrashing .................................................................................................130 4.11.2. Model Working Set ...................................................................................................132 4.11.3. Frekuensi Kesalahan Halaman .................................................................................133 4.12. Contoh Pada Sistem Operasi.................................................................................................134 4.12.1. Windows NT.............................................................................................................134 4.12.2. Solaris 2 ....................................................................................................................135 4.12.3. Linux.........................................................................................................................135 4.13. Pertimbangan Lain ................................................................................................................135 4.13.1. Sebelum Pemberian Halaman...................................................................................136 4.13.2. Ukuran Halaman.......................................................................................................136 4.13.3. Tabel Halaman yang Dibalik ....................................................................................137 4.13.4. Struktur Program ......................................................................................................137 4.13.5. Penyambungan Masukan dan Keluaran....................................................................138 4.13.6. Pemrosesan Waktu Nyata .........................................................................................1385. Sistem Berkas .....................................................................................................................................139 5.1. Pengertian................................................................................................................................139 5.2. Berkas......................................................................................................................................139 5.2.1. Konsep Dasar..............................................................................................................139 5.2.2. Atribut Pada Berkas....................................................................................................140 5.2.3. Operasi Pada Berkas...................................................................................................140 5.2.4. Jenis Berkas ................................................................................................................142 5.2.5. Struktur Berkas...........................................................................................................143 5.2.6. Struktur Berkas Pada Disk..........................................................................................144 5.2.7. Penggunaan Berkas Secara Bersama-sama ................................................................144 5.3. Metode Akses..........................................................................................................................145 5.3.1. Akses Secara Berurutan..............................................................................................145 5.3.2. Akses Langsung..........................................................................................................145 5.3.3. Akses Dengan Menggunakan Indeks .........................................................................145 5.4. Struktur Direktori ....................................................................................................................145 viii
  9. 9. 5.4.1. Operasi Pada Direktori ...............................................................................................145 5.4.2. Direktori Satu Tingkat ................................................................................................146 5.4.3. Direktori Dua Tingkat ................................................................................................146 5.4.4. Direktori Dengan Struktur Tree ..................................................................................146 5.4.5. Direktori Dengan Struktur Acyclic-Graph .................................................................146 5.4.6. Direktori Dengan Struktur Graph...............................................................................147 5.5. Proteksi Berkas .......................................................................................................................147 5.5.1. Tipe Akses Pada Berkas .............................................................................................147 5.5.2. Akses List dan Group .................................................................................................148 5.5.3. Pendekatan Sistem Proteksi yang Lain.......................................................................149 5.6. Struktur Sistem Berkas............................................................................................................149 5.6.1. Organisasi Sistem Berkas ...........................................................................................150 5.6.2. Mounting Sistem Berkas.............................................................................................151 5.7. Metode Alokasi Berkas ...........................................................................................................151 5.7.1. Alokasi Secara Berdampingan (Contiguous Allocation)............................................151 5.7.2. Alokasi Secara Berangkai (Linked Allocation) ..........................................................153 5.7.3. Alokasi Dengan Indeks (Indexed Allocation).............................................................154 5.7.4. Kinerja Sistem Berkas ................................................................................................154 5.8. Managemen Ruang Kosong (Free Space)...............................................................................155 5.8.1. Menggunakan Bit Vektor............................................................................................155 5.8.2. Linked List ..................................................................................................................156 5.8.3. Grouping.....................................................................................................................156 5.8.4. Counting .....................................................................................................................156 5.9. Implementasi Direktori ...........................................................................................................156 5.9.1. Linear List ..................................................................................................................157 5.9.2. Hash Table ..................................................................................................................157 5.10. Efisiensi dan Unjuk Kerja .....................................................................................................157 5.10.1. Efisiensi ....................................................................................................................158 5.10.2. Kinerja ......................................................................................................................158 5.11. Recovery................................................................................................................................159 5.11.1. Pemeriksaan Rutin....................................................................................................159 5.11.2. Back Up and Restore ................................................................................................159 5.12. Macam-macam Sistem Berkas..............................................................................................160 5.12.1. Sistem Berkas Pada Windows ..................................................................................160 5.12.2. Sistem Berkas pada UNIX (dan turunannya) ...........................................................161 5.12.3. Perbandingan antara Windows dan UNIX................................................................163 5.12.4. Macam-macam Sistem Berkas di UNIX ..................................................................163 5.13. Kesimpulan ...........................................................................................................................163 5.14. Soal-Soal Sistem Berkas .......................................................................................................1676. I/O dan Disk .......................................................................................................................................168 6.1. Perangkat Keras I/O ................................................................................................................168 6.1.1. Polling.........................................................................................................................168 6.1.2. Interupsi......................................................................................................................169 6.1.2.1. Mekanisme Dasar Interupsi ...........................................................................169 6.1.2.2. Fitur Tambahan pada Komputer Modern.......................................................170 6.1.2.3. Interrupt Request Line ..................................................................................170 6.1.2.4. Interrupt Vector dan Interrupt Chaining........................................................170 ix
  10. 10. 6.1.2.5. Penyebab Interupsi.........................................................................................170 6.1.3. DMA...........................................................................................................................171 6.1.3.1. Definisi...........................................................................................................171 6.1.3.2. Transfer DMA................................................................................................171 6.1.3.3. Handshaking ..................................................................................................172 6.1.3.4. Cara-cara Implementasi DMA.......................................................................1736.2. Interface Aplikasi I/O .............................................................................................................173 6.2.1. Peralatan Block dan Karakter .....................................................................................173 6.2.2. Peralatan Jaringan.......................................................................................................174 6.2.3. Jam dan Timer ............................................................................................................174 6.2.4. Blocking dan Nonblocking I/O ...................................................................................1746.3. Kernel I/O Subsystem ..............................................................................................................174 6.3.1. I/O Scheduling ............................................................................................................174 6.3.2. Buffering .....................................................................................................................175 6.3.3. Caching.......................................................................................................................176 6.3.4. Spooling dan Reservasi Device...................................................................................176 6.3.5. Error Handling ...........................................................................................................177 6.3.6. Kernel Data Structure.................................................................................................1776.4. Penanganan Permintaan I/O....................................................................................................1786.5. Kinerja I/O ..............................................................................................................................179 6.5.1. Pengaruh I/O pada Kinerja .........................................................................................179 6.5.2. Cara Meningkatkan Efisiensi I/O ...............................................................................179 6.5.3. Implementasi Fungsi I/O ............................................................................................1806.6. Struktur Disk ...........................................................................................................................1806.7. Penjadualan Disk.....................................................................................................................181 6.7.1. Penjadualan FCFS ......................................................................................................182 6.7.2. Penjadualan SSTF ......................................................................................................182 6.7.3. Penjadualan SCAN.....................................................................................................183 6.7.4. Penjadualan C-SCAN.................................................................................................183 6.7.5. Penjadualan LOOK ....................................................................................................183 6.7.6. Pemilihan Algoritma Penjadualan Disk .....................................................................1836.8. Managemen Disk ....................................................................................................................184 6.8.1. Memformat Disk ........................................................................................................184 6.8.2. Boot Block ..................................................................................................................185 6.8.3. Bad Blocks ..................................................................................................................1856.9. Penanganan Swap-Space.........................................................................................................185 6.9.1. Penggunaan Swap-Space ............................................................................................186 6.9.2. Lokasi Swap-Space.....................................................................................................186 6.9.3. Pengelolaan Swap-Space ............................................................................................1876.10. Kehandalan Disk ...................................................................................................................1886.11. Implementasi Stable-Storage ................................................................................................1896.12. Tertiary-Storage Structure.....................................................................................................190 6.12.1. Macam-macam Tertiary-Strorage Structure.............................................................190 6.12.1.1. Floppy Disk..................................................................................................191 6.12.1.2. Magneto-optic disk ......................................................................................191 6.12.1.3. Optical Disk .................................................................................................192 6.12.1.4. WORM Disk (Write Once, Read Many Times) ...........................................193 6.12.1.5. Tapes ............................................................................................................194 x
  11. 11. 6.12.2. Masalah-Masalah yang Berkaitan Dengan Sistem Operasi......................................195 6.12.3. Interface Aplikasi......................................................................................................195 6.12.4. Penamaan Berkas......................................................................................................196 6.12.5. Managemen Penyimpanan Hirarkis..........................................................................197 6.13. Rangkuman ...........................................................................................................................197 6.13.1. I/O.............................................................................................................................197 6.13.2. Disk...........................................................................................................................197 6.14. Soal Latihan ..........................................................................................................................198 6.15. Rujukan .................................................................................................................................200 6.16. Daftar Istilah .........................................................................................................................2007. LINUX ................................................................................................................................................206 7.1. Sejarah.....................................................................................................................................206 7.1.1. Kernel Linux...............................................................................................................206 7.1.2. Sistem Linux...............................................................................................................206 7.1.3. Distribusi Linux..........................................................................................................207 7.1.4. Lisensi Linux ..............................................................................................................208 7.1.5. Linux Saat Ini .............................................................................................................208 7.1.6. Tux: Logo Linux.........................................................................................................209 7.2. Prinsip Rancangan...................................................................................................................209 7.2.1. Prinsip Desain Linux ..................................................................................................210 7.2.2. Komponen Sistem Linux ............................................................................................210 7.2.2.1. Kernel.............................................................................................................211 7.2.2.2. Perpustakaan Sistem ......................................................................................211 7.2.2.3. Utilitas Sistem................................................................................................211 7.3. Modul Kernel Linux................................................................................................................212 7.3.1. Pengertian Modul Kernel Linux .................................................................................212 7.3.2. Managemen Modul Kernel Linux ..............................................................................212 7.3.3. Registrasi Driver.........................................................................................................213 7.3.4. Resolusi Konflik .........................................................................................................213 7.4. Manajemen Proses ..................................................................................................................213 7.4.1. Pendahuluan ...............................................................................................................214 7.4.2. Deskriptor Proses........................................................................................................214 7.4.3. Pembuatan Proses Dan Thread...................................................................................217 7.5. Penjadual .................................................................................................................................218 7.5.1. Sinkronisasi Kernel.....................................................................................................218 7.5.2. Penjadualan Proses .....................................................................................................220 7.5.3. Symmetric Multiprocessing ........................................................................................221 7.6. Managemen Memori di Linux ................................................................................................221 7.6.1. Managemen Memori Fisik .........................................................................................222 7.6.2. Memori Virtual ...........................................................................................................222 7.6.2.1. Demand Paging..............................................................................................223 7.6.2.2. Swaping..........................................................................................................224 7.6.2.3. Pengaksesan Memori Virtual Bersama ..........................................................224 7.6.2.4. Efisiensi..........................................................................................................224 7.6.3. Load dan Eksekusi Program.......................................................................................225 7.7. Sistem Berkas Linux ...............................................................................................................226 7.7.1. Sistem Berkas Virtual .................................................................................................226 xi
  12. 12. 7.7.1.1. Objek dasar dalam layer-layer virtual file system .........................................226 7.7.1.2. Operasi-operasi Dalam Inode ........................................................................227 7.7.2. Sistem Berkas Linux...................................................................................................227 7.7.2.1. Sistem Berkas EXT2......................................................................................227 7.7.2.2. Sistem Berkas EXT3......................................................................................230 7.7.2.3. Sistem Berkas Reiser .....................................................................................230 7.7.2.4. Sistem Berkas X.............................................................................................231 7.7.2.5. Sistem Berkas Proc ........................................................................................231 7.7.3. Pembagian Sistem Berkas Secara Ortogonal .............................................................2317.8. I/O Linux.................................................................................................................................232 7.8.1. Device Karakter..........................................................................................................232 7.8.2. Device Blok ................................................................................................................234 7.8.3. Device Jaringan...........................................................................................................235 7.8.3.1. Nama ..............................................................................................................236 7.8.3.2. Informasi Bus.................................................................................................236 7.8.3.3. Flags Interface ...............................................................................................236 7.8.3.4. Informasi Protokol .........................................................................................237 7.8.3.5. MTU...............................................................................................................237 7.8.3.6. Keluarga .........................................................................................................237 7.8.3.7. Jenis................................................................................................................237 7.8.3.8. Alamat............................................................................................................237 7.8.3.9. Antrian Paket .................................................................................................237 7.8.3.10. Fungsi Pendukung........................................................................................2387.9. Komunikasi Antar Proses........................................................................................................238 7.9.1. Sinyal ..........................................................................................................................238 7.9.1.1. Beberapa Sinyal di Linux...............................................................................238 7.9.1.2. Bagaimana Suatu Sinyal Disikapi..................................................................238 7.9.1.3. Penerapan Sinyal............................................................................................239 7.9.2. Pipa .............................................................................................................................240 7.9.2.1. Penerapan.......................................................................................................241 7.9.2.2. Cara Menulis Data .........................................................................................241 7.9.2.3. Cara Membaca Data.......................................................................................242 7.9.2.4. FIFO...............................................................................................................2427.10. Struktur Jaringan ...................................................................................................................242 7.10.1. Jaringan TCP/IP........................................................................................................244 7.10.2. Protokol Internet (IP)................................................................................................244 7.10.3. Protokol Pengontrol Transmisi (TCP) ......................................................................247 7.10.4. Protokol Pengontrol Pesan di Internet (ICMP) ........................................................248 7.10.5. Protokol Datagram Pengguna (UDP) .......................................................................248 7.10.6. IPX dan Sistem Berkas NCP ....................................................................................249 7.10.6.1. Sejarah dan Latar Belakang Xerox dan Novell............................................249 7.10.6.2. IPX dan Linux..............................................................................................250 7.10.6.3. NetWare Directory Service (NDS) ...............................................................2507.11. Keamanan..............................................................................................................................251 7.11.1. Pendahuluan .............................................................................................................251 7.11.1.1. Mengapa Kita Perlu Pengamanan? ..............................................................251 7.11.1.2. Seberapa Aman? ..........................................................................................251 7.11.1.3. Apa yang Anda Coba Lindungi?..................................................................252 xii
  13. 13. 7.11.1.4. Mengembangkan Suatu Kebijaksanaan Keamanan .....................................253 7.11.1.5. Mengamankan Situs Anda ...........................................................................253 7.11.2. Keamanan Fisik ........................................................................................................253 7.11.2.1. Kunci Komputer...........................................................................................254 7.11.2.2. Keamanan BIOS ..........................................................................................254 7.11.2.3. Keamanan Boot Loader ...............................................................................255 7.11.3. Keamanan Lokal.......................................................................................................255 7.11.3.1. Membuat Account Baru ...............................................................................255 7.11.3.2. Keamanan Root ............................................................................................2567.12. Perangkat Lunak Bebas.........................................................................................................256 7.12.1. Serba-Serbi PLB.......................................................................................................257 7.12.2. Pembagian Perangkat Lunak ....................................................................................257 7.12.2.1. Perangkat Lunak Bebas................................................................................258 7.12.2.2. Perangkat Lunak Open Source.....................................................................259 7.12.2.3. Perangkat Lunak Public Domain .................................................................259 7.12.2.4. Perangkat Lunak Copylefted ........................................................................259 7.12.2.5. Perangkat Lunak Bebas Non-copylefted ......................................................259 7.12.2.6. Perangkat Lunak GPL-covered....................................................................260 7.12.2.7. Sistem GNU .................................................................................................260 7.12.2.8. Program GNU ..............................................................................................260 7.12.2.9. Perangkat Lunak GNU.................................................................................260 7.12.2.10. Perangkat Lunak Semi-Bebas ....................................................................261 7.12.2.11. Perangkat Lunak Berpemilik .....................................................................261 7.12.2.12. Freeware.....................................................................................................262 7.12.2.13. Shareware...................................................................................................262 7.12.2.14. Perangkat Lunak Komersial.......................................................................2627.13. Latihan ..................................................................................................................................2637.14. Point-Point Kernel Linux dan PLB .......................................................................................264 7.14.1. Sejarah Linux............................................................................................................264 7.14.2. Design Principles .....................................................................................................264 7.14.3. Modul Kernel Linux .................................................................................................264 7.14.4. Managemen Proses...................................................................................................265 7.14.5. Penjadualan...............................................................................................................265 7.14.6. Managemen Memori di Linux..................................................................................265 7.14.7. Sistem Berkas di Linux ............................................................................................265 7.14.8. I/O Linux ..................................................................................................................265 7.14.9. Komunikasi Antar Proses .........................................................................................265 7.14.10. Struktur Jaringan ....................................................................................................265 7.14.11. Keamanan ...............................................................................................................266 7.14.12. Perangkat Lunak Bebas ..........................................................................................2667.15. Kesimpulan Kernel Linux dan Perangkat Lunak Bebas .......................................................2667.16. Daftar Istilah .........................................................................................................................2667.17. Rujukan Kernel Linux dan Perangkat Lunak Bebas .............................................................270 7.17.1. Sejarah Linux (Rujukan) ..........................................................................................270 7.17.2. Linux Umumnya (Rujukan) .....................................................................................271 7.17.3. Modul Kernel (Rujukan) ..........................................................................................271 7.17.4. Process Management(Rujukan)................................................................................271 7.17.5. GNU (Rujukan) ........................................................................................................272 xiii
  14. 14. Rujukan ..................................................................................................................................................273A. GNU Free Documentation License ...................................................................................................278 A.1. PREAMBLE ..........................................................................................................................278 A.2. APPLICABILITY AND DEFINITIONS ..............................................................................278 A.3. VERBATIM COPYING.........................................................................................................279 A.4. COPYING IN QUANTITY ...................................................................................................279 A.5. MODIFICATIONS.................................................................................................................280 A.6. COMBINING DOCUMENTS...............................................................................................281 A.7. COLLECTIONS OF DOCUMENTS ....................................................................................281 A.8. AGGREGATION WITH INDEPENDENT WORKS............................................................282 A.9. TRANSLATION ....................................................................................................................282 A.10. TERMINATION...................................................................................................................282 A.11. FUTURE REVISIONS OF THIS LICENSE .......................................................................282 A.12. How to use this License for your documents .......................................................................283Indeks......................................................................................................................................................284 xiv
  15. 15. Daftar Tabel 3-1. Tabel Deadlock...................................................................................................................................91 5-1. Tabel Jenis Berkas ............................................................................................................................143 5-2. Contoh sistem daftar akses pada UNIX ...........................................................................................149Daftar Gambar 2-1. Keadaan Proses. Sumber: . . . .............................................................................................................17 2-2. Process Control Block. Sumber: . . ....................................................................................................18 2-3. CPU Register. Sumber: . . . ................................................................................................................18 2-4. Device Queue. Sumber: . . .................................................................................................................20 2-5. Diagram Anrian. Sumber: . . . ............................................................................................................22 2-6. Penjadual Medium-term. Sumber: . . . ...............................................................................................23 2-7. Alih Konteks. Sumber: . . . .................................................................................................................24 2-8. Pohon Proses. Sumber: . . ..................................................................................................................25 2-9. Operasi pada Proses. Sumber: . . . ......................................................................................................26 2-10. Program Fork. Sumber: . . . ..............................................................................................................28 2-11. Program Produser Konsumer. Sumber: . . . ......................................................................................30 2-12. Program Produser Konsumer Alternatif. Sumber: . . . .....................................................................35 2-15. Program Send/ Receive. Sumber: . . ................................................................................................37 2-16. Thread. Sumber: . . . .........................................................................................................................38 2-17. User dan Kernel Thread. Sumber: . . . ..............................................................................................40 2-18. Model Multithreading. Sumber: . . . .................................................................................................41 2-19. Model Many to One. Sumber: . . . ....................................................................................................41 2-20. Model One to One. Sumber: . . ........................................................................................................42 2-21. Model Many to Many. Sumber: . . ...................................................................................................43 2-22. Thread Solaris dan Java. Sumber: . . . ..............................................................................................45 2-23. Runnable. Sumber: . . . .....................................................................................................................47 2-24. Class Worker2. Sumber: . . ..............................................................................................................47 2-25. Keadaan Thread. Sumber: . . . ..........................................................................................................48 2-26. CPU Burst. Sumber: . . . ...................................................................................................................50 2-27. Kedatangan Proses. Sumber: . . . ......................................................................................................53 2-28. Gannt Chart Kedatangan Proses I. Sumber: . . . ...............................................................................53 2-29. Gannt Chart Kedatangan Proses II. Sumber: . . ...............................................................................53 2-30. Gannt Chart Kedatangan Proses III. Sumber: . . . ............................................................................53 2-31. Gannt Chart Kedatangan Proses IV. Sumber: . . ..............................................................................54 2-32. Kedatangan Proses. Sumber: . . . ......................................................................................................54 2-33. Gannt Chart SJF Non-Preemtive. Sumber: . . . ................................................................................55 2-34. Rata-rata Menunggu. Sumber: . . . ...................................................................................................55 2-35. Kedatangan Proses. Sumber: . . . ......................................................................................................55 2-36. Gannt Chart SJF Preemtive. Sumber: . . ..........................................................................................56 2-37. Rata-rata Menunggu. Sumber: . . . ...................................................................................................56 2-38. Round Robin. Sumber: . . . ...............................................................................................................57 2-39. Time Quantum dan Alih Konteks. Sumber: . . . ...............................................................................58 2-40. Round Robin. Sumber: . . . ...............................................................................................................61 xv
  16. 16. 2-41. Sinkronisasi. Sumber: . . ..................................................................................................................632-42. Contoh Wait() dan Notify(). Sumber: . . ..........................................................................................643-1. Race Condition. Sumber.....................................................................................................................733-2. Critical Section. Sumber: . . . .............................................................................................................763-7. Process Pi. Sumber: . . .......................................................................................................................783-8. Process Pi. Sumber: . . .......................................................................................................................793-9. Lock. Sumber: . . . ..............................................................................................................................793-10. Block. Sumber: . . ............................................................................................................................803-11. Block. Sumber: . . ............................................................................................................................813-12. Mutex. Sumber: . . . ..........................................................................................................................813-13. Persimpangan. Sumber: . . ...............................................................................................................853-14. Graph. Sumber: . . . ..........................................................................................................................863-17. Safe. Sumber: . . . .............................................................................................................................924-1. Alokasi Kembali. Sumber: . . . .........................................................................................................1024-2. Alokasi Kembali. Sumber: . . . .........................................................................................................1044-3. Perangkat Keras Pemberian Halaman. Sumber: . . ..........................................................................1054-4. Model pemberian halaman dari memori fisik dan logis. Sumber: . . . .............................................1064-5. Alamat logis. Sumber: . . .................................................................................................................1094-6. Skema Tabel Halaman Dua Tingkat. Sumber: . . . ...........................................................................1094-7. Penterjemahan alamat untuk arsitektur pemberian halaman dua tingkat 32-bit logis. Sumber: . . . 1104-8. Tabel halaman yang dibalik. Sumber: . . . ........................................................................................1114-9. Berbagi kode pada lingkungan berhalaman. Sumber: . . .................................................................1114-10. Alamat Logis Sumber: . . ...............................................................................................................1144-11. String Acuan. Sumber: . . . .............................................................................................................1244-12. String Acuan. Sumber: . . . .............................................................................................................1244-13. String Acuan. Sumber: . . . .............................................................................................................1254-14. String Acuan. Sumber: . . . .............................................................................................................1254-15. Derajat dari Multiprogramming. Sumber: . . .................................................................................1314-16. Jumlah Frame. Sumber: . . .............................................................................................................1335-1. Lapisan pada sistem berkas. Sumber: . . ..........................................................................................1506-1. Polling Operation. Sumber: . . .........................................................................................................1696-2. DMA Interface. Sumber: . . . ............................................................................................................1716-3. DMA Controller. Sumber: . . ...........................................................................................................1726-4. Floppy Disk. Sumber: . . ..................................................................................................................1916-5. Magneto Optic. Sumber: . . . ............................................................................................................1926-6. Optical Disk. Sumber: . . . ................................................................................................................1936-7. Worm Disk. Sumber: . . . ..................................................................................................................1946-8. Tape. Sumber: . . ..............................................................................................................................1957-1. Logo Linux. Sumber: . . . .................................................................................................................2097-2. Pemetaan Memori Virtual ke Alamat Fisik. Sumber: . . . ................................................................2237-5. CharDev. Sumber: . . . ......................................................................................................................2337-6. Buffer. Sumber: . . . ..........................................................................................................................2347-7. Pipa. Sumber: . . . .............................................................................................................................2407-8. Jaringan. Sumber: . . ........................................................................................................................2477-9. Kategori. Sumber: . . . ......................................................................................................................258 xvi
  17. 17. Daftar Contoh 4-1. Tabel Halaman..................................................................................................................................132 7-1. Isi Deskriptor Proses ........................................................................................................................214 7-2. Antrian Tunggu ................................................................................................................................216 xvii
  18. 18. Kata Pengantar Buku ini merupakan hasil karya Gabungan Kelompok Kerja 21–28 IKI-20230 Semester Genap 2002/ 2003 Fakultas Ilmu Komputer Universitas Indonesia (Fasilkom UI). Sebagai tim penyusun, kami sangat senang atas peluncuran buku ini. Penulisan buku ini bertujuan untuk mengatasi kelangkaan bahan kuliah berbahasa Indonesia, serta diharapkan akan dimanfaatkan sebagai rujukan oleh para peserta kuliah angkatan berikutnya. Kami menyadari bahwa ini masih banyak kekurangannya. Silakan menyampaikan kritik/ tanggapan/ usulan anda ke <writeme03 AT yahoogroups DOT com>. i
  19. 19. Bab 1. Pendahuluan Bab ini berisi tiga pokok pembahasan. Pertama, membahas hal-hal umum seputar sistem operasi. Selanjutnya, menerangkan konsep perangkat keras sebuah komputer. Sebagai penutup akan diungkapkan, pokok konsep dari sebuah sistem operasi.1.1. Sistem Operasi Sistem operasi merupakan sebuah penghubung antara pengguna dari komputer dengan perangkat keras komputer. Sebelum ada sistem operasi, orang hanya mengunakan komputer dengan menggunakan sinyal analog dan sinyal digital. Seiring dengan berkembangnya pengetahuan dan teknologi, pada saat ini terdapat berbagai sistem operasi dengan keunggulan masing-masing. Untuk lebih memahami sistem operasi maka sebaiknya perlu diketahui terlebih dahulu beberapa konsep dasar mengenai sistem operasi itu sendiri. Pengertian sistem operasi secara umum ialah pengelola seluruh sumber-daya yang terdapat pada sistem komputer dan menyediakan sekumpulan layanan (system calls) ke pemakai sehingga memudahkan dan menyamankan penggunaan serta pemanfaatan sumber-daya sistem komputer.1.1.1. Fungsi Dasar Sistem komputer pada dasarnya terdiri dari empat komponen utama, yaitu perangkat-keras, program aplikasi, sistem-operasi, dan para pengguna. Sistem operasi berfungsi untuk mengatur dan mengawasi penggunaan perangkat keras oleh berbagai program aplikasi serta para pengguna. Sistem operasi berfungsi ibarat pemerintah dalam suatu negara, dalam arti membuat kondisi komputer agar dapat menjalankan program secara benar. Untuk menghindari konflik yang terjadi pada saat pengguna menggunakan sumber-daya yang sama, sistem operasi mengatur pengguna mana yang dapat mengakses suatu sumber-daya. Sistem operasi juga sering disebut resource allocator. Satu lagi fungsi penting sistem operasi ialah sebagai program pengendali yang bertujuan untuk menghindari kekeliruan (error) dan penggunaan komputer yang tidak perlu.1.1.2. Tujuan Mempelajari Sistem Operasi Tujuan mempelajari sistem operasi agar dapat merancang sendiri serta dapat memodifikasi sistem yang telah ada sesuai dengan kebutuhan kita, agar dapat memilih alternatif sistem operasi, memaksimalkan penggunaan sistem operasi dan agar konsep dan teknik sistem operasi dapat diterapkan pada aplikasi-aplikasi lain.1.1.3. Sasaran Sistem Operasi Sistem operasi mempunyai tiga sasaran utama yaitu kenyamanan -- membuat penggunaan komputer menjadi lebih nyaman, efisien -- penggunaan sumber-daya sistem komputer secara efisien, serta mampu berevolusi -- sistem operasi harus dibangun sehingga memungkinkan dan memudahkan pengembangan, pengujian serta pengajuan sistem-sistem yang baru. 1
  20. 20. Bab 1. Pendahuluan1.1.4. Sejarah Sistem Operasi Menurut Tanenbaum, sistem operasi mengalami perkembangan yang sangat pesat, yang dapat dibagi kedalam empat generasi: • Generasi Pertama (1945-1955) Generasi pertama merupakan awal perkembangan sistem komputasi elektronik sebagai pengganti sistem komputasi mekanik, hal itu disebabkan kecepatan manusia untuk menghitung terbatas dan manusia sangat mudah untuk membuat kecerobohan, kekeliruan bahkan kesalahan. Pada generasi ini belum ada sistem operasi, maka sistem komputer diberi instruksi yang harus dikerjakan secara langsung. • Generasi Kedua (1955-1965) Generasi kedua memperkenalkan Batch Processing System, yaitu Job yang dikerjakan dalam satu rangkaian, lalu dieksekusi secara berurutan.Pada generasi ini sistem komputer belum dilengkapi sistem operasi, tetapi beberapa fungsi sistem operasi telah ada, contohnya fungsi sistem operasi ialah FMS dan IBSYS. • Generasi Ketiga (1965-1980) Pada generasi ini perkembangan sistem operasi dikembangkan untuk melayani banyak pemakai sekaligus, dimana para pemakai interaktif berkomunikasi lewat terminal secara on-line ke komputer, maka sistem operasi menjadi multi-user (di gunakan banyak pengguna sekali gus) dan multi-programming (melayani banyak program sekali gus). • Generasi Keempat (Pasca 1980an) Dewasa ini, sistem operasi dipergunakan untuk jaringan komputer dimana pemakai menyadari keberadaan komputer-komputer yang saling terhubung satu sama lainnya. Pada masa ini para pengguna juga telah dinyamankan dengan Graphical User Interface yaitu antar-muka komputer yang berbasis grafis yang sangat nyaman, pada masa ini juga dimulai era komputasi tersebar dimana komputasi-komputasi tidak lagi berpusat di satu titik, tetapi dipecah dibanyak komputer sehingga tercapai kinerja yang lebih baik.1.1.5. Layanan Sistem Operasi Sebuah sistem operasi yang baik menurut Tanenbaum harus memiliki layanan sebagai berikut: pembuatan program, eksekusi program, pengaksesan I/O Device, pengaksesan terkendali terhadap berkas pengaksesan sistem, deteksi dan pemberian tanggapan pada kesalahan, serta akunting. Pembuatan program yaitu sistem operasi menyediakan fasilitas dan layanan untuk membantu para pemrogram untuk menulis program; Eksekusi Program yang berarti Instruksi-instruksi dan data-data 2
  21. 21. Bab 1. Pendahuluan harus dimuat ke memori utama, perangkat-parangkat masukan/ keluaran dan berkas harus di-inisialisasi, serta sumber-daya yang ada harus disiapkan, semua itu harus di tangani oleh sistem operasi; Pengaksesan I/O Device, artinya Sistem Operasi harus mengambil alih sejumlah instruksi yang rumit dan sinyal kendali menjengkelkan agar pemrogram dapat berfikir sederhana dan perangkat pun dapat beroperasi; Pengaksesan terkendali terhadap berkas yang artinya disediakannya mekanisme proteksi terhadap berkas untuk mengendalikan pengaksesan terhadap berkas; Pengaksesan sistem artinya pada pengaksesan digunakan bersama (shared system); Fungsi pengaksesan harus menyediakan proteksi terhadap sejumlah sumber-daya dan data dari pemakai tak terdistorsi serta menyelesaikan konflik-konflik dalam perebutan sumber-daya; Deteksi dan Pemberian tanggapan pada kesalahan, yaitu jika muncul permasalahan muncul pada sistem komputer maka sistem operasi harus memberikan tanggapan yang menjelaskan kesalahan yang terjadi serta dampaknya terhadap aplikasi yang sedang berjalan; dan Akunting yang artinya Sistem Operasi yang bagus mengumpulkan data statistik penggunaan beragam sumber-daya dan memonitor parameter kinerja.1.2. Struktur Komputer Struktur sebuah sistem komputer dapat dibagi menjadi: • Sistem Operasi Komputer. • Struktur I/O. • Struktur Penyimpanan. • Storage Hierarchy. • Proteksi Perangkat Keras.1.2.1. Sistem Operasi Komputer Dewasa ini sistem komputer multiguna terdiri dari CPU (Central Processing Unit); serta sejumlah device controller yang dihubungkan melalui bus yang menyediakan akses ke memori. Setiap device controller bertugas mengatur perangkat yang tertentu (contohnya disk drive, audio device, dan video display). CPU dan device controller dapat dijalankan secara bersamaan, namun demikian diperlukan mekanisme sinkronisasi untuk mengatur akses ke memori. Pada saat pertama kali dijalankan atau pada saat boot, terdapat sebuah program awal yang mesti dijalankan. Program awal ini disebut program bootstrap. Program ini berisi semua aspek dari sistem komputer, mulai dari register CPU, device controller, sampai isi memori. Interupsi merupakan bagian penting dari sistem arsitektur komputer. Setiap sistem komputer memiliki mekanisme yang berbeda. Interupsi bisa terjadi apabila perangkat keras (hardware) atau perangkat lunak (software) minta "dilayani" oleh prosesor. Apabila terjadi interupsi maka prosesor menghentikan proses yang sedang dikerjakannya, kemudian beralih mengerjakan service routine untuk melayani interupsi tersebut. Setelah selesai mengerjakan service routine maka prosesor kembali melanjutkan proses yang tertunda. 3
  22. 22. Bab 1. Pendahuluan1.2.2. Struktur I/O Bagian ini akan membahas struktur I/O, interupsi I/O, dan DMA, serta perbedaan dalam penanganan interupsi. 1.2.2.1. Interupsi I/O Untuk memulai operasi I/O, CPU me-load register yang bersesuaian ke device controller. Sebaliknya device controller memeriksa isi register untuk kemudian menentukan operasi apa yang harus dilakukan. Pada saat operasi I/O dijalankan ada dua kemungkinan, yaitu synchronous I/O dan asynchronous I/O. Pada synchronous I/O, kendali dikembalikan ke proses pengguna setelah proses I/O selesai dikerjakan. Sedangkan pada asynchronous I/O, kendali dikembalikan ke proses pengguna tanpa menunggu proses I/O selesai. Sehingga proses I/O dan proses pengguna dapat dijalankan secara bersamaan. 1.2.2.2. Struktur DMA Direct Memory Access (DMA) suatu metoda penanganan I/O dimana device controller langsung berhubungan dengan memori tanpa campur tangan CPU. Setelah men-set buffers, pointers, dan counters untuk perangkat I/O, device controller mentransfer blok data langsung ke penyimpanan tanpa campur tangan CPU. DMA digunakan untuk perangkat I/O dengan kecepatan tinggi. Hanya terdapat satu interupsi setiap blok, berbeda dengan perangkat yang mempunyai kecepatan rendah dimana interupsi terjadi untuk setiap byte (word).1.2.3. Struktur Penyimpanan Program komputer harus berada di memori utama (biasanya RAM) untuk dapat dijalankan. Memori utama adalah satu-satunya tempat penyimpanan yang dapat diakses secara langsung oleh prosesor. Idealnya program dan data secara keseluruhan dapat disimpan dalam memori utama secara permanen. Namun demikian hal ini tidak mungkin karena: • Ukuran memori utama relatif kecil untuk dapat menyimpan data dan program secara keseluruhan. • Memori utama bersifat volatile, tidak bisa menyimpan secara permanen, apabila komputer dimatikan maka data yang tersimpan di memori utama akan hilang. 1.2.3.1. Memori Utama Hanya memori utama dan register merupakan tempat penyimpanan yang dapat diakses secara langsung oleh prosesor. Oleh karena itu instruksi dan data yang akan dieksekusi harus disimpan di memori utama atau register. Untuk mempermudah akses perangkat I/O ke memori, pada arsitektur komputer menyediakan fasilitas pemetaan memori ke I/O. Dalam hal ini sejumlah alamat di memori dipetakan dengan device register. Membaca dan menulis pada alamat memori ini menyebabkan data ditransfer dari dan ke device register. Metode ini cocok untuk perangkat dengan waktu respon yang cepat seperti video controller. 4

×