$40
Programming Assignment 1: Multithreading
CSC 4103: Operating Systems,
Total Points: 10
Instructions: Compile and test-run your code on the classes server. Submit your work as instructed and verify your submission. The verify command will display your submission date/time. Include your name, email, and classes account in all source code files. Late submissions will be penalized at the rate of 10% per day late and no more than 3 calendar days late.
Objective
To learn the use of POSIX Pthreads or Java Threads
Background
Modern operating systems provide features for a process to use multiple threads to speed up accesses. In the class, we have learned the concepts associated with multithreaded computer systems, such as multithreading models. There are various thread libraries. POSIX Pthreads, and Java Threads are widely used for creating and manipulating threads. The textbook (Threads, Chapter 4) gives examples of multithreaded programs using these libraries.
Programming Task
In this assignment, you need to implement the Project – Matrix Multiplication given in the textbook (Chapter 4, 8th edition), which is also attached in this project description. Your program will calculate each element Ci,j of the matrix product C of two matrices A and B using an individual/separate thread. So, the number of threads is equal to the number of terms in the matrix product. Use either POSIX Pthreads or Java threads to implement this program. The matrices to be multiplied are:
"1 4%
$ ' "8 7 6%
A =$2 5' and B =$#5 4 3'&
$#3 6'&
Programming Language
C/C++ or Java
Submitting Your Work
All files you submit must have a header with the following (enclosed in comment lines):
Name:
Your Name (Last, First)
Email:
Your LSU email
Project:
PA-1 (Multithreading)
Instructor:
Feng Chen
Class:
cs4103-sp19
Login ID:
cs4103xx
You need to use the server “classes.csc.lsu.edu” to work on the assignment. You can login to your account in the server using SSH. Create a directory prog1 (by typing mkdir prog1) in your home directory in which you create your program or source code.
Make sure that you are in the prog1 directory while submitting your program. Submit your assignment to the grader by typing the following command:
~cs4103_chf/bin/p_copy 1
This command copies everything in your prog1 directory to the grader’s account. Check whether all required files have been submitted successfully:
~cs4103_chf/bin/verify 1