Computer Science 338 - Project 1

Here is the output from several other unix systems as produced by my implementation of the process tree and thread tree. All use a tree height of three.

Digital Unix 4.0, Alpha processor

using fork

[1] pid=14946, original parent child of ppid=24544
[2] pid=16499, "left"  child of 14946
[3] pid=18572, "right" child of 14946
  [4] pid=16675, "left"  child of 16499
  [5] pid=16497, "right" child of 16499
  [6] pid=14737, "left"  child of 18572
  [7] pid=18052, "right" child of 18572
    [8] pid=5891, "left"  child of 16675
    [9] pid=30514, "right" child of 16675
    [10] pid=2505, "left"  child of 16497
    [12] pid=5315, "left"  child of 14737
    [13] pid=11325, "right" child of 14737
    [11] pid=31819, "right" child of 16497
    [14] pid=15692, "left"  child of 18052
    [15] pid=9853, "right" child of 18052
    Child with PID 5891 terminated
    Child with PID 30514 terminated
  Child with PID 16675 terminated
    Child with PID 2505 terminated
    Child with PID 5315 terminated
    Child with PID 31819 terminated
    Child with PID 11325 terminated
    Child with PID 9853 terminated
    Child with PID 15692 terminated
  Child with PID 16497 terminated
  Child with PID 18052 terminated
  Child with PID 14737 terminated
Child with PID 16499 terminated
Child with PID 18572 terminated

Using pthreads

[1] pid=7479, original parent child of ppid=24544
[-1072125416] new thread, pid=7479
[-1072125416] created "left" child, thread_id=1074051456
  [1074051456] new thread, pid=7479
  [-1072125416] created "right" child, thread_id=1074116992
[1074051456] created "left" child, thread_id=1074182528
  [1074116992] new thread, pid=7479
    [1074182528] new thread, pid=7479
    [1074248064] new thread, pid=7479
    [1074313600] new thread, pid=7479
  [1074116992] created "left" child, thread_id=1074313600
  [1074051456] created "right" child, thread_id=1074248064
    [1074248064] created "left" child, thread_id=1074510208
      [1074510208] new thread, pid=7479
          [1074248064] created "right" child, thread_id=1074575744
    [1074313600] created "left" child, thread_id=1074444672
      [1074575744] new thread, pid=7479
      [1074575744] exiting
    [1074182528] created "left" child, thread_id=1074379136
    [1074182528] created "right" child, thread_id=1074706816
      [1074379136] new thread, pid=7479
      [1074379136] exiting
      [1074706816] new thread, pid=7479
      [1074706816] exiting
[1074510208] exiting
      [1074444672] new thread, pid=7479
      [1074444672] exiting
  [1074116992] created "right" child, thread_id=1074641280
      [1074772352] new thread, pid=7479
      [1074772352] exiting
    [1074313600] created "right" child, thread_id=1074772352
    [1074641280] new thread, pid=7479
    [1074641280] created "left" child, thread_id=1074837888
    [1074641280] created "right" child, thread_id=1074903424
      [1074837888] new thread, pid=7479
      [1074837888] exiting
    [1074182528] exiting
      [1074903424] new thread, pid=7479
      [1074903424] exiting
    [1074248064] exiting
    [1074313600] exiting
    [1074641280] exiting
  [1074051456] exiting
  [1074116992] exiting
[-1072125416] exiting

Linux 2.2, Intel x86

Using fork

[1] pid=6039, original parent child of ppid=6009
[2] pid=6040, "left"  child of 6039
[3] pid=6041, "right" child of 6039
  [4] pid=6042, "left"  child of 6040
  [5] pid=6043, "right" child of 6040
  [6] pid=6044, "left"  child of 6041
  [7] pid=6045, "right" child of 6041
    [8] pid=6046, "left"  child of 6042
    [10] pid=6048, "left"  child of 6043
    [11] pid=6049, "right" child of 6043
    [9] pid=6047, "right" child of 6042
    [14] pid=6052, "left"  child of 6045
    [12] pid=6050, "left"  child of 6044
    [15] pid=6053, "right" child of 6045
    [13] pid=6051, "right" child of 6044
    Child with PID 6048 terminated
    Child with PID 6046 terminated
    Child with PID 6049 terminated
  Child with PID 6043 terminated
    Child with PID 6047 terminated
  Child with PID 6042 terminated
