Mutual Exclusion with Variable Lock Method

Mutual Exclusion with Variable Lock Method
paly

Mutual Exclusion with Variable Lock method is a mechanism used to ensure that only one process can access the critical section at a time. It works by assigning a lock variable to the critical

  • Uploaded on | 0 Views
  • jessie jessie

About Mutual Exclusion with Variable Lock Method

PowerPoint presentation about 'Mutual Exclusion with Variable Lock Method'. This presentation describes the topic on Mutual Exclusion with Variable Lock method is a mechanism used to ensure that only one process can access the critical section at a time. It works by assigning a lock variable to the critical. The key topics included in this slideshow are . Download this presentation absolutely free.

Presentation Transcript


Slide1Mutual Exclution Mutual  Exclution Dosen: Jajang Kusnendar, M.T Metode  Variable Lock

Slide2Variable Lock Variable  Lock • Sebuah Mekanisme untuk menjamin  Mutual Exclution • Setiap proses yang akan memasuki  Critical Section harus melakukan pengecekan terhadap nilai  lock variable . > Jika 0 , berarti proses dapat memasuki  Critical Section >  Jika 1 , maka proses harus menunggu sampai  lock variable  = 0

Slide3Variable Lock(1) Variable  Lock(1) Kelemahan/Kesalahan : 2 buah proses dapat memasuki critical section pada saat yang bersamaan Hal ini disebut dengan  Race Condition

Slide4Simulasi Variable  Lock Simulasi  Variable  Lock PLAY

Slide5Lock = 1Lock = 0 P2 P2 P3 P3 Cek OK ! Masuk Critical Section CRITICAL SECTION P1 P1

Slide6Lock = 0Lock = 1 Lock = 0 P3 P3 CRITICAL SECTION P1 P1 wait OK ! Masuk Critical Section P2 P2

Slide7Pemberian Variable Lock  adalah agar dalam 1 waktu , hanya ada 1 proses pada Critical Section

Slide8SimulasiKesalahan  Variable  Lock Simulasi Kesalahan  Variable  Lock PLAY

Slide9CRITICAL SECTIONP3 P3 P2 P2 P1 P1 Lock = 0 OK ! Masuk Critical Section Lock = 1 Race Condition

Slide10Race Condition adalah situasi di mana beberapa proses mengakses dan memanipulasi data bersamaan pada satu waktu yang sama

Slide11Terima Kasih

Slide12Kelompok :Ade Nining Suryani (1002407) Aditiarana (1002492) Annisa Turradyah (1000045) Diyana Susanti (1001094)