[SOLVED] CS307-Homework 4 Memory Mapping & File Reading

24.99 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product

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.

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.