1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kupik [55]
3 years ago
8

6. (5 points) The following instruction sequence is to be executed:

Computers and Technology
1 answer:
muminat3 years ago
8 0

Answer:

11 cycles.

Explanation:

One interesting thing to observe in this is that, there is no data hazard because here in any of the two consecutive instruction, they do not share any common register and hence no collision.

Also assuming each this program starts with address 0, so that condition checking at the end which is "bne $7, $4, 0x040" will not lead to branching which repeats the loop. Which means this sequence of 7 instructions run only once.

Now if there is no pipeline hazard (which is the case here) and there are n instruction with s stages in pipeline with each stage take 1 cycle, then total cycle required to finish the program will be n+(s-1)=n+s-1

Here number of instruction n=7 and in multicycle datapath usually pipeline stages s=5.

Then number of cycles needed to execute this sequence will be = 7 +5 -1 = 11 cycles

You might be interested in
Write a loop that reads strings from standard input where the string is either "land", "air", or "water". The loop terminates wh
Setler79 [48]

The loop terminates when "xxxxx" is read in. If the word is land, the string followed by "land" get outputted. The same with air, and water.

Explanation:

int land = 0;

int air = 0;

int water = 0;

String word = "";

while(!(word.equals("xxxxx"))) {

word = stdin.next();

if(word.equals("land")) {

   land++;

}else if(word.equals("air")) {

   air++;

}else if(word.equals("water")) {

   water++;

}  

}

System.out.println("land:" + land);

System.out.println("air:" + air);

System.out.println("water:" + water);

5 0
3 years ago
The keywords used in programming languages that use decisions to redirect the flow of a program are called __
olchik [2.2K]
The keywords used in programming languages that use decisions to redirect the flow of a program are called control structures.
6 0
3 years ago
A computing company is running a set of processes every day. Each process has its own start time and finish time, during which i
Helga [31]

Answer:

Above all else, let us show that this issue has the greedy choice property.

This implies that worldwide ideal arrangement can be gotten by choosing local ideal arrangements. Presently notice the following:

The global optimal solution of the issue requests us to track down the minimum number of times process_check module should be run.

It is likewise referenced that during each running interaction, process_check module should be called atleast once. Along these lines, the minimum possible number of process_check calls happens when process_check is made close to the quantity of the processes that are run.

Along these lines, we see that the global optimal solution is shaped by choosing optimal answer for the nearby advances.

Along these lines, the issue shows greedy choice property. Thus, we can utilize a greedy algorithm for this issue.

The greedy step in this calculation is to postpone the process_check as far as might be feasible. Thus, it should be run towards the finish of each interaction. So the following algorithm can be utilized:

Sort the cycles by utilizing the completion times.

Towards the finish of the 1st process in the arranged list, run the process_check module. Right now any process that is now running is removed the arranged rundown. The main interaction is additionally removed from the sorted list.

Now repeat stage 2, till all processes are finished.

In the above mentioned algorithm, the costliest advance is the step of sorting. By utilizing the optimal sorting algorithm, for example, merge sort, we can achieve it in O(n log n) asymptotic time.

Along these lines, this greedy algorithm additionally takes O(n log n) asymptotic time complexity.

5 0
3 years ago
Which section of a personal narritive requires the most development?
Naily [24]
A characters introduction because a personal narrative is a thing written about a person/charector
4 0
3 years ago
Draw a flowchart to input a number and find out whether it is divisible by 7 or not​
Over [174]

Note:

% is Modulus,

So it's taken as num mod 7, if that evaluates to 0 there is no reminder therefore divisible by 7.

7 0
3 years ago
Other questions:
  • Emily is an aspiring lyricist. She wants to make a demo tape to send to recording companies. Which input device can she use to r
    5·1 answer
  • Which of the following matching is true concerning the Protocol Data Unit (PDU) and its corresponding OSI layer location?
    15·1 answer
  • Name some of the file extensions for images and provide more information about one or two of them.
    12·1 answer
  • 1. When centering one paragraph on a page of text, the user needs to _____.
    15·2 answers
  • The ____ command creates a subdirectory under a directory. rd md cd ad
    11·1 answer
  • What is included on the HP PC Hardware Diagnostics 3-in-1 USB Key that allows you to recover systems that cannot boot?
    14·1 answer
  • I prefer a job where I am praise for good performance or I am accountable for results
    13·1 answer
  • Is the following statement true or false?
    12·1 answer
  • Which one of the following word processing features saves you the most time when keying a document?
    15·1 answer
  • LAB: Plant information (ArrayList) Given a base Plant class and a derived Flower class, complete main() to create an ArrayList c
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!