Equal division of work between threads solves the Straggler Problem.All 4 cores get almost equal work to do.The producer consumer approach takes much less time.īelow GIF shows how all the 4 cores are utilized to perform parallel ziping in our algorithm. This is the performance comaparision between the three approaches. Increasing the number of consumer threads to more than number of cores does not decrease time.Takes more time for very large or very small page size.Varying only buffer size does not increase or decrease time.Producer Consumer approach Implementation Finding optimum buffersize and pagesize This is because a producer is only required to create memory mapping for files whereas the consumers are required to compress the files.The file is broken into chunks(pages of size 10MB) by the producer and these pages pages are zipped by the consumers. We have considered a single producer and multiple consumers. This is a producer-consumer based approach. As the files can be of unequal sizes, work was not equally divided between threads, and so the process did not put equal load on all cores. This was better than the Sequential approach but the file with maximum size was deciding the compression time. In our first appraoch of adding concurrency to sequential zip, we gave one file to each thread. This was followed by optimizing the encoding schemes to get better performnace in terms of compression time and compressed file size. All the code files related to sequential zip are included in the Week1 folder. Sequential-Zipįirst we build a sequential zip using two encoding schemes, Huffmann and Run Length. The aim of the project was to zip multiple files (alpha-numeric text) parallely, and identify and resolve the Straggler's problem that occurs when we use multi-threading. To zip 3 files(file1, file2, file3) using huffmann encoding follow below steps.Ĭompressed files are stored in "compressed" folder and you can find the test files in the "test_files" folder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |