美文网首页
CMSC 216作业代做、program留学生作业代做、代写c/

CMSC 216作业代做、program留学生作业代做、代写c/

作者: aijilian | 来源:发表于2019-05-11 11:02 被阅读0次

CMSC 216 Exercise #6 Spring 2019Threads Deadline: Wed, May 8 (lab time)1 OverviewIn this exercise you will use threads to write a program that computes the maximum and the sum of datapresent in an array. For this assignment: There are no public, release nor secret tests. There is no project distribution (usual folder we post). You need to work with classmates (in groups of 3 students). You need to show your work to your teaching TA on Wednesday’s lab (May 8). Notice that all membersof your team will receive the same score. If you don’t show your work to a TA you will not get any credit. Only one member of your group needsto do the demo (not all of you need to be present). Even if some of your members belong to anothersection, only one person needs to present. You may use any code we have posted for our lectures/labs. To submit upload a zip file with your code to the submit server using the appropriate entry. Only onemember of your group needs to submit. If you have questions about this assignment, please post them in Piazza. This will simplify the processof keeping the class informed about updates. It is your responsibility to check Piazza often regardingany possible updates and clarifications. There is only one deadline (no late submission).2 Specifications You need to write a program that will create an array with random integer values. Then one of twopossible processings will be applied to this array:– Max - You need to compute the maximum value in the array. Notice that for a number of threadsgreater than one, you need to assign to each thread an array segment. Just divide the array in equallength segments (when possible) based on the number of threads. For example, for an array of 1001elements and 2 threads, the first thread can process the first half (500) and the second thread therest (501).– Sum - You need to correctly compute the sum of elements in the array based on the followingformula: sum = (sum + a[i]) % 1000000, where a[i] represents an array element. The program relies on command line arguments to provide the following information:– Number of elements– Number of threads– Seed (for random number generator)– Task (1 for max, 2 for sum)– Print Results (Y or N) Feel free to provide any additional parameters you understand you need.1 After completing a task (maximum or sum) the program will display the results (maximum value orsum) if requested by the user. After completing a task, the program will display the wall clock time, the user time and the system/kerneltime that it took to compute the maximum or the sum. Notice that this time information does not includethe time to generate the random array. You need to have threads that run concurrently. For example, starting a thread and executing a join onit and repeating the process for each thread is not valid (you are executing threads sequentially.) The time information should follow the results. Report - Run experiments where you explore the impact of threads while computing the maximumvalue and the sum. Create a table where you increase the number of threads and the data sets. Yourgoal is to see whether using additional threads improves performance. Provide a short (one paragraph)explanation of your results. The information in this report is what you will be discussing with your TAin lab. You can create this report in a text file (report.txt). Remember that you may not use code from the internet. The current limits in grace will not allow you to create a large number of threads. You can change thoselimits (assuming you are using tcsh) by executing ”limit maxproc” followed by a number (e.g., limitmaxproc 400). Make sure you check the values returned by Pthreads functions; this will allow you to identify whetheryour code is failing. An example of using the srand() and rand() functions can be found in the lecture example (dyn realloc.c)discussed while covering dynamic memory allocation.3 Grading CriteriaYour project grade will be determined by the following:Maximum using multiple threads 40 ptsSum using multiple threads 30 ptsCorrect sum computation 10 ptsReport 10 ptsCode Style 10 pts3.1 Style gradingFollow the C style guidelines available at:http://www.cs.umd.edu/~nelson/classes/resources/cstyleguide/4 Submission Create a file named authors.txt with the names and directory ids (e.g., terp1, NOT your student number)of the members in your group. Create a folder with the .c code, the report and the authors.txt file. Zip that folder and upload it to thesubmit server. Only one member of your team needs to upload the submission. To submit your exerciseuse the submit server web interface (you will not be able to submit using the submit command in grace).25 Academic IntegrityPlease see the syllabus for project rules and academic integrity information. All programming assignments inthis course are to be written individually (unless explicitly indicated otherwise in a written project handout).Cooperation between students is a violation of the Code of Academic Integrity.3本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

相关文章

网友评论

      本文标题:CMSC 216作业代做、program留学生作业代做、代写c/

      本文链接:https://www.haomeiwen.com/subject/ebxxaqtx.html