x = 20; y = 30; count = 1; while (count < 3) { if ( x != 0) { x = fork(); - PowerPoint PPT Presentation

slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
x = 20; y = 30; count = 1; while (count < 3) { if ( x != 0) { x = fork(); PowerPoint Presentation
Download Presentation
x = 20; y = 30; count = 1; while (count < 3) { if ( x != 0) { x = fork();

play fullscreen
1 / 4
x = 20; y = 30; count = 1; while (count < 3) { if ( x != 0) { x = fork();
194 Views
Download Presentation
xiang
Download Presentation

x = 20; y = 30; count = 1; while (count < 3) { if ( x != 0) { x = fork();

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. PID 100 x = 20 y = 30 count = 1 PID 100 x = 150 y = 30 count = 1 PID 100 x = 150 y = 50 count = 1 PID 100 x = 150 y = 50 count = 2 PID 100 x = 250 y = 50 count = 2 PID 100 x = 250 y = 70 count = 2 PID 100 x = 250 y = 70 count = 3 PID 150 x = 0 y = 30 count = 1 x = 20; y = 30; count = 1; while (count < 3) { if ( x != 0) { x = fork(); y = y + 20; } else { x = fork(); y = y + 35; } count = count + 1; } PID 250 x = 0 y = 50 count = 2

  2. PID 100 x = 20 y = 30 count = 1 PID 100 x = 150 y = 30 count = 1 PID 100 x = 150 y = 50 count = 1 PID 100 x = 150 y = 50 count = 2 PID 100 x = 250 y = 50 count = 2 PID 100 x = 250 y = 70 count = 2 PID 100 x = 250 y = 70 count = 3 PID 150 x = 0 y = 30 count = 1 PID 150 x = 0 y = 50 count = 1 PID 150 x = 0 y = 50 count = 2 PID 150 x = 350 y = 50 count = 2 PID 150 x = 350 y = 85 count = 2 PID 150 x = 350 y = 85 count = 3 PID 350 x = 0 y = 50 count = 2 x = 20; y = 30; count = 1; while (count < 3) { if ( x != 0) { x = fork(); y = y + 20; } else { x = fork(); y = y + 35; } count = count + 1; } PID 250 x = 0 y = 50 count = 2

  3. PID 100 x = 250 y = 50 count = 2 PID 100 x = 20 y = 30 count = 1 PID 100 x = 150 y = 30 count = 1 PID 100 x = 150 y = 50 count = 1 PID 100 x = 150 y = 50 count = 2 PID 100 x = 250 y = 70 count = 2 PID 100 x = 250 y = 70 count = 3 PID 150 x = 0 y = 50 count = 2 PID 150 x = 0 y = 50 count = 1 PID 150 x = 350 y = 50 count = 2 PID 150 x = 350 y = 85 count = 3 PID 150 x = 0 y = 30 count = 1 PID 150 x = 350 y = 85 count = 2 PID 350 x = 0 y = 85 count = 3 PID 350 x = 0 y = 50 count = 2 PID 350 x = 0 y = 85 count = 2 x = 20; y = 30; count = 1; while (count < 3) { if ( x != 0) { x = fork(); y = y + 20; } else { x = fork(); y = y + 35; } count = count + 1; } PID 250 x = 0 y = 50 count = 2

  4. PID 100 x = 250 y = 70 count = 2 PID 100 x = 20 y = 30 count = 1 PID 100 x = 150 y = 30 count = 1 PID 100 x = 150 y = 50 count = 1 PID 100 x = 150 y = 50 count = 2 PID 100 x = 250 y = 50 count = 2 PID 100 x = 250 y = 70 count = 3 PID 150 x = 350 y = 85 count = 3 PID 150 x = 350 y = 85 count = 2 PID 150 x = 350 y = 50 count = 2 PID 150 x = 0 y = 50 count = 2 PID 150 x = 0 y = 50 count = 1 PID 150 x = 0 y = 30 count = 1 PID 350 x = 0 y = 50 count = 2 PID 350 x = 0 y = 85 count = 3 PID 350 x = 0 y = 85 count = 2 x = 20; y = 30; count = 1; while (count < 3) { if ( x != 0) { x = fork(); y = y + 20; } else { x = fork(); y = y + 35; } count = count + 1; } PID 250 x = 0 y = 50 count = 2 PID 250 x = 0 y = 70 count = 2 PID 250 x = 0 y = 70 count = 3