1 / 13

Thread

Oleh : Muhammad Syauqil Ilmi (09650122) Muzakki (09650) Fathiyyatur Rahmah ( 09650156). Thread. Pengertian. sebuah alur kontrol dari sebuah proses cara dari komputer untuk menjalankan dua atau lebih task dalam waktu bersamaan. Pengertian Multithread.

Télécharger la présentation

Thread

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

E N D

Presentation Transcript


  1. Oleh: Muhammad SyauqilIlmi (09650122) Muzakki (09650) FathiyyaturRahmah(09650156) Thread

  2. Pengertian • sebuahalurkontroldarisebuahproses • caradarikomputeruntukmenjalankanduaataulebih task dalamwaktubersamaan

  3. Pengertian Multithread • carakomputeruntukmembagi-bagipekerjaan yang dikerjakansebagian-sebagiandengancepatsehinggamenimbulkanefeksepertimenjalankanbeberapa task secarabersamaanwalaupunotaknyahanyasatu.

  4. Keuntungan Multithreading Meliputipeningkatanrespondari user, pembagiansumberdaya proses, ekonomis, dankemampuanuntukmengambilkeuntungandariarsitekturmultiprosesor.

  5. Kerugian Multithreading • Jikakitamenggunakan thread secaraberlebihankomputerakan crash / hang.

  6. Single and Multithreaded Processes

  7. User Threads • User threads didukungdiatas kerneldandiimplementasikanolehthread librarypada level user. • Library mendukungpembuatan thread, penjadwalan, danmanajementanpadukungandari kernel. • Karena kernel tidakmenyadariadanya user-level threads makapembuatansemua thread danpenjadwalandilakukan di dalam user space tanpaintervensidari kernel. • Kerugian: jikasalahsatu thread block, semua proses block

  8. Kernel Threads • Kernel threads didukungsecaralangsungdarisistemoperasi. Pembuatan thread, penjadwalan, danmanajemendilakukanolehsistemoperasi, secaraumum kernel threads lebihlambatuntukdibuatdibanding user thread. • Keuntungan: • SO dapatmenjadwalkan thread lain jikaadasalahsatu thread yang di block • SO dapatmenjadwalkan thread-thread pada multi processor

  9. Model Multithreading • Many to one memetakanbeberapa user-level threads kesatu kernel threads. • Examples: • Solaris Green Threads • GNU Portable Threads • Kelemahan: • Setiappenambahan thread pengguna • Memerlukanpenambahan thread kernel

  10. Model Multithreading • One to one memetakansetiap user thread kekernel thread. • Examples • Windows NT/XP/2000 • Linux • Solaris 9 and later • Keuntungan: • Konkurensi

  11. Model Multithreading • Many to many model memetakanbanyak user-level thread kekernel thread yang lebihsedikitatausama. Keuntungan User dapatmembuatbanyak thread, masing2 kernel thread dptjalan di lingkungan multiprocessor

  12. Pembatalan Thread • sebuahtugasuntukmemberhentikan thread sebelum thread tersebutselesai. • Contoh: JVM akanmematikanseluruh thread sblmmati • Thread yang akandiberhentikandisebut target thread. • Duaskenario thread cancellationn : • Asynchronous cancellation : satu thread memberhentikan target thread seketikaitujuga. • Deferred cancellation : target thread secaraperiodikdapatmengecekapakahiaharusberhenti, skenarioinimemberikesempatankepada target thread untukmemberhentikandirinyasendiri.

  13. Referensi • SISTEM OPERASI PROSES & THREAD, Ahmad Dahlan, http://dahlan.unimal.ac.id • [Silberschatz2005] AviSilberschatz, Peter Galvin, danGrag Gagne. 2005. Operating Systems Concepts. Seventh Edition. John Wiley & Sons. • http://yudiantosujana.files.wordpress.com/2010/03/so4.ppt

More Related