Algoritmo del Repostero - Explicación

Algoritmo del Repostero - Explicación - SC Si definimos...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Repeat status[i]:=true; turno[i]:=max(turno[0], turno[1], . .., turno[n-1])+1; status[i]:=false; for j:=0 to n-1   do begin     while status [j]  do no-op;     while turno [j] ≠≠ 0       and (turno[j],j) < (turno[i],i)  do no-op; end; SECCIÓN CRÍTICA turno[i]:=0; Otro código del proceso Until false; P 0   (i=0) P 1   (i=1) P 2   (i=2) i 0 1 2 status (i) F F F turno(i) 1 2 3 J 0, 1, 2,3 0
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: SC Si definimos la siguiente notación: (a , b) < (c, d) si a < c ó si a = c y b < d Max[a(0), a(1), . . . . . . . a(n-1)] es un número k tal que : k >= a(i) para todo i = 0, 1, 2, . . . . . n-1 Algoritmo del Repostero...
View Full Document

This note was uploaded on 09/30/2011 for the course SISTEMAS O 1 taught by Professor Garza during the Spring '11 term at ITESM.

Ask a homework question - tutors are online