Child with PID 6040 terminated
    Child with PID 6050 terminated
    Child with PID 6052 terminated
    Child with PID 6053 terminated
  Child with PID 6045 terminated
    Child with PID 6051 terminated
  Child with PID 6044 terminated
Child with PID 6041 terminated

Using pthreads

[1] pid=6063, original parent child of ppid=6009
[1024] new thread, pid=6063
[1024] created "left" child, thread_id=1026
  [1026] new thread, pid=6065
[1024] created "right" child, thread_id=2051
  [2051] new thread, pid=6066
  [1026] created "left" child, thread_id=3076
    [3076] new thread, pid=6067
  [2051] created "left" child, thread_id=4101
    [4101] new thread, pid=6068
  [1026] created "right" child, thread_id=5126
    [5126] new thread, pid=6069
    [3076] created "left" child, thread_id=6151
      [6151] new thread, pid=6070
      [6151] exiting
  [2051] created "right" child, thread_id=7176
    [7176] new thread, pid=6071
    [4101] created "left" child, thread_id=8201
      [8201] new thread, pid=6072
      [8201] exiting
    [5126] created "left" child, thread_id=9226
      [9226] new thread, pid=6073
      [9226] exiting
    [3076] created "right" child, thread_id=10251
      [10251] new thread, pid=6074
      [10251] exiting
    [3076] exiting
    [7176] created "left" child, thread_id=11276
      [11276] new thread, pid=6075
      [11276] exiting
    [4101] created "right" child, thread_id=12301
      [12301] new thread, pid=6076
      [12301] exiting
    [4101] exiting
    [5126] created "right" child, thread_id=13326
      [13326] new thread, pid=6077
      [13326] exiting
    [5126] exiting
  [1026] exiting
    [7176] created "right" child, thread_id=14340
      [14340] new thread, pid=6078
      [14340] exiting
    [7176] exiting
  [2051] exiting
[1024] exiting

AIX 4.3, IBM RS6000

Using fork

[1] pid=35666, original parent child of ppid=42674
[2] pid=36402, "left"  child of 35666
[3] pid=38202, "right" child of 35666
  [4] pid=41948, "left"  child of 36402
  [6] pid=34404, "left"  child of 38202
  [5] pid=44566, "right" child of 36402
  [7] pid=33430, "right" child of 38202
    [8] pid=36320, "left"  child of 41948
    [12] pid=32322, "left"  child of 34404
    [9] pid=38572, "right" child of 41948
    [10] pid=41650, "left"  child of 44566
    [13] pid=44880, "right" child of 34404
    [14] pid=40666, "left"  child of 33430
    [11] pid=38748, "right" child of 44566
    [15] pid=36704, "right" child of 33430
    Child with PID 36320 terminated
    Child with PID 32322 terminated
    Child with PID 38572 terminated
    Child with PID 44880 terminated
  Child with PID 41948 terminated
    Child with PID 40666 terminated
    Child with PID 41650 terminated
    Child with PID 38748 terminated
    Child with PID 36704 terminated
  Child with PID 34404 terminated
  Child with PID 44566 terminated
  Child with PID 33430 terminated
Child with PID 36402 terminated
Child with PID 38202 terminated

Using pthreads

