Operating Systems course assignment
- generate random numbers and store them in a single array
- divide into subarrays and create a thread for each
- apply quicksort on each subarray and then merge results
- uses pthread mutex
- creates results.dat file containing initial and sorted array
compile with pthread
gcc -pthread os_ex.c -o psort
run with parameters, eg.
./psort -numbers=10000 -threads=4 -seed=168 -mode=2
- numbers: random numbers to generate
- threads: threads to use
- seed: rng seed for srand
- mode: thread synch type
- 1: total exclusion (read and write)
- 2: mild exclusion (write only)
- 3: no exclusion