View the step-by-step solution to:

______________________________________ CS3376 Section: ____ CS3376 Assignment #3 Submission: Section 501 Due: 3/27 Thursday 7PM Date:...

I need help on this program

Name: ______________________________________ CS3376 Section: ____ Date: ___________________ 1 CS3376 Assignment #3 Section 501 Due: 3/27 Thursday 7PM Section 502 Due: 3/26 Wednesday 8:30PM Submission: Submit both hardcopy (at the beginning of the class on the due date), and upload softcopy (in a zip file containing all files) via eLearning/blackboard. For upload, Name your file (or folder) in zip, with the course, assignment# (and part# if separated), and your name (e.g., CS3376-501 Assignment2 by John Lee.zip). For Hardcopy, Cover page must contain the following information: Assignment #, Your last and first name, Course Name, Course Section, UTD Email Address, Due Date and Time. Demo your program to TA (sign up your time-slot to sign-up sheet. Check with TA or TA office). Use the Assignment cover sheet for hardcopy submission. Note: TA will grade only on the hardcopy, to be returned to you. No hardcopy means no grade. Part 1. 20% Read the tutorial and try a few thread programs in https://computing.llnl.gov/tutorials/pthreads/ POSIX Threads Programming by Blaise Barney, Laurence Livermore National Laboratory 1. Example using Mutex 2. Example using Condition Variable 3. Example of computing dot product in (a) serial or sequential way, and (b) using threads https://computing.llnl.gov/tutorials/pthreads/exercise.html mpithreads_serial.c mpithreads_threads.c mpithreads_both.c mpithreads.makefile A "series" of programs which demonstrate the progression for a serial dot product code to a hybrid MPI/Pthreads implementation. Files include the serial version, Pthreads version, MPI version, hybrid version and a makefile. Part 2. 20% Read the tutorial and try a few socket programs in http://www.cs.dartmouth.edu/~campbell/cs50/socketprogramming.html 1. echo server/client 2. iterative server 3. concurrent echo server Part 3. 60% Matrix computation with Socket & Thread programming 100% Design, Write, compile, and run a C socket/thread programs to provide a networking service, to do the matrix computation. A server will provide a matrix multiplication, with at least 2 threads doing all the work/computation. You should provide a lock or condition variable or … for synchronization of threads accessing the matrix. Once computation is done, the server sends the result back to the client, and the client will print the result. Initially you may create only 1 thread to do the matrix computation (see the serial example), to compute a fixed size- and content-matrices. Part (3.1) Make it work for 1 client, and then Part (3.2) Concurrent server to serve clients. Matrix is size of 10x10 (a fixed size) with each element to be 1 (that is, an identity matrix), to multiply two identity matrices (A x B = C), to make your verification easier. Part (3.3) Server now creates and uses more than one thread to divide the multiplication of matrices. For 10x10 matrix, 10 threads will be created where each thread will take a row (i-th row) of matrix A to compute each entry (i, j) [where j = 1 to 10] of matrix C by dot-multiplication with j-th column of B. As discussed in the class, each thread should lock and unlock when it updates each element of C. Bonus 10% Client sends the matrix information (e.g. 20 for 20x20 matrix) and the content of matrices A and B. Concurrent Server receives the data, generate 20 threads to compute the product, and send back the result to the client. Submission: Screen-print a few screens; or copy & paste the console buffer of what you have, and zip files of all the program source and executives. Sign-up (in sign-up sheet to be provided later) and Demo your program to TA I have done and submitted all required materials (hardcopy and upload all to e-learning) and done with Demo: ___ Part1 (20%) ___ Part2 (20%) ___ Part3 (60%) ___ Bonus (10%)
Background image of page 1
Name: ______________________________________ CS3376 Section: ____ Date: ___________________ 2 Reference https://computing.llnl.gov/tutorials/pthreads/ http://www.cs.dartmouth.edu/~campbell/cs50/socketprogramming.html http://beej.us/guide/bgnet/ http://en.wikipedia.org/wiki/Transmission_Control_Protocol Required https://computing.llnl.gov/tutorials/pthreads/ http://www.cs.dartmouth.edu/~campbell/cs50/socketprogramming.html Optional http://beej.us/guide/bgnet/ http://en.wikipedia.org/wiki/Transmission_Control_Protocol
Background image of page 2
Show entire document
Sign up to view the entire interaction

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question