首页 > 其他分享 >Encoder Data compression

Encoder Data compression

时间:2024-11-15 18:29:35浏览次数:1  
标签:compression should will program fi Encoder Data your points

Lab 3: Encoder

Introduction

Data compression is the process of encoding information using fewer bitsthan the original representation. Run-length encoding (RLE) is a simple yeteffective compression algorithm: repeated data are stored as a single dataand the count. In this lab, you will build a parallel run-length encoder called

Not Your Usual ENCoder, orno deadlocks or race conditions. In particular, there are two things that youneed to consider carefully:The worker thread should wait until there is a task to do.The main thread should wait until a task has been completed so that itcan collect the result. Keep in mind that the tasks might not complete inthe same order as they were submitted.CompilationWe will grade your submission in an x86_64 Rocky Linux 8 container onGradescope. We willcompile your program using5/13EvaluationYour code will fi rst be tested for correctness. Parallelism means nothing iyour program crashes or cannot encode fi les correctly.

f you pass the correctness tests, your code will be measured forperformance. Higher performance will lead to better scores.Please note that your computer needs to have atleast as many cores as the number ofthreads you use in order to benefi tfrom parallelization.Consider running your program on the CIMS compute servers if you areusing a single- or dual-core machine.straceWe will usestraceto examine the system calls you have invoked. You willsuffer from severe score penalties if you calclone()too many times,which indicates that you do not use a thread pool properly, or if you callnanosleep(), which indicates that you do not have proper synchronization.On the other hand, you can 代 写 Encoder Data compression expect to fi nd manyfutex()invocations in thestracelog. They are usedfor synchronization.You can use the following command to run your program understraceanddump the log tostrace.txt:$ strace ./nyuenc -j 3 file.txt > /dev/null 2> strace.txtValgrindWe willuse two Valgrind tools, namely Helgrind and DRD, to detect threaderrorsin your code. Both should report 0 errors from 0 contexts.You can use the following command to run your program under Helgrind:nyuencn the root of the archive. You can create the archive fi le with thefollowing command in the Docker container:

$ zip nyuenc.zip Makefile *.h *.cNote that other fi le formats (e.g.,rar) will not be accepted.Lab 3: Encode7/13You need to upload the .zip archive to Gradescope. If you need toacknowledge any infl uences per our academic integrity policy, write them

as comments in your source codeRubricThe total of this lab is 100 points, mapped to 15% of your fi nal grade of this

course.successfully and encode the example fi le correctly. (40 points)Milestone 1. Correctly encode one fi le. (10 points)

Correctly encode multiple fi les. (10 points)Milestone 2. Correctness. (20 points)Your program should produce the correct output within one minute on Gradescope without crashing.

Free ofthread errors (e.g., deadlocks, race conditions). (15 points)For each error context reported by Helgrind or DRD (we will take the smaller of the two), there will be 5 points deduction.

Lab 3: Encoder12/13Gradescope says “your program does not use a threadpool correctly.” Why?most likely reason is that some parts of your program are executedserially while they should have been executed in parallel. In particular, yourmain thread should run concurrently with your worker threads:In the task-submission phase, worker threads should run while the mainthread is submitting tasks. As soon as a task is submitted to the taskqueue, a worker thread should process it.

  1. In the result-collection phase, the main thread should run while theworker threads are processing tasks. As soon as a task is complete, themain thread should collect the result.Thislab has borrowed some ideasfrom Prof. Arpaci-Dusseau.

 

标签:compression,should,will,program,fi,Encoder,Data,your,points
From: https://www.cnblogs.com/comp9021T2/p/18548127

