Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C/C++ code but read notes before you start: 1- YOU MUST USE LINUX/UNIX. 2- YOU MUST USE LIBRARY 3- YOU MUST KNOW HOW

Write a C/C++ code but read notes before you start: 1- YOU MUST USE LINUX/UNIX.

2- YOU MUST USE LIBRARY

3- YOU MUST KNOW HOW TO PROGRAM USING THREADS ( CREATING,DESTROYING AND SYNCING)

THE REQUIREMENTS:

ASSUME YOU HAVE A image text in transcribed MATRIX AND image text in transcribed THREADS YOU MUST DO A LOAD BALANCING AS MUCH AS POSSIBLE SO THAT EVERY THREAD WILL TAKE SPECIFIC ELEMENTS IN THE MATRIX AND IT WILL FIND THE SUM OF THEM.

FOR EXAMPLE IF N = 5 AND T = 3 (NOTE IT MUST BE N > T && N%T !=0) THE NUMBER OF ELEMENTS WILL BE 25 AND THERE WILL BE ONLY 3 THREADS SO YOU SHOULD LOAD THE BALANCE OF WORK THROUGH THE 3 THREADS YOU CAN USE IN THE ABOVE EXAMPLE THE FOLLOWING:

T0 WILL WORK IN 8 ELEMENTS AND FINS THE SUM OF THEM AND T1 WILL WORK IN 8 AND FIND THE SUM OF THEM AND T2 WILL WORK IN 9 AND FIND THE SUM OF THEM (LOAD AS MUCH AS POSSIBLE).

SHOW DIFFERENT TEST CASES e.g. ( N = 107 , T = 9 )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems X Special Issue On Database And Expert Systems Applications Lncs 8220

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2013th Edition

3642412203, 978-3642412202

More Books

Students also viewed these Databases questions