Skip to content

Manycore OS Project with ETRI. Modify AIM7 for simulating microkernel.

Notifications You must be signed in to change notification settings

JonghoKim-Harry/aim7-modified

Repository files navigation

AIM7-Modified

This is benchmark for manycore OS simulations.

This benchmark is made by modifying AIM7 benchmark.

If you want to see original AIM7 benchmark, see AIM7 mirror or https://sourceforge.net/projects/aimbench/.

If you want to know about 'Manycore OS Project with ETRI', see this

##How Original AIM7 Works ####AIM7 File List

  • Headers
    • files.h
    • funcal.h
    • suite.h
    • testerr.h
  • Source Codes
    • multitask.c
    • rpt.c
    • funcal.c
    • add.c
    • mul.c
    • div.c
    • num_fcns.c
    • int_fncs.c
    • rand.c
    • ram.c
    • disk1.c
    • disk_src.c
    • creat-clo.c
    • pipe-test.c
    • rtmsec.c
    • fillin.c
  • Workload
    • workload.compute
    • workload.dbase
    • workload.fserver
    • workload.shared
    • aim_1.sh
    • aim_2.sh
    • aim_3.sh
  • etc.

Every .c file except multitask.c and rpt.c has only one non-static function, whose name is same with the file name.
(ex) add.c has a function 'add_c()'

We will call the the non-static functions in .c files 'register function', because the functions register all function in the file.
(ex) add_c() will register all functions in add.c: add_double(), add_float(), add_long(), add_short(), add_int().

Every register function will return (source_file *) result.

In suite.h, data type source_file is defined.

typedef struct {

    char *sccs;
    char *filename;
    char *date;
    char *time;
} source_file;

For example, in add.c, register function looks like:

#define PI (3.14159)
#define OPS_PER_LOOP 12

source_file *add_c() {

	static char args_double[256];
	static char args_float[256];
	static source_file s = { " @(#) add.c:1.9 3/4/94 17:16:58",	/* SCCS info */
		__FILE__, __DATE__, __TIME__
	};

	sprintf(args_double, "%g %g 1500000", PI, -PI);	/* arbitrary use of pi */
	register_test("add_double", args_double, add_double,
		      1500 * OPS_PER_LOOP,
		      "Thousand Double Precision Additions");

	sprintf(args_float, "%g %g 1000000", 3.5, -3.5);	/* 3.5 to minimize round-off error */
	register_test("add_float", args_float, add_float, 1000 * OPS_PER_LOOP,
		      "Thousand Single Precision Additions");

	register_test("add_long", "3 -3 5000000", add_long,
		      5000 * OPS_PER_LOOP, "Thousand Long Integer Additions");
	register_test("add_int", "3 -3 5000000", add_int, 5000 * OPS_PER_LOOP,
		      "Thousand Integer Additions");
	register_test("add_short", "3 -3 2000000", add_short,
		      2000 * OPS_PER_LOOP, "Thousand Short Integer Additions");
	return &s;
}

In multitask.c, function register_test() is defined.

void register_test(char *name, char *args, int (*f)(), int factor, char *units) {

    if (num_cmdargs >= MAXCMDARGS) {
	
        fprintf(stderr, "\nInternal Error: Attempted to register too many tests.\n");
		exit(1);
	}

	cmdargs[num_cmdargs].name = name;
	cmdargs[num_cmdargs].args = args;
	cmdargs[num_cmdargs].f = f;
	cmdargs[num_cmdargs].factor = -1;	    /* unused by multitask */
	cmdargs[num_cmdargs].units = units;
	num_cmdargs++;
}

##How Modified AIM7 Works ####AIM7-Modified File List

  • Added or Modified to AIM7
    • aim7.h
      : Combine all macro and declarations in headers and source codes & Add custom repetition count macro.
    • fork_test.c
      : Split fork_test() from creat-clo.c
    • main.c
      : Split main() function from multitask.c
  • Removed from AIM7
    • suite.h
      : All contents in aim7.h
    • funcal.h
    • testerr.h
    • files.h
    • rtmsec.c
    • fillin.c
    • funcal.c
    • rpt.c

About

Manycore OS Project with ETRI. Modify AIM7 for simulating microkernel.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages