Consider that you have a code of 200,000 instructions which is executed using a 16 stages pipeline. It is expected that 20% of the instructions will cause an exception. In order to handle the exception, there is an exception handler which is using 20 cycles to execute (includes the flushing and reloading and the actual handling of the exception). The pipeline frequency is 2 GHz

i) How many cycles does it take to execute the code?

ii) What is the average CPI for this code?

iii) How long does it take to execute the code?

Answers

Answer 1

Answer:

i) The total number of cycles required to execute the code can be calculated as follows:

Total number of instructions = 200,000

Number of instructions causing exceptions = 20% of 200,000 = 40,000

Number of instructions without exceptions = 200,000 - 40,000 = 160,000

Cycles required for instructions without exceptions = 160,000 x 16 = 2,560,000

Cycles required for instructions causing exceptions = 40,000 x (16 + 20) = 1,440,000

Total number of cycles required = 2,560,000 + 1,440,000 = 4,000,000 cycles

ii) The average CPI (Cycles Per Instruction) can be calculated as follows:

Total number of cycles required = 4,000,000 cycles

Total number of instructions executed = 200,000 instructions

Average CPI = Total number of cycles required / Total number of instructions executed

= 4,000,000 / 200,000

= 20 cycles per instruction

iii) The time required to execute the code can be calculated as follows:

Total number of cycles required = 4,000,000 cycles

Pipeline frequency = 2 GHz

Time required to execute the code = Total number of cycles required / Pipeline frequency

= 4,000,000 / 2,000,000,000

= 2 milliseconds

Answer 2

To execute the code using a 16-stage pipeline, each instruction will take 16 cycles. Therefore, the total number of cycles required to execute 200,000 instructions is: 3,200,000 cycles.

What is CPI?

CPI stands for Cycles Per Instruction. It is a metric used to measure the efficiency of a computer's instruction processing. The lower the CPI, the more efficiently the computer is processing instructions.

Each instruction will take 16 cycles to execute using a 16-stage pipeline. As a result, the total number of cycles required to execute 200,000 instructions is as follows:

200,000 times 16 = 3,200,000 cycles

The percentage of instructions causing an exception is 20%, so the average CPI can be calculated as:

Average CPI = (Ideal CPI x Percentage of Instructions without Exceptions) + (Cycles per Exception x Percentage of Instructions with Exceptions)

Average CPI = (1 x 0.8) + (20 x 0.2)

Average CPI = 4.4 cycles per instruction

The length of time it takes to execute the code can be calculated using the following formula:

Execution Time = (Number of Cycles x Cycle Time)

Since the pipeline frequency is 2 GHz, the cycle time is:

Cycle Time = 1 / 2 GHz = 0.5 ns

Therefore, the execution time is:

Execution Time = (3,200,000 + (0.2 x 200,000 x 20)) x 0.5 ns

Execution Time = 1,640,000 ns

Thus, it takes 1,640,000 nanoseconds to execute the code.

For more details regarding CPI, visit:

https://brainly.com/question/14453270

#SPJ2


Related Questions

Select the correct answer from each drop-down menu.
Lucy wants to add some notes in her research paper that provide additional information to the reader. She also wants to display her university logo on all the pages as part of the title. What formatting can she apply to her document to include these details?
Lucy can display her notes in the form of a . She can indicate the logo as part of the .

Answers

Lucy can display her notes in the form of a footnote or endnote

She can indicate the logo as part of the header or footer section.

What is a Footnote?

This refers to the bottom of a page is where footnotes are located. They provide references or offer commentary on a specific passage of material above it. Say, for instance, that you want to add a thought to a sentence you have written, but the thought has nothing to do with the thesis of your paragraph.

Hence, it can be seen that for Lucy to accurately add her notes, she has to add them as a footnote or end note and would be placed in the header or footer section for her logo.

Read more about logo here:

https://brainly.com/question/22856492

#SPJ1

3. In your own opinion, with all the policies and procedures being made or created and perfected, why is it that these rules are still being violated or abused

Answers

With all the policies and procedures being made or created and perfected, the reason these rules are said to be still being violated or abused are:

Lack of AwarenessHuman Error

What are the policies?

