Académique Documents
Professionnel Documents
Culture Documents
long P2(int i)
{
static long b=0;
if(i==1)
{
p+=;
P3(1);
P4(1);
return 1;
}
else return b;
}
long P3(int i)
{
static long c=0;
if(i==1)
{
C++;
return 1;
else
return(j)
}
long P4(int i)
{
static long d=0;
if(i==1)
{
d++;
P3(1);
return 1;
}
else
return d;
}
OUTPUT:
Enter process no. 1
Logical Clock
P1: 1096396
P2: 1096396
P3: 2192792
P4: 1096396