write a c++ program that will take in a file, a number_of_bytes and number_of_threads. So it will take in 3 arguments in the command line. mmap the number_of_bytes of the given file into memory. The program will mmap 100 Megabyte of file into memory and use 4 threads to examine the bytes. The main will not participate in the computation, but will create the specified number of threads, and wait for them to complete the computation, and the main will then print the answer. At most 8 threads will be specified to be created. Each file will contain a long string of letters like DNA, i.e. a,c,g,t The program should determine how many 20-character substrings contain more than 11 a's. For example, in this string there are characters matches: tattataaagtagaaatataactgaaggttcagccgctgg attataaagtagaaatataa aaagtagaaatataactgaa The program should output: total matches number # number is replaced by the correct number
Please write a c++
For example, in this string there are characters matches:
tattataaagtagaaatataactgaaggttcagccgctgg
attataaagtagaaatataa
aaagtagaaatataactgaa
The program should output:
total matches number # number is replaced by the correct number
Step by step
Solved in 2 steps