相关文章

  • GoFurther - Chapter 5: Database Setup and Configuration
     zzh@ZZHPC:/zdata/Github/greenlight$dockerpullpostgreszzh@ZZHPC:/zdata/Github/greenlight$dockerrun--namepostgres17-p5432:5432-ePOSTGRES_USER=root-ePOSTGRES_PASSWORD=root-dpostgres:latest zzh@ZZHPC:~$dockerexec-itpostgres17psql......
  • 哋它亢技术(DataCon) WiKi专题——0.目录大纲
    哋它亢技术-WiKi专题哋它亢WiKi专栏文章列表目录大纲1.哋它亢的历史与起源2.哋它亢的技术原理3.哋它亢的应用领域4.哋它亢的技术挑战5.哋它亢的市场与产业影响6.哋它亢的未来展望结语哋它亢WiKi随着新技术层出不穷,一些充满潜力的创新开始崭露头角,并迅速引起了全......
  • 惊爆!72.1K star 的 Netdata:实时监控与可视化的超炫神器!
    在当今复杂的IT环境中,实时监控与可视化对于保障系统的稳定运行和性能优化至关重要。无论是服务器、应用程序,还是网络设备,及时获取性能数据能够帮助我们快速定位问题、优化资源配置。Netdata,作为一个开源的实时监控工具,正是为此而生。Netdata不仅是一个轻量级的监控与可视化平......
  • WWDC 23 ,SwiftUI 5 和 SwiftData 的初印象
    WWDC23,SwiftUI5和SwiftData的初印象东坡肘子​ ​关注他 17人赞同了该文章WWDC2023正在如火如荼地进行。苹果不仅带来了全新形态的硬件产品,还推出了几个相当震撼的新框架。本文将聊聊我对本届WWDC中SwiftUI5.0和SwiftData的初步印象。......
  • 5.7 与 8.0 对相同文件的 LOAD DATA 语句结果不同
    5.7与8.0对相同文件的LOADDATA语句结果不同问题描述某客户现场支持,由MySQL5.7.21升级MySQL8.0.25后,通过LOADDATA导入文件,当同一会话连续导入不同的编码(UTF8/GB18030)文件时会出现乱码。数据库版本未升级之前,相同的导入操作在MySQL5.7.21未出现乱码。问题分析1)查看简......
  • 哋它亢:datacon
    以下代码可以在datacon比赛中,哋它亢赛题中识别出有多少产赛队伍注册了域名,并将识别出的网址打印代码使用requests库,遍历访问可能存在的网址,并通过响应码,识别网站是否存在importrequestsimportre要扫描的URL格式base_url="http://datacon-{0}.xyz"用于检查是否响应的函数......
  • SpringBoot基础系列学习(六):整合SpringDataJpa
    文章目录1.简介优点缺点代码数据库导入依赖连接数据库ddl-auto说明实体类mapper层Controller层结果1.简介SpringDataJPA是SpringData家族的一部分,可以轻松实现基于JPA的存储库。此模块处理对基于JPA的数据访问层的增强支持。它使构建使用数据访问技术的Spri......
  • 后端说传的data类型的数据前端如何传
    当后端API期望接收的数据类型是data类型时,通常指的是原始数据或者未加工的数据。在前端,你可以通过以下几种方式来传递这种类型的数据:1.使用FormData对象上传文件或数据如果你需要上传文件或者需要以multipart/form-data格式发送数据,可以使用FormData对象。这对于上传文件特别有......
  • R语言data.table导入数据实战:data.table使用自定义函数及Reduce函数实现一次性性多表
    R语言data.table导入数据实战:data.table使用自定义函数及Reduce函数实现一次性性多表连接、data.table使用自定义函数及Reduce函数实现一次性性多表连接目录R语言data.table导入数据实战:data.table使用自定义函数及Reduce函数实现一次性性多表连接#data.table是什么?#dat......
  • Java实现FormData接口调用
    JAVA原生实现packagecom.hisense.demo.utils;importjava.io.*;importjava.net.HttpURLConnection;importjava.net.URL;importjava.util.List;/***@authortianluhua*@version1.0*@since2024/11/1317:49*/publicclassDemo{publicstaticvoid......