From: adash Date: Tue, 10 Feb 2009 01:34:16 +0000 (+0000) Subject: moved files to new directory X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=003d1e95bc59a5db66a6378c6ddd8fcd9986e085;p=IRC.git moved files to new directory --- diff --git a/Robust/src/Benchmarks/Distributed/LookUpService/LookUpService.java b/Robust/src/Benchmarks/Distributed/LookUpService/LookUpService.java deleted file mode 100644 index fd2aa212..00000000 --- a/Robust/src/Benchmarks/Distributed/LookUpService/LookUpService.java +++ /dev/null @@ -1,179 +0,0 @@ -public class LookUpService extends Thread { - DistributedHashMap mydhmap; - /** - * The thread id involved - **/ - private int threadid; - /** - * The total number of threads - **/ - private int numthreads; - - /** - * The total number of transactions - **/ - private int numtrans; - - /** - * The total number of objects created - **/ - private int nobjs; - - /** - * The probability of initiating a look up - * the read probability % between 0-99 - **/ - private int rdprob; - - public LookUpService() { - } - - public LookUpService(DistributedHashMap dmap, int threadid, int numthreads, int nobjs, int numtrans, int rdprob) { - mydhmap = dmap; - this.threadid = threadid; - this.numthreads = numthreads; - this.nobjs = nobjs; - this.numtrans = numtrans; - this.rdprob = rdprob; - } - - public void run() { - Barrier barr; - barr = new Barrier("128.195.136.162"); - //Add to the hash map - int ntrans; - atomic { - for(int i = 0; i < nobjs; i++) { - Integer key = global new Integer(threadid*nobjs+i); - Integer val = global new Integer(i); - Object o1 = key; - Object o2 = val; - mydhmap.put(o1, o2); - } - ntrans = numtrans; - } - Barrier.enterBarrier(barr); - // Do read/writes - for (int i = 0; i < ntrans; i++) { - atomic { - Random rand = new Random(i); - int rdwr = rand.nextInt(100); - int rwkey = rand.nextInt(nobjs*numthreads); - Integer key = global new Integer(rwkey); - Object o1 = key; - if (rdwr < rdprob) { - Object o3 = mydhmap.get(o1); //Read - } else { - Integer val = global new Integer(i); - Object o2 = val; - mydhmap.put(o1, o2); //Modify - } - } - } - } - - public static void main(String[] args) { - LookUpService ls = new LookUpService(); - LookUpService.parseCmdLine(args,ls); - BarrierServer mybarr; - - int nthreads = ls.numthreads; - int[] mid = new int[8]; - mid[0] = (128<<24)|(195<<16)|(136<<8)|162;//dc-1 - mid[1] = (128<<24)|(195<<16)|(136<<8)|163;//dc-2 - mid[2] = (128<<24)|(195<<16)|(136<<8)|164;//dc-3 - mid[3] = (128<<24)|(195<<16)|(136<<8)|165;//dc-4 - mid[4] = (128<<24)|(195<<16)|(136<<8)|166;//dc-5 - mid[5] = (128<<24)|(195<<16)|(136<<8)|167;//dc-6 - mid[6] = (128<<24)|(195<<16)|(136<<8)|168;//dc-7 - mid[7] = (128<<24)|(195<<16)|(136<<8)|169;//dc-8 - - LookUpService[] lus; - DistributedHashMap dhmap; - atomic { - mybarr = global new BarrierServer(nthreads); - } - - mybarr.start(mid[0]); - atomic { - dhmap = global new DistributedHashMap(100, 100, 0.75f); - lus = global new LookUpService[nthreads]; - for(int i = 0; i -nEntry -nTrans -probRead \n"); - System.printString(" -N the number of threads\n"); - System.printString(" -nEntry the number of objects to be inserted into distributed hashmap\n"); - System.printString(" -nTrans the number of transactions to run\n"); - System.printString(" -probRead the probability of read given a transaction\n"); - System.printString(" -h help with usage\n"); - } -} diff --git a/Robust/src/Benchmarks/Distributed/LookUpService/makefile b/Robust/src/Benchmarks/Distributed/LookUpService/makefile deleted file mode 100644 index b8eb7282..00000000 --- a/Robust/src/Benchmarks/Distributed/LookUpService/makefile +++ /dev/null @@ -1,14 +0,0 @@ -MAINCLASS=LookUpService -SRC1=${MAINCLASS}.java \ - ../../../ClassLibrary/DistributedHashMap.java -FLAGS1=-dsm -dsmcaching -rangeprefetch -optimize -mainclass ${MAINCLASS} -trueprob 0.90 -FLAGS2=-dsm -dsmcaching -prefetch -optimize -excprefetch String.hashCode -excprefetch DistributedHashMap.resize -excprefetch String.equals -excprefetch LookUpService.main -mainclass ${MAINCLASS} -trueprob 0.90 -FLAGS3=-dsm -optimize -mainclass ${MAINCLASS} -default: - ../../../buildscript ${FLAGS3} -o ${MAINCLASS}NPNC ${SRC1} - ../../../buildscript ${FLAGS2} -o ${MAINCLASS}N ${SRC1} - ../../../buildscript ${FLAGS1} -o ${MAINCLASS}RangeN ${SRC1} - -clean: - rm -rf tmpbuilddirectory - rm *.bin