Starting from:

$25

CS307-Homework 4 Memory Mapping & File Reading Solved

In this project, you are going to make a read operations on a text file with using different methods. Then, you are expected to analyze the performance of these methods and compare them with each other.

2 Program & File
The text file, loremipsum.txt, contains the text you need to read. Lorem ipsum is dummy text that used in filling the empty paragraphs, populating text bodies and laying out print et cetera.

You are expected to read loremipsum.txt, then count the occurrence of character ’a’ in the file.

For this purpose, you will write:

1.    a CPP file that uses fstream or istream for reading the file.

2.    a C file that uses fopen for reading the file.

3.    a C file that utilizes memory mapping with mmap function on the file.

If you are not sure about how to write the above functions, please check the recitation slides to get more information about related topics.

3 Report
After successfully reading the file and counting the character, you are expected to prepare a report. In your report, you need to analyze and compare the methods. Please discuss advantages and disadvantages of methods, their time efficiency, the impact of file size and your comments related with your observation and your research related with this topic. Please do not exceed 2 pages on your report and state your own ideas.

More products