Question: in python please There are n processes to be executed, where the ith process takes execution[i] amount of time to execute. Two processes are cohesive

in python please
in python please There are n processes to be executed, where the
ith process takes execution[i] amount of time to execute. Two processes are

There are n processes to be executed, where the ith process takes execution[i] amount of time to execute. Two processes are cohesive if and only if their original execution times are equal. When a process with execution time execution[i] is executed, it takes execution [i] time to complete and simultaneously reduces the execution time of all its cohesive processes to ceil(execution[i] / 2). Given the execution time of n processes, find the total amount of time the processor takes to execute all the processes if you execute the processes in the given order, i.e. from left to right. Notes - The ceil() function returns the smallest integer that is bigger or equal to its argument. For example, ceil( (1.1)=2, ceill (2.5)= 3, ceil (5)=5, etc. - If the execution time of some process i is reduced and becomes equal to the execution time of any other process j. then the two processes i and j are not considered cohesive. Example The number of processes is n=6, and their execution times are execution =[5,5,3,6,5,3]. Their execution can be visualized as follows where each set of cohesive processes is marked with a different color. Evamnlo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!