Starting from:
$30

$24

Memory Mapping & File Reading


1  Introduction

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.




1
Submission

Please include your report, one cpp, two c files in your submission.

Your homework file should be submitted in a ZIP archive, name your zip archive as:

YourNameSurname_ID_hw4.zip and submit to SUcourse.

Note that, your system time and SUCourse server’s time may not be synchronized so do not wait the last minutes to submit your solution. Only the solutions in the SUCourse system will be graded. Other submissions, such as emailing to instructor or assistants, will not be graded.


Happy New Year,

Berkant
















































Page 2

More products