Lack of Awareness  is one that shows that even if there are policies as well as procedures that are said to be made and perfected, people or employees can not be fully made known of them and as a result can bring about  unintentional form of  violations or abuse.

Lastly in terms of Human Error, one need to know that people's Mistakes or lapses can be seen in terms of judgment  and this can lead to abuse also.

Learn more about policies from

https://brainly.com/question/3006046

#SPJ1

Formal Writing Assignment: CUNY WAN Modernization Project Spring 2023
The CUNY University System has begun developing programs for enterprising professionals and advanced degree students that want to complete their studies remotely. This emerging need originated when the CUNY University System was operating fully remote due to the Corona virus. There is significant interest in continuing to provide this remote mode of instruction and expand it to new outreach programs within the New York City region. The CUNY University System has hired you to provide help with their modernized WAN that will be needed for developing these new programs.

Providing WAN Services to Remote locations
CUNY University System plans to offer night and weekend classes for professionals and advanced degree students, paralegal students, and nurses, in five “Centers of Excellence” remote locations at each borough of the City of New York.. Its plan is to have professors offer the classes from the main campus site and to use video conferencing and multimedia options at these “Centers of Excellence” remote sites. The CUNY University System main site has a TCP/IP Ethernet network. The remote “Centers of Excellence” sites, which are not yet set up, will also have TCP/IP Ethernet networks.
The CUNY University System Director of Information Technology is asking you to write a proposal for three WAN options (possible candidates are: Frame Relay, Broad Band and MPLS) to connect the “Centers of Excellence” remote sites to the main campus and provide a rationale for each of these options. Your WAN options must provide for the use of voice over IP, video conferencing and multimedia applications. Each WAN option should provide details on the following factors:
 How does the technology work?
 Bandwidth costs
 Bandwidth allocation (how much bandwidth is available/supported) by the method.
 Equipment costs associated with the method.
 Ability for the method to address future expanded bandwidth requirements.
 Ability for the method to incorporate other applications such as voice and video.
 Ability for the method to offers fault tolerant options to provide more guaranteed uptime—an important consideration for providing long-distance learning.
Teaching Classes from Home
The CUNY University System president enjoys participating in several classes once a week as a guest speaker or mentor, but she wants to do this from home, so she can spend more time with her family instead of driving back to the main CUNY University System campus, which is about ten miles away.
Write a 1–2-page letter to the CUNY University System president explaining how she might be connected to the main CUNY University System campus network through a particular WAN technology, and why you recommend that WAN technology. One of the requirements is that she needs to be able to use the telephone in her home office while she is connected to the CUNY network.
WAN Connectivity for a Business Incubator
The CUNY University System is starting a business incubator on the main campus. The business incubator provides one year of resources for up to five new small businesses, including a business location and office resources, such as computers, printers, scanners and Internet access. Write a 1–2-page letter to the CUNY University System president explaining to her the WAN connectivity options that are most appropriate for these small businesses, so that it is consistent with what they can use when they leave the incubator facilities.

Answers

In order to carry out this assignment, you want to make sure that you research and thouroughly understand the Wide Area Network (WAN) techologies of Frame Relay, Broad Bank, and MPLS.

What else needs to be done?

You must present a proposal for each WAN alternative, describing the bandwidth prices, allocation, equipment costs, capacity to handle future bandwidth requirements, include audio and video, and offer fault-tolerant choices.

You would need to submit a letter outlining the proposed WAN technology to link her to the campus network while enabling her to use her phone in response to the CUNY University System president's request to participate in classes from home.

You would also need to produce another letter for the business incubator describing the best WAN connectivity alternatives for small enterprises to use once they depart the incubator facility. Thus,, the project necessitates good research abilities as well as the ability to communicate material clearly and concisely.

Learn more about WAN:
https://brainly.com/question/621746
#SPJ1

Nigeria Amateur Volleyball Association was formed in what year​

Answers

Answer:

The Nigerian Amateur Volleyball Association was formed in 1969.

PLS MARK BRAINLIEST

Explanation:

Answer:

1969

Explanation:

The Nigerian Amateur Volleyball Association was formed in 1969.

1. What would be the best explanation of the variable name 'int indexSize'?
a. Shows the number in the index is big
b. Holds the number in the last index spot
c. Holds the number in the first index spot
d. Holds the number of indexes in the array

Answers

1The option that would be the best explanation of the variable name 'int indexSize' is option d. Holds the number of indexes in the array

What is the variable about?

The variable name 'int indexSize' is one that tells that it have the number of indexes in an array.

Note that The use of the term "indexSize" is one that tells that it stand for the size or the amount of the indexes in the array, and thus it is one that is telling the total number of indexes as well as the elements that is seen in the array.

Therefore, It is common work in programming to be able to make use of variable names that are said to be descriptive.

Learn more about variable from

https://brainly.com/question/28248724

#SPJ1

Fill in the blank after egrep to get output on matrix exactly as shown

$ egrep "_____________" ~mark.fernandes/pub/notes/data/cars

plym fury 77 73 2500
chevy nova 79 60 3000
volvo gl 78 102 9850
Chevy nova 80 50 3500
fiat 600 65 115 450
honda accord 81 30 6000
toyota tercel 82 180 750
chevy impala 65 85 1550


NO quotes. Use as few characters as you can to get the output above.
Answer does not use egrep options. Keep trying as many answers exist.

HINT: Use answer(s) from previous question(s) for clues to solve this
question except these blanks use regex not egrep options and no quotes.

Answers

One possible answer to the above output is:

ruby

(?i)chevy nova.*$

What is the output  about?

(?i) - This is a flag for case-insensitive matching, which allows "Chevy" to match both "Chevy" and "chevy".

chevy nova - This is the literal string "chevy nova".

.*$ - This matches any characters (.*) until the end of the line ($), effectively capturing the entire line that contains "chevy nova".

The regex pattern that fills the blank is:

css

^.{4}\b

The output of the command will be:

yaml

plym fury 77 73 2500

chevy nova 79 60 3000

volvo gl 78 102 9850

Chevy nova 80 50 3500

fiat 600 65 115 450

honda accord 81 30 6000

toyota tercel 82 180 750

Therefore, The ^ character matches the beginning of the line. The .{4} pattern matches any character (except for a newline) exactly 4 times. This matches the first four characters of each line in the input.

Read more about output  here:

https://brainly.com/question/14352771

#SPJ1

