Skip to content

Commit 9570d6a

Browse files
committed
2 parents 5cfbe87 + 90b6908 commit 9570d6a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
asm_concurrency
2+
===============
3+
4+
How to run:
5+
6+
* Make sure you have a recent `nasm`; check that `nasm -v` reports `2.11` or newer.
7+
```
8+
$ git clone https://github.com/davidad/asm_concurrency.git
9+
$ cd asm_concurrency
10+
$ make
11+
```
12+
* See results.
13+
* If you want to verify deterministic behavior, run `make integrity_check`.
14+
15+
You can also supply a command-line argument, which will be opened as a binary file.
16+
17+
$ make concurrency-noprint-x3 concurrency-noprint-x4
18+
$ ./concurrency-noprint-x4 foo
19+
$ ./concurrency-noprint-x3 bar
20+
$ diff foo bar
21+
$ # same results, yay!
22+
23+
The number after the x indicates how many processes will be forked by that executable. You can even run more than one instance of "concurrency" concurrently (shocking!).
24+
25+
$ make clean
26+
$ make size=10000000 concurrency-noprint-x3
27+
$ ./concurrency-noprint-x3 quux & # this will take a little while
28+
$ ./concurrency-noprint-x3 quux
29+
$ ./concurrency-noprint-x3 quuux &
30+
$ ./concurrency-noprint-x3 quuux &
31+
$ ./concurrency-noprint-x3 quuux
32+
$ diff quux quuux
33+
$ # hoo-ah!
34+
35+
`make` options you can tweak (with their default values):
36+
37+
$ make size=1000000 "nprocs=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
38+
39+
* The output file will have size `(size+1)*8`. (This is due to keeping a bookkeeping quad-word in the file and assuming for simplicity that the file is an integer number of quad-words.)
40+
* `nprocs` specifies the set of executables to build and test (`-x1`, `-x2`, etc.). This should have just been a command-line argument, but eh, this way works.

0 commit comments

Comments
 (0)