Index: doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/barrier.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/barrier.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
+++ doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/barrier.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
@@ -0,0 +1,144 @@
+#include <locks.hfa>
+#include <fstream.hfa>
+#include <stdio.h>
+#include <channel.hfa>
+#include <thread.hfa>
+#include <time.hfa>
+#include <string.h>
+
+size_t total_operations = 0;
+int Processors = 1, Tasks = 1, BarrierSize = 2;
+
+typedef channel( int ) Channel;
+
+Channel * barWait;
+Channel * entryWait;
+owner_lock o;
+
+bool done = false;
+size_t tasks_done = 0;
+
+static inline void flushBarrier() {
+    for ( j; BarrierSize ) {
+        insert( *entryWait, -1 );
+        insert( *barWait, -1 );
+    }
+}
+
+static inline void initBarrier() {
+    for ( j; BarrierSize )
+        insert( *entryWait, j );
+}
+
+static inline void barrier() {
+    int ticket = remove( *entryWait );
+    if ( ticket == -1 ) {
+		insert( *entryWait, -1 );
+		return;
+	}
+    if ( ticket == BarrierSize - 1 ) {
+		for ( j; BarrierSize - 1 )
+            insert( *barWait, j );
+        return;
+	}
+    ticket = remove( *barWait );
+    if ( ticket == -1 ) {
+		insert( *barWait, -1 );
+		return;
+	}
+
+	// last one out
+	if ( BarrierSize == 1 || ticket == BarrierSize - 2 ) {
+		for ( j; BarrierSize )
+            insert( *entryWait, j );
+	}
+}
+
+thread Task {};
+static inline void ?{}( Task & p, cluster & clu ) {
+    ((thread &)p){ clu };
+}
+void main(Task & this) {
+    size_t runs = 0;
+    for ( ;; ) {
+        if ( done ) break;
+        barrier();
+        runs++;
+    }
+    lock(o);
+    total_operations += runs;
+    // sout | "P: " | runs;
+    unlock(o);
+}
+
+
+int main( int argc, char * argv[] ) {
+    switch ( argc ) {
+	  case 3:
+		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
+			BarrierSize = atoi( argv[2] );
+            if ( Processors < 1 ) goto Usage;
+		} // if
+	  case 2:
+		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
+			Processors = atoi( argv[1] );
+			if ( Processors < 1 ) goto Usage;
+		} // if
+	  case 1:											// use defaults
+		break;
+	  default:
+	  Usage:
+		sout | "Usage: " | argv[0]
+             | " [ processors (> 0) | 'd' (default " | Processors
+			 | ") ] [ BarrierSize (> 0) | 'd' (default " | BarrierSize
+			 | ") ]" ;
+		exit( EXIT_FAILURE );
+	} // switch
+    Tasks = Processors;
+    if ( Tasks < BarrierSize )
+        Tasks = BarrierSize;
+
+    size_t Clusters = 1;
+    // create a cluster
+    cluster clus[Clusters];
+    processor * proc[Processors];
+    for ( i; Processors ) {
+        (*(proc[i] = malloc())){clus[i % Clusters]};
+    }
+
+    Channel entry{ 2 * BarrierSize };
+    Channel wait{ 2 * BarrierSize };
+
+    entryWait = &entry;
+    barWait = &wait;
+
+    initBarrier();
+    // sout | "Processors: " | Processors | " ProdsPerChan: " | Producers | " ConsPerChan: " | Consumers | "Channels: " | Channels | " Channel Size: " | ChannelSize;
+
+    // sout | "start";
+    Task * t[Tasks];
+
+    for ( i; Tasks ) {
+        (*(t[i] = malloc())){ clus[i % Clusters] };
+    }
+
+    sleep(10`s);
+    done = true;
+
+    // sout | "sleep";
+
+    flushBarrier();
+
+    for ( i; Tasks ) {
+        delete(t[i]);
+    }
+    
+    sout | total_operations;
+    // print_stats_now( *active_cluster(), CFA_STATS_READY_Q);
+
+    for ( i; Processors ) {
+        delete(proc[i]);
+    }
+    // sout | "done";
+    return 0;
+}
Index: doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/churn.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/churn.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
+++ doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/churn.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
@@ -0,0 +1,164 @@
+#include <locks.hfa>
+#include <fstream.hfa>
+#include <stdio.h>
+#include <string.h>
+#include "channel.hfa"
+#include <thread.hfa>
+#include <time.hfa>
+#include <stats.hfa>
+size_t Processors = 1, Channels = 4, Producers = 1, Consumers = 1, ChannelSize = 128;
+
+owner_lock o;
+
+size_t total_operations = 0;
+size_t cons_check = 0, prod_check = 0;
+
+channel( size_t ) * channels;
+thread Consumer {};
+bool cons_done = false, prod_done = false;
+volatile int cons_done_count = 0;
+
+void getRandArray( int * chanIndices ) {
+    for ( int i = 0; i < Channels; i++ ) {
+        chanIndices[i] = i;
+    }
+    for ( int i = 0; i < Channels; i++ ) {
+        int loc_1 = prng() % Channels;
+        int loc_2 = prng() % Channels;
+        int temp = chanIndices[ loc_1 ];
+        chanIndices[ loc_1 ] = chanIndices[ loc_2 ];
+        chanIndices[ loc_2 ] = temp;
+    }
+}
+
+void main(Consumer & this) {
+    size_t i = 0;
+    size_t runs = 0;
+    size_t my_check = 0;
+    int chanIndices[Channels];
+    getRandArray( chanIndices );
+    
+    for ( ;;i++ ) {
+        if ( cons_done ) break;
+        size_t j = remove( channels[ chanIndices[ i % Channels ] ] );
+        my_check = my_check ^ j;
+        if ( !prod_done ) runs++;
+    }
+    lock(o);
+    total_operations += runs;
+    cons_done_count++;
+    cons_check = cons_check ^ my_check;
+    // sout | "Cons: " | runs;
+    unlock(o);
+}
+
+thread Producer {};
+
+void main(Producer & this) {
+    size_t i = 0;
+    size_t runs = 0;
+    size_t my_check = 0;
+    int chanIndices[Channels];
+    getRandArray( chanIndices );
+    for ( ;;i++ ) {
+        if ( prod_done ) break;
+        insert( channels[ chanIndices[ i % Channels ] ], i );
+        my_check = my_check ^ i;
+        runs++;
+    }
+    lock(o);
+    total_operations += runs;
+    prod_check = prod_check ^ my_check;
+    // sout | "Prods: " | runs;
+    unlock(o);
+}
+
+
+int main( int argc, char *argv[] ) {
+    switch( argc ) {
+      case 4:
+		if ( strcmp( argv[3], "d" ) != 0 ) {			// default ?
+			if ( atoi( argv[3] ) < 1 ) goto Usage;
+			ChannelSize = atoi( argv[3] );
+		} // if
+      case 3:
+		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
+			if ( atoi( argv[2] ) < 1 ) goto Usage;
+			Channels = atoi( argv[2] );
+		} // if
+      case 2:
+		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
+			if ( atoi( argv[1] ) < 1 ) goto Usage;
+			Processors = atoi( argv[1] );
+		} // if
+	  case 1:											// use defaults
+		break;
+	  default:
+	  Usage:
+		sout | "Usage: " | argv[0]
+             | " [ processors > 0 | d ]"
+             | " [ producers > 0 | d ]"
+             | " [ consumers > 0 | d ]"
+             | " [ channels > 0 | d ]";
+		exit( EXIT_FAILURE );
+    }
+    processor p[Processors - 1];
+    channels = anew( Channels );
+    Producers = Processors / 2;
+    Consumers = Processors / 2;
+
+    // sout | "Processors: " | Processors | " Producers: " | Producers | " Consumers: " | Consumers | "Channels: " | Channels | " Channel Size: " | ChannelSize;
+
+    for ( i; Channels ) {
+        channels[i]{ ChannelSize };
+    }
+
+    // sout | "start";
+    {   
+        Consumer c[Consumers];
+        {
+            Producer p[Producers];
+            sleep(10`s);
+            prod_done = true;
+            // sout | "sleep";
+        }
+        // sout | "prods";
+        cons_done = true;
+        // for ( i; Channels ) {
+        //     if ( get_count( channels[i] ) < Consumers ){
+        //         for ( j; Consumers ) insert( channels[i], 0 );
+        //     }
+        // }
+        while( cons_done_count != Consumers ) {
+            for ( i; Channels ) {
+                if ( has_waiters( channels[i] ) ){
+                    insert( channels[i], 0 );
+                }
+            }
+        }
+    }
+    // sout | "cons";
+
+    for ( i; Channels ) {
+        for ( ;; ) {
+            if ( get_count( channels[i] ) > 0 ) {
+                size_t j = remove( channels[ i ] );
+                cons_check = cons_check ^ j;
+            } else break;
+        }
+    }
+
+    adelete( channels );
+
+    if ( cons_check != prod_check )
+        sout | "CHECKSUM MISMATCH !!!";
+    // print_stats_now( *active_cluster(), CFA_STATS_READY_Q);
+
+    // for ( i; Processors ) {
+    //     delete(proc[i]);
+    // }
+
+    sout | total_operations;
+    // print_stats_now( *active_cluster(), CFA_STATS_READY_Q );
+    return 0;
+}
Index: doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/contend.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/contend.cfa	(revision 2f6a9391fb8df95071d5a97f144de723657b7e5d)
+++ doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/contend.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
@@ -8,9 +8,9 @@
 
 // user defines this
-#define BIG 1
+// #define BIG 1
 
 owner_lock o;
 
-unsigned long long total_operations = 0;
+size_t total_operations = 0;
 
 struct bigObject {
@@ -36,5 +36,5 @@
 Channel * channels;
 
-volatile bool cons_done = false, prod_done = false;
+bool cons_done = false, prod_done = false;
 volatile int cons_done_count = 0;
 size_t cons_check = 0, prod_check = 0;
@@ -48,5 +48,5 @@
 }
 void main(Consumer & this) {
-    unsigned long long runs = 0;
+    size_t runs = 0;
     size_t my_check = 0;
     for ( ;; ) {
@@ -78,14 +78,15 @@
 }
 void main(Producer & this) {
-    unsigned long long runs = 0;
+    size_t runs = 0;
     size_t my_check = 0;
+    size_t my_id = this.i;
     for ( ;; ) {
         if ( prod_done ) break;
         #ifdef BIG
         bigObject j{(size_t)runs};
-        insert( channels[ this.i ], j );
+        insert( channels[ my_id ], j );
         my_check = my_check ^ (j.a + j.b + j.c + j.d + j.d + j.e + j.f + j.g + j.h);
         #else
-        insert( channels[ this.i ], (size_t)runs );
+        insert( channels[ my_id ], (size_t)runs );
         my_check = my_check ^ ((size_t)runs);
         #endif
@@ -99,11 +100,11 @@
 }
 
-int test( size_t Processors, size_t Channels, size_t Producers, size_t Consumers, size_t ChannelSize ) {
-    size_t Clusters = Processors;
+static inline int test( size_t Processors, size_t Channels, size_t Producers, size_t Consumers, size_t ChannelSize ) {
+    size_t Clusters = 1;
     // create a cluster
     cluster clus[Clusters];
     processor * proc[Processors];
     for ( i; Processors ) {
-        (*(proc[i] = alloc())){clus[i % Clusters]};
+        (*(proc[i] = malloc())){clus[i % Clusters]};
     }
 
@@ -120,10 +121,12 @@
     Producer * p[Producers * Channels];
 
-    for ( i; Consumers * Channels ) {
-        (*(c[i] = alloc())){ i % Channels, clus[i % Clusters] };
-    }
-
-    for ( i; Producers * Channels ) {
-        (*(p[i] = alloc())){ i % Channels, clus[i % Clusters] };
+    for ( j; Channels ) {
+        for ( i; Producers ) {
+            (*(p[i] = malloc())){ j, clus[j % Clusters] };
+        }
+
+        for ( i; Consumers ) {
+            (*(c[i] = malloc())){ j, clus[j % Clusters] };
+        }
     }
 
@@ -148,5 +151,4 @@
             }
         }
-        
     }
 
@@ -185,5 +187,5 @@
 
 int main( int argc, char * argv[] ) {
-    size_t Processors = 10, Channels = 1, Producers = 10, Consumers = 10, ChannelSize = 128;
+    size_t Processors = 1, Channels = 1, Producers = 1, Consumers = 1, ChannelSize = 128;
     switch ( argc ) {
 	  case 3:
@@ -206,6 +208,6 @@
 		exit( EXIT_FAILURE );
 	} // switch
-    Producers = Processors;
-    Consumers = Processors;
+    Producers = Processors / 2;
+    Consumers = Processors / 2;
     test(Processors, Channels, Producers, Consumers, ChannelSize);
 }
Index: doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/daisy_chain.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/daisy_chain.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
+++ doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/daisy_chain.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
@@ -0,0 +1,77 @@
+#include <locks.hfa>
+#include <fstream.hfa>
+#include <stdio.h>
+#include <channel.hfa>
+#include <thread.hfa>
+#include <time.hfa>
+#include <string.h>
+
+size_t total_operations = 0;
+size_t Processors = 1, Tasks = 1;
+
+owner_lock o;
+
+// typedef channel_base( int, exp_backoff_then_block_lock ) Channel;
+typedef channel( int ) Channel;
+
+Channel * chain;
+
+bool done = false;
+
+thread Task {};
+void main(Task & this) {
+    size_t runs = 0;
+    for ( ;; ) {
+        if ( done ) break;
+        remove( *chain );
+        insert( *chain, 0 );
+        runs++;
+    }
+    lock( o );
+    total_operations += runs;
+    unlock( o );
+}
+
+
+int main( int argc, char * argv[] ) {
+    switch ( argc ) {
+	  case 3:
+		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
+			Tasks = atoi( argv[2] );
+            if ( Tasks < 1 ) goto Usage;
+		} // if
+	  case 2:
+		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
+			Processors = atoi( argv[1] );
+			if ( Processors < 1 ) goto Usage;
+		} // if
+	  case 1:											// use defaults
+		break;
+	  default:
+	  Usage:
+		sout | "Usage: " | argv[0]
+             | " [ processors (> 0) | 'd' (default " | Processors
+			 | ") ] [ channel size (>= 0) | 'd' (default " | Tasks
+			 | ") ]" ;
+		exit( EXIT_FAILURE );
+	} // switch
+    Tasks = Processors;
+    processor proc[Processors - 1];
+
+    Channel chainChan{ 2 * Tasks };
+
+    insert( chainChan, 0 );
+
+    chain = &chainChan;    
+    {
+        Task t[Tasks];
+        sleep(10`s);
+        done = true;
+        for ( j; Tasks )
+            insert( chainChan, 0 );
+    }
+    
+    sout | total_operations;
+
+    return 0;
+}
Index: doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/hot_potato.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/hot_potato.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
+++ doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/hot_potato.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
@@ -0,0 +1,86 @@
+#include <locks.hfa>
+#include <fstream.hfa>
+#include <stdio.h>
+#include <channel.hfa>
+#include <thread.hfa>
+#include <time.hfa>
+#include <string.h>
+
+size_t total_operations = 0;
+size_t Processors = 1, Tasks = 1;
+
+owner_lock o;
+
+// typedef channel_base( int, exp_backoff_then_block_lock ) Channel;
+typedef channel( int ) Channel;
+
+Channel * chain;
+
+bool done = false;
+int id_counter = 0;
+thread Task { int id; int right; };
+static inline void ?{}( Task & this ) with(this) {
+    id = __atomic_fetch_add( &id_counter, 1, __ATOMIC_SEQ_CST );
+    right = (id + 1) % Tasks;
+}
+void main(Task & this) with(this) {
+    size_t runs = 0;
+    int my_id = id;
+    int my_right = right;
+    for ( ;; ) {
+        if ( done ) break;
+        remove( chain[my_id] );
+        insert( chain[my_right], 0 );
+        runs++;
+    }
+    lock( o );
+    total_operations += runs;
+    unlock( o );
+}
+
+
+int main( int argc, char * argv[] ) {
+    switch ( argc ) {
+	  case 3:
+		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
+			Tasks = atoi( argv[2] );
+            if ( Tasks < 1 ) goto Usage;
+		} // if
+	  case 2:
+		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
+			Processors = atoi( argv[1] );
+			if ( Processors < 1 ) goto Usage;
+		} // if
+	  case 1:											// use defaults
+		break;
+	  default:
+	  Usage:
+		sout | "Usage: " | argv[0]
+             | " [ processors (> 0) | 'd' (default " | Processors
+			 | ") ] [ channel size (>= 0) | 'd' (default " | Tasks
+			 | ") ]" ;
+		exit( EXIT_FAILURE );
+	} // switch
+    Tasks = Processors;
+    processor proc[Processors - 1];
+
+    chain = aalloc( Tasks );
+    for ( i; Tasks ) {
+        chain[i]{ 3 };
+    }
+
+    insert( chain[0], 0 );
+    {
+        Task t[Tasks];
+        sleep(10`s);
+        done = true;
+        for ( j; Tasks )
+            insert( chain[j], 0 );
+    }
+    
+    sout | total_operations;
+
+    adelete(chain);
+
+    return 0;
+}
Index: doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/ping_pong.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/ping_pong.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
+++ doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/ping_pong.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
@@ -0,0 +1,62 @@
+#include <locks.hfa>
+#include <fstream.hfa>
+#include <stdio.h>
+#include <channel.hfa>
+#include <thread.hfa>
+#include <time.hfa>
+#include <string.h>
+
+size_t total_operations = 0;
+
+// typedef channel_base( int, exp_backoff_then_block_lock ) Channel;
+typedef channel( int ) Channel;
+
+Channel * ping;
+Channel * pong;
+
+bool done = false;
+
+thread Pong {};
+void main(Pong & this) {
+    for ( ;; ) {
+        if ( done ) break;
+        insert( *ping, 0 );
+        remove( *pong );
+    }
+}
+
+thread Ping {};
+void main(Ping & this) {
+    size_t runs = 0;
+    for ( ;; ) {
+        if ( done ) break;
+        remove( *ping );
+        insert( *pong, 1 );
+        total_operations++;
+    }
+}
+
+
+int main( int argc, char * argv[] ) {
+    processor proc[1];
+
+    Channel pingChan{ 2 };
+    Channel pongChan{ 2 };
+
+    ping = &pingChan;
+    pong = &pongChan;
+    
+    {
+        Ping pi;
+        Pong po;
+        sleep(10`s);
+        done = true;
+        insert( *pong, 2 );
+        insert( *ping, 2 );
+    }
+    
+    sout | total_operations;
+
+    // sout | "done";
+    return 0;
+}
Index: doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/pub_sub.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/pub_sub.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
+++ doc/theses/colby_parsons_MMAth/benchmarks/channels/cfa/pub_sub.cfa	(revision 76a84008dfde0f229572e7660c20a913b9486a59)
@@ -0,0 +1,168 @@
+#include <locks.hfa>
+#include <fstream.hfa>
+#include <stdio.h>
+#include <channel.hfa>
+#include <thread.hfa>
+#include <time.hfa>
+#include <string.h>
+#include <mutex_stmt.hfa>
+
+size_t total_operations = 0;
+size_t Processors = 1, Tasks = 1;
+
+typedef channel( size_t ) Channel;
+
+channel( int ) * barWait;
+channel( int ) * entryWait;
+int BarrierSize = 1;
+static inline void flushBarrier() {
+    for ( j; BarrierSize ) {
+        insert( *entryWait, -1 );
+        insert( *barWait, -1 );
+    }
+}
+
+static inline void initBarrier() {
+    for ( j; BarrierSize )
+        insert( *entryWait, j );
+}
+
+static inline void barrier() {
+    int ticket = remove( *entryWait );
+    if ( ticket == -1 ) {
+		insert( *entryWait, -1 );
+		return;
+	}
+    if ( ticket == BarrierSize - 1 ) {
+		for ( j; BarrierSize - 1 )
+            insert( *barWait, j );
+        return;
+	}
+    ticket = remove( *barWait );
+    if ( ticket == -1 ) {
+		insert( *barWait, -1 );
+		return;
+	}
+
+	// last one out
+	if ( BarrierSize == 1 || ticket == BarrierSize - 2 ) {
+		for ( j; BarrierSize )
+            insert( *entryWait, j );
+	}
+}
+
+Channel ** chans;
+owner_lock o;
+
+bool done = false;
+size_t tasks_done = 0;
+
+thread Task { size_t id; };
+static inline void ?{}( Task & p, size_t i, cluster & clu ) {
+    ((thread &)p){ clu };
+    p.id = i;
+}
+void main(Task & this) with(this) {
+    size_t runs = 0;
+    size_t my_id = id;
+    for ( ;; ) {
+        if ( done ) break;
+
+        // publish
+        for ( i; Tasks ) {
+            insert(*chans[my_id], i);
+        }
+
+        // subscribe
+        for ( i; Tasks ) {
+            remove( *chans[i] );
+        }
+        barrier();
+        runs++;
+    }
+    lock(o);
+    total_operations += runs;
+    // sout | "P: " | runs;
+    unlock(o);
+}
+
+
+int main( int argc, char * argv[] ) {
+    switch ( argc ) {
+	  case 3:
+		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
+			Tasks = atoi( argv[2] );
+            if ( Tasks < 1 ) goto Usage;
+		} // if
+	  case 2:
+		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
+			Processors = atoi( argv[1] );
+			if ( Processors < 1 ) goto Usage;
+		} // if
+	  case 1:											// use defaults
+		break;
+	  default:
+	  Usage:
+		sout | "Usage: " | argv[0]
+             | " [ processors (> 0) | 'd' (default " | Processors
+			 | ") ] [ Tasks (> 0) | 'd' (default " | Tasks
+			 | ") ]" ;
+		exit( EXIT_FAILURE );
+	} // switch
+    Tasks = Processors;
+    BarrierSize = Tasks;
+
+    size_t Clusters = 1;
+    // create a cluster
+    cluster clus[Clusters];
+    processor * proc[Processors];
+    for ( i; Processors ) {
+        (*(proc[i] = malloc())){clus[i % Clusters]};
+    }
+
+    chans = aalloc( Tasks );
+    for ( i; Tasks ) {
+        chans[i] = malloc();
+        (*chans[i]){ 2 * Tasks };
+    }
+        
+
+    // setup barrier
+    channel(int) entry{ 2 * BarrierSize };
+    channel(int) wait{ 2 * BarrierSize };
+    entryWait = &entry;
+    barWait = &wait;
+    initBarrier();
+
+    // sout | "Processors: " | Processors | " ProdsPerChan: " | Producers | " ConsPerChan: " | Consumers | "Channels: " | Channels | " Channel Size: " | ChannelSize;
+
+    // sout | "start";
+    Task * t[Tasks];
+
+    for ( i; Tasks ) {
+        (*(t[i] = malloc())){ i, clus[i % Clusters] };
+    }
+
+    sleep(10`s);
+    done = true;
+
+    for ( i; Tasks )
+        for ( j; Tasks )
+            insert(*chans[i], j);
+
+    flushBarrier();
+
+    for ( i; Tasks ) {
+        delete(t[i]);
+    }
+    
+    sout | total_operations;
+    // print_stats_now( *active_cluster(), CFA_STATS_READY_Q);
+
+    for ( i; Processors ) {
+        delete(proc[i]);
+    }
+    adelete( chans );
+    // sout | "done";
+    return 0;
+}
