$20 Bonus + 25% OFF
Securing Higher Grades Costing Your Pocket?
Book Your Assignment at The Lowest Price
Now!
Students Who Viewed This Also Studied
CS1010 Computer Science
Questions:
Solving a Problem Using C Threads
Requirement
Build a C program using pthread.h thread support that finds the maximum and minimum values in an array and time the performance.
Deliverables
Your C program (as a .c file) and the captured runtime output from the 3 executions of your program.
Procedure
Get the Hw 5 files Download Hw 5 files (not really necessary – it’s only a (slightly better formatted) copy of this document Write a C program that finds the maximum and minimum values in an array of random ints using threads. You must use the functions in pthreads.h to create and manage the threads. The array must contain 10,000 randomly generated ints in the range 0..50,000 with no duplicated values. You must run your program using 2, 10, and 100 threads. Your program must display the maximum and minimum values and how long it took each run to execute. Create the array when the program begins. Use the identical array values for each run. The program should display the first 10 and last 10 values in the array at the start of execution. Do NOT sort the array. Capture the runtime output for each of the three executions along with the timing information, saving them all in a single MS Word document.
Note: do NOT write 3 separate programs. Only write one program. Your program should contain a “master loop” that runs the three variations of 2, 10, and 100 threads. The precise same data must be used for each timing.
CS1010 Computer Science
Answer in Detail
Solved by qualified expert
Get Access to This Answer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
7 More Pages to Come in This Document. Get access to the complete answer.
MyAssignmenthelp.com is the best assignment help website for buying assignments online. All credits go to our experts. They work hard to fulfill students’ search ‘who can do my assignment‘ or ‘can someone write my assignment for me‘ and ensure they receive needed academic assistance. Wondering ‘should I pay someone to do my homework’ will not do any good. But hiring our experts can make things easier for students.
More CS1010 CS1010 Computer Science: Questions & Answers
ITEC313 Object Oriented Programming
Question:
River Crossing, Game Programming
Problem Description
One day a farmer goes to the market, taking with him a cabbage and a goat. On the way he captured a wolf, he’s a mighty farmer, and took it with him to the market. They came to a river. And on the Bank, there’s a boat. Now …
View Answer
D101 Programming Fundamentals
Based on the above user story (requirements) and Part A of the DFD, your tasks are: 1.Develop Method 1 (AddToList) to add personal details to a list box (see following figure). Ensure input validation is on the controls, e.g. no letters can be input for pay rate.a.If the user enters the data in the …
View Answer
Programming for Networking
two scores are added together to get an overall score between 0 and 200. After obtaining scores for each applicant, the program reports which one looks better or whether they look equal.Notice that the program asks for each applicant whether to enter SAT scores or ACT scores (SAT scores are in …
View Answer
Management
Question 1 (40 marks)a) Write a function (called total_cost) that returns the total cost of an item after the tax has been added to the product. The function has two IN parameters Customer ID and Item ID and returns a number as a result of the function execution. If a C …
View Answer
Content Removal Request
If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the
content removal request.
Choose Our Best Expert to Help You
Brendan Berg
I have successfully completed my graduation in Biochemistry from Trinity College.
900 – Completed Orders
Hire Me
Still in Two Minds? The Proof is in Numbers!
33845 Genuine Reviews With a Rating of 4.9/5.
Assignment
Assignment: 4 Pages, Deadline:
5 days
My assignment helper is so amazing, she did my work before my requirement dead line.
User ID: 8***98 United States
Programing
Programming: 11.2 Pages, Deadline:
3 days
Python coding assignment work completed well. This assignment was done thoroughly and was in correct format. However there were some few small errors
User ID: 8***31 United States
Accounting
Programming: 8 Pages, Deadline:
14 days
Great writing and referencing snsjsnsnsndndndbbxdbndkajznzmzmkeidndbfjdbr jddhhd s j
User ID: 8***81 United Arab Emirates
Finance
Home Work: 1 Page, Deadline:
4 days
Lectuerer had replied that the 3 questions are good, please procced with the assisgnment. Thank you.
User ID: 8***50 Singapore
Psychology
Home Work: 1 Page, Deadline:
21 hours
Recieved help with my assignment and received it a few hours earlier than deadline which was awesome!
User ID: 8***08 United States
Finance
Home Work: 4 Pages, Deadline:
2 days
It was a very nice written piece of paper. Good referencing. Well written, i got almost 60. I think writers should improve more
User ID: 6***62 Greece
Management
Assignment: 4 Pages, Deadline:
5 days
Great work and formatting. The rubric was followed and your help certainly bumped up my grades. Thank you for your help!!
User ID: 1***16 Mississauga, Canada
Supply Chain
Assignment: 2 Pages, Deadline:
5 days
I am delighted with expert work this time because the assignment is written with excellent words and less similarity.
User ID: 7***43 Australia
Statistics
Thesis: 19 Pages, Deadline:
9 days
Assignment was good. and i scored the amount i was looking for. passed all assignments
User ID: 3***26 Male, Maldives
Statistics
Programming: 2.4 Pages, Deadline:
4 days
Perfect score, the assignment was excellently done, great service, the professor, said excellent grade. I will continue using this service for all my …
User ID: 1***17 New York, United States
Assignment
Assignment: 4 Pages, Deadline:
5 days
My assignment helper is so amazing, she did my work before my requirement dead line.
User ID: 8***98 United States
Programing
Programming: 11.2 Pages, Deadline:
3 days
Python coding assignment work completed well. This assignment was done thoroughly and was in correct format. However there were some few small errors
User ID: 8***31 United States
Accounting
Programming: 8 Pages, Deadline:
14 days
Great writing and referencing snsjsnsnsndndndbbxdbndkajznzmzmkeidndbfjdbr jddhhd s j
User ID: 8***81 United Arab Emirates
Finance
Home Work: 1 Page, Deadline:
4 days
Lectuerer had replied that the 3 questions are good, please procced with the assisgnment. Thank you.
User ID: 8***50 Singapore
Psychology
Home Work: 1 Page, Deadline:
21 hours
Recieved help with my assignment and received it a few hours earlier than deadline which was awesome!
User ID: 8***08 United States
Finance
Home Work: 4 Pages, Deadline:
2 days
It was a very nice written piece of paper. Good referencing. Well written, i got almost 60. I think writers should improve more
User ID: 6***62 Greece
Management
Assignment: 4 Pages, Deadline:
5 days
Great work and formatting. The rubric was followed and your help certainly bumped up my grades. Thank you for your help!!
User ID: 1***16 Mississauga, Canada
Supply Chain
Assignment: 2 Pages, Deadline:
5 days
I am delighted with expert work this time because the assignment is written with excellent words and less similarity.
User ID: 7***43 Australia
Statistics
Thesis: 19 Pages, Deadline:
9 days
Assignment was good. and i scored the amount i was looking for. passed all assignments
User ID: 3***26 Male, Maldives
Statistics
Programming: 2.4 Pages, Deadline:
4 days
Perfect score, the assignment was excellently done, great service, the professor, said excellent grade. I will continue using this service for all my …
User ID: 1***17 New York, United States