[1] pid=43332, original parent child of ppid=42674
[1] new thread, pid=43332
[1] created "left" child, thread_id=258
[1] created "right" child, thread_id=515
  [258] new thread, pid=43332
  [258] created "left" child, thread_id=772
  [258] created "right" child, thread_id=1029
  [515] new thread, pid=43332
  [515] created "left" child, thread_id=1286
  [515] created "right" child, thread_id=1543
    [772] new thread, pid=43332
    [772] created "left" child, thread_id=1800
    [772] created "right" child, thread_id=2057
    [1029] new thread, pid=43332
    [1286] new thread, pid=43332
    [1029] created "left" child, thread_id=2314
    [1286] created "left" child, thread_id=2571
    [1029] created "right" child, thread_id=2828
    [1286] created "right" child, thread_id=3085
    [1543] new thread, pid=43332
      [1800] new thread, pid=43332
          [1800] exiting
[1543] created "left" child, thread_id=3342
      [2057] new thread, pid=43332
          [1543] created "right" child, thread_id=3599
[2057] exiting
            [2314] new thread, pid=43332
    [2571] new thread, pid=43332
        [2314] exiting
[2571] exiting
      [2828] new thread, pid=43332
            [3085] new thread, pid=43332
      [3085] exiting
[2828] exiting
      [3342] new thread, pid=43332
        [772] exiting
  [3342] exiting
      [3599] new thread, pid=43332
          [1029] exiting
[3599] exiting
    [1286] exiting
  [258] exiting
    [1543] exiting
  [515] exiting
[1] exiting

Irix 6.5, SGI R10000

Using fork

[1] pid=150995, original parent child of ppid=132139
[2] pid=144276, "left"  child of 150995
[3] pid=149985, "right" child of 150995
  [4] pid=150148, "left"  child of 144276
  [5] pid=132804, "right" child of 144276
  [6] pid=131035, "left"  child of 149985
  [7] pid=141907, "right" child of 149985
    [8] pid=147721, "left"  child of 150148
    [9] pid=142332, "right" child of 150148
    [10] pid=149191, "left"  child of 132804
    [14] pid=148531, "left"  child of 141907
    [11] pid=146023, "right" child of 132804
    [12] pid=149892, "left"  child of 131035
    [13] pid=146817, "right" child of 131035
    [15] pid=148812, "right" child of 141907
    Child with PID 147721 terminated
    Child with PID 142332 terminated
  Child with PID 150148 terminated
    Child with PID 149191 terminated
    Child with PID 148531 terminated
    Child with PID 146023 terminated
    Child with PID 148812 terminated
  Child with PID 132804 terminated
    Child with PID 149892 terminated
    Child with PID 146817 terminated
  Child with PID 141907 terminated
Child with PID 144276 terminated
  Child with PID 131035 terminated
Child with PID 149985 terminated

Using pthreads

[1] pid=149571, original parent child of ppid=132139
[65536] new thread, pid=149571
[65536] created "left" child, thread_id=65537
  [65537] new thread, pid=149571
  [65537] created "left" child, thread_id=65538
  [65537] created "right" child, thread_id=65539
[65536] created "right" child, thread_id=65540
        [65540] new thread, pid=149571
  [65538] new thread, pid=149571
  [65539] new thread, pid=149571
    [65540] created "left" child, thread_id=65541
                  [65541] new thread, pid=149571
  [65538] created "left" child, thread_id=65542
[65540] created "right" child, thread_id=65544
    [65539] created "left" child, thread_id=65543
          [65542] new thread, pid=149571
[65544] new thread, pid=149571
      [65543] new thread, pid=149571
              [65541] created "left" child, thread_id=65545
        [65538] created "right" child, thread_id=65546
    [65539] created "right" child, thread_id=65547
          [65545] new thread, pid=149571
[65546] new thread, pid=149571
  [65544] created "left" child, thread_id=65548
    [65547] new thread, pid=149571
        [65542] exiting
  [65548] new thread, pid=149571
  [65541] created "right" child, thread_id=65549
    [65543] exiting
            [65549] new thread, pid=149571
    [65544] created "right" child, thread_id=65550
        [65545] exiting
[65546] exiting
  [65550] new thread, pid=149571
[65547] exiting
  [65548] exiting
            [65549] exiting
  [65538] exiting
  [65539] exiting
  [65550] exiting
    [65541] exiting
  [65537] exiting
  [65544] exiting
  [65540] exiting
[65536] exiting