Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ep:labs:03:contents:tasks:ex3 [2019/10/13 17:39]
radu.mantu created
ep:labs:03:contents:tasks:ex3 [2025/03/17 20:53] (current)
radu.mantu [03. [15p] Zip with compression levels]
Line 1: Line 1:
-==== 03. [10pMonitor the system performance ​====+==== 03. [15pZip with compression levels ​==== 
 +The **zip** command is used for compression and file packaging under Linux/Unix operating system. It provides 10 levels of compression,​ where: 
 +  * **level 0** : provides no compression,​ only packaging 
 +  * **level 6** : used as default compression level 
 +  * **level 9** : provides maximum compression
  
-<note warning+<code bash
-High risk of freezing your computerShow the assistant your progress before starting this exercise! +$ zip -5 file.zip file.txt 
-</note>+</code>
  
-=== [5pTASK A - Generating a script ​===+=== [10pTask A - Measurements ​=== 
 +Write a script to measure the compression rate and the time required for each level. You have a few large files in the code skeleton but feel free to add more. If you do add new files, make sure that they are not random data!
  
-  * Create a 1GB file of random generated integers ranging from 1 to 10 million. +=== [5p] Task B - Plot === 
-  * Write a script/C program to sort the numbers in this file in ascending order. +Generate a plot illustrating ​the compression rate, size decrease, etcas a function of **zip** compression level. Make sure that your plot is //​understandable// ​(i.e., has labels, a legend, etc.) Make sure to average multiple measurements ​for each compression level.
- +
-=== [5p] TASK B - Monitoring the performance ​=== +
-  +
-  * Monitor ​the system performance using the tools presented in this tutorial. +
- +
-Good to know: +
- +
-  ​Split the file into smaller chunks ​that would fit in memory ​(e.g200MB)+
-  * Use a classical sort algorithm ​for sorting these chunks. +
-  * Merge the sorted chunks two by two. Read in memory only two numbers at a time (one from each chunk) starting from the beginning, compare the numbers, write the smallest in the merged file, and read the next number from the chunk that had its number written in the merged file. +
-  * Repeat the last step until you obtain the original file sorted.+
ep/labs/03/contents/tasks/ex3.1570977596.txt.gz · Last modified: 2019/10/13 17:39 by radu.mantu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0