Skip to content

Developed a program to multiply two large matrices by using multiple threads. After that, Synchronously computed resultant matrix by dividing the whole task between different number of threads within efficient amount of time.

License

UmairHabib/Synchronous-100x100-Matrix-Multiplication-using-Multiple-Threads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synchronous-100x100-Matrix-Multiplication-using-Threads-in-Ubuntu-OS

Description of Question:

Matrix Multiplication

Develop a program to multiply two large matrices, using multiple threads. As each entry of the resultant matrix can be computed independent of the other, we can use multithreading to speed up the calculations. However, creating too many threads is inefficient; we shall rather deploy only as many threads as there are number of processors in the system (see get_nprocs() system call).

The task shall be evenly divided among the threads. If there are 100 entries in the resultant matrix for example, and we have four processors (and hence four threads), each thread shall compute 25 entries.

Use files for input and output. The program shall take two files as input, each containing a matrix. The program shall read the files, perform the multiplication, and shall store the result into a third file. Each file shall also contain order of the matrix. The program shall check whether the multiplication is possible or not.

#How to run program:

We have used VMware for running Ubuntu on our computers.

You can download VMware from the given link:
https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html
https://www.virtualbox.org/wiki/Downloads

Any Ubuntu operating system can be used on VMware or VMbox.

You can download Ubuntu from the given link:
https://www.ubuntu.com/download

You can run this program on Netbeans IDE in virtually created Ubuntu.

You can download Netbeans from the given link:
https://netbeans.org/downloads/8.0.2/

About

Developed a program to multiply two large matrices by using multiple threads. After that, Synchronously computed resultant matrix by dividing the whole task between different number of threads within efficient amount of time.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages