Skip to content

A multi-threaded program that uses low-level I/O to reverse a given file (presumably w/ very large size). And to accomodate customizable memory size.

Notifications You must be signed in to change notification settings

miguelangeltamargo/MultiThreadMemProj-7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

MultiThreadMemProj-7

A multi-threaded program that uses low-level I/O to reverse a given file (presumably w/ very large size) and, to accomodate customizable memory size.

Program CLA's

  • -input yyy.txt: where yyy is the path and name of the txt file that we want to reverse its content. (DONE)

  • -nthreads xx: where xx is represents the number of threads and can be a positive integer from 1 to 90. The number of threads cannot be greater than half of the input file size (in bytes). The default value is 2. (DONE)

  • -mem zz: where zz is the maximum total number of bytes that the program is allowed to allocate from heap (using malloc function). This argument is optional and if it does not exist, it means that there is no memory limitation.

    • (This CLA IS implemented, there are still has some occurance's where the file pointer overlaps or does not cover the entire file, leaving parts untouched or writing a NULL char to file. The memory usage however is limited to specified size and all threads run concurrently/parallelly with limit. I belive this mainly has to do with the 'remainder' variable in the for loop in main and needs to be changed to accomodate the mem limit.)

About

A multi-threaded program that uses low-level I/O to reverse a given file (presumably w/ very large size). And to accomodate customizable memory size.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published