Other Questions
which kind of mental health professional is primarily trained to work with severe disorders but cannot prescribe medication How is the Erysipelas disease different from impetigo? List three effectors that are used to lower your body's temperature Suppose a disease wiped out most of the fox population in the food web shown, which TWO populations are most likely to increase as a result? Use the Ratio Test to find the real numbers x for which the series [infinity] (x-6) / k convergesk=1(Use symbolic notation and fractions where needed. Give your answer as intervals in the form (*). Use the symbol [infinity] for infinity, U for combining intervals, and an appropriate type of parenthesis "(" "). "["or"]" depending on whether the interval is open or closed.) portions of the financial statements for software associates are provided below. software associates income statement for the year ended december 31, 2021 net sales $ 603,000 expenses: cost of goods sold $ 363,000 operating expenses 113,000 depreciation expense 31,300 income tax expense 40,500 total expenses 547,800 net income $ 55,200 software associates selected balance sheet data december 31, 2021, compared to december 31, 2020 decrease in accounts receivable $ 8,300 decrease in inventory 11,300 increase in prepaid rent 1,300 decrease in salaries payable 2,300 increase in accounts payable 5,300 increase in income tax payable 6,300 required: prepare the operating activities section of the statement of cash flows for software associates using the indirect method. (list cash outflows and any decrease in cash as negative amounts.) Read the excerpt from The Miracle Worker by William Gibson.([ANNIE] is interrupted by a gasp: HELEN has stuck her finger and sits sucking at it, darkly. Then with vengeful resolve she seizes her doll and is about to dash its brains out on the floor when ANNIE, diving, catches it in one hand, which she at once shakes with hopping pain but otherwise ignores, patiently.)All right, lets try temperance. (Taking the doll, she kneels, goes through the motion of knocking its head on the floor, spells into HELENS hand.)Bad, girl.(She lets HELEN feel the grieved expression on her face. HELEN imitates it. Next she makes HELEN caress the doll and kiss the hurt spot and hold it gently in her arms, then spells into her hand.)Good, girl.(She lets HELEN feel the smile on her face. HELEN sits with a scowl, which suddenly clears; she pats the doll, kisses it, wreathes her face in a large artificial smile, and bears the doll to the washstand, where she carefully sits it. ANNIE watches, pleased.)Very good girl -(Whereupon HELEN elevates the pitcher and dashes it on the floor instead. ANNIE leaps to her feet and stands inarticulate; HELEN calmly gropes back to the sewing card and needle.ANNIE manages to achieve self-control. She picks up a fragment or two of the pitcher, sees HELEN is puzzling over the card, and resolutely kneels to demonstrate it again. She spells into HELENS hand.Select the excerpt from The Story of My Life by Helen Keller that shows a different perspective of similar events.The morning after my teacher came she led me into her room and gave me a doll. The little blind children at the Perkins Institution had sent it and Laura Bridgman had dressed it; but I did not know this until afterward. When I had played with it a little while, Miss Sullivan slowly spelled into my hand the word "d-o-l-l." I was at once interested in this finger play and tried to imitate it. When I finally succeeded in making the letters correctly I was flushed with childish pleasure and pride. Running downstairs to my mother I held up my hand and made the letters for doll. As the cool stream gushed over one hand she spelled into the other the word water, first slowly, then rapidly. I stood still, my whole attention fixed upon the motions of her fingers. Suddenly I felt a misty consciousness as of something forgottena thrill of returning thought; and somehow the mystery of language was revealed to me. I knew then that "w-a-t-e-r" meant the wonderful cool something that was flowing over my hand. That living word awakened my soul, gave it light, hope, joy, set it free! There were barriers still, it is true, but barriers that could in time be swept away. A bright idea, however, shot into my mind, and the problem was solved. I tumbled off the seat and searched under it until I found my aunt's cape, which was trimmed with large beads. I pulled two beads off and indicated to her that I wanted her to sew them on my doll. She raised my hand to her eyes in a questioning way, and I nodded energetically. The beads were sewed in the right place and I could not contain myself for joy; but immediately I lost all interest in the doll. Earlier in the day we had had a tussle over the words "m-u-g" and "w-a-t-e-r." Miss Sullivan had tried to impress it upon me that "m-u-g" is mug and that "w-a-t-e-r" is water, but I persisted in confounding the two. In despair she had dropped the subject for the time, only to renew it at the first opportunity. I became impatient at her repeated attempts and, seizing the new doll, I dashed it upon the floor. I was keenly delighted when I felt the fragments of the broken doll at my feet...I felt my teacher sweep the fragments to one side of the hearth, and I had a sense of satisfaction that the cause of my discomfort was removed. Which group of plants has vascular tissue but does not produce seeds? I. Mosses II. Ferns III. Gymnosperms TRUE/FALSE.In the quantity discount model, the cost of acquiring goods (product cost) is not a factor in determining lot size. clusters that are marked by the operating system as usable when needed are referred to as . Explain how humans may learn through observation. Carlos is adding insulation to a room he just finished framing in his home. The 12 room is 16 ft. By 12 ft. , and the ceilings are 9 ft. Tall. There are two windows in the room measuring 5 ft. By 6 ft. Each. How many square feet of insulation does Carlos need? A. 708 ft. 12 B. 504 ft. 12 C. 768 ft. 2 D. 444 ft. 12 shre zures or 3 what is the constant of proportionally in th equation 2y= 2x the process of selecting and managing aspects of organizational structure and culture to enable the organization to achieve its goals is called organizational . a. centralization b. span of control c. formalization d. design 16. If an approaching train is near enough or going fast enough to be a danger, you mustA. Find an alternative route across tracks.B. Cross the tracks at your own risk.C. Slow down and proceed with caution.D. Not cross the tracks until the train has completely passed : Level I: Reviewing Facts and Terms (Bloom's Taxonomy: Comprehension)49) The enzyme that catalyzes the conversion of H2O and CO2 to H2CO3 is called ________. Given a PySpark dataframe:1- Get all records where the column sale_id is not null.2- Organize it in descending order based on the created_at column.3- The probability that a house in an urban area will be burglarized is 15%. If 30 houses are randomly selected, what is the mean of the number of houses burglarized? 5. Develop a family-centered nursing care plan for Zachary's family during end-of-life care. I need help with this ASAP