Problem 2: Parallel Computing?

TASK 1: Data validation

Load in Processes.mat, which contains the string array Names and the numerical vector Times. Verify that Times is

numerical and that Names is a string. If either of these variables are scalars, matrices, or the wrong data type, produce an

error that states the invalid variable(s) and terminate the program.

TASK 2: Organize processes

Given that each value in Times corresponds to a value in the same location in Names, sort the processes such that when

sent to the CPU they will be processed in their desired order based on their start times. Save the sorted processes with their

respective times in MA6_Task2.mat. Remember that your program must only use the most basic functions, listed on Pg. 4

of this assignment.

TASK 3: Allocate processes

Your dual-core CPU will function optimally if processes are distributed evenly between the two cores, with every other

process occurring on Core 2. Using the organized list of processes from Task 2, split the list of processes between the two

cores. Save the list of processes allocated to Core 1 as Core1.mat. Save the list of processes allocated to Core 2 as

Core2.mat. Assume no processes have the same start times and assume there will be an even number of processes.

Extra Credit:

Instead of saving the lists of processes to Core1.mat and Core2.mat, write the lists of processes to the files Core1.txt and

Core2.txt, respectively. You may use the functions fopen(), fclose(), and fprintf() for this extra credit portion.

2 Answers

Relevance
  • George
    Lv 4
    1 month ago

    Try posting in Homework Help.

  • Lv 7
    1 month ago

    This problem requires Processes.mat, something that we cannot see.

Still have questions? Get your answers by asking now.