Question

In: Computer Science

The speed at which a processor can process instructions can be increased by making its clock...

  • The speed at which a processor can process instructions can be increased by making its clock speed higher, or by increasing the amount of L1 cache memory on the processor chip.

    Explain the terms clock speed and L1 cache and briefly discuss how increasing each of them increases the speed at which instructions can be processed.

    The maximum word limit for Question 3(a) is 150 words.

  • b.You have the choice of buying two processors:

    • Processor 1 has a clock speed of 4.0 GHz with 32 KiB of L1 cache.
    • Processor 2 has a clock speed of 2.0 GHz with 64 KiB of L1 cache.

    In order to decide which to buy, you decide to estimate the time each processor will take to process a program with 10,000 RISC instructions. Each RISC instruction takes one clock pulse to execute once it is in the registers, and has a size of 4 bytes.

    • i.Show that a program consisting of 10,000 RISC instructions will fit into 64 KiB of L1 cache, but will not fit into 32 KiB of L1 cache.
    • ii.It takes 1 nanosecond (1 x 10-9 s) to move an instruction from L1 cache to the registers and 9 nanoseconds to move an instruction from L2 cache to the L1 cache. Assume that for Processor 2, all of the instructions can be found in L1 cache and for Processor 1, all of the instructions that won’t fit in L1 cache can be found in L2 cache.

      How much time is needed to load all 10,000 instructions into the registers for each processor. Write your answers in seconds, using scientific notation.

    • iii.For each processor, calculate the time it takes to execute 10,000 RISC instructions. Write your answers in seconds, using scientific notation.
    • iv.Using your results from part (ii) and part (iii), for each processor, calculate the total amount of time to load 10,000 RISC instructors from cache memory to the registers, and then to execute them.

      You may assume that no data is needed for this test program. in each case you will only need to calculate the time to move 10,000 instructions into the registers and the time to execute the 10,000 instructions. You will then find the total time for each processor by adding these two values.

      Write your answers in seconds, using scientific notation.

Solutions

Expert Solution

Cache memory

The cache is a small amount of memory which is a part of the CPU - closer to the CPU than RAM. It is used to temporarily hold instructions and data that the CPU is likely to reuse.

The CPU control unit automatically checks a cache for instructions before requesting data from RAM. This saves fetching the instructions and data repeatedly from RAM – a relatively slow process which might otherwise keep the CPU waiting. Transfers to and from cache take less time than transfers to and from RAM.

The more cache there is, the more data can be stored closer to the CPU.

A cache is graded as Level 1 (L1), Level 2 (L2) and Level 3 (L3):

  • L1 is usually part of the CPU chip itself and is both the smallest and the fastest to access. Its size is often restricted to between 8 KB and 64 KB.
  • L2 and L3 caches are bigger than L1. They are extra caches built between the CPU and the RAM. Sometimes L2 is built into the CPU with L1. L2 and L3 caches take slightly longer to access than L1. The more L2 and L3 memory available, the faster a computer can run.

Not a lot of physical space is allocated for cache. There is more space for RAM, which is usually larger and less expensive.

Clock speed

The clock speed - also known as clock rate - indicates how fast the CPU can run. This is measured in megahertz (MHz) or gigahertz (gHz) and corresponds with how many instruction cycles the CPU can deal with in a second. A 2 gHz CPU performs two billion cycles a second. A faster CPU uses more energy and creates more heat.

A computer will normally have a maximum clock speed set by default, but it is possible to change this speed in the computer BIOS. Some people increase a CPU clock speed to try to make their computer run faster - this is called overclocking.

There are limits to how fast a CPU can run and its circuitry cannot always keep up with an overclocked speed. If the clock tells the CPU to execute instructions too quickly, the processing will not be completed before the next instruction is carried out. If the CPU cannot keep up with the pace of the clock, the data is corrupted. CPUs can also overheat if they are forced to work faster than they were designed to work.


Related Solutions

In a one processor system, there is an interrupt clock which is set to a “time...
In a one processor system, there is an interrupt clock which is set to a “time slice Q”, that is, every Q an interrupt occurs to stop the process. There is only one I/O device in the system    which is interrupted when the process needs an I/O. There are 3 processes A, B, C.           Process A executes an I/O interrupt every T units of time.      Process B executes an I/O interrupt every 2T units of time.     ...
A program must execute 1012 instructions to solve a problem. A single processor system can solve...
A program must execute 1012 instructions to solve a problem. A single processor system can solve the problem in 106 seconds. Thus on average the single processor system executes 106 or 1-million instructions per second. We have a new program that has been parallelized for execution on a distributed-memory system. This parallel program uses (p) processors. Here each processor will execute 1012/p instructions and each processor must send 109(p-1) messages. We will assume there is not additional overhead for the...
A process has realized that its clock is ahead by 10 minutes. Suggest a mechanism for...
A process has realized that its clock is ahead by 10 minutes. Suggest a mechanism for slowing down the clock and work out when its clock will read the correct time.
Assume a non-pipelined processor takes 100 ns to process an instruction. The same instruction can be...
Assume a non-pipelined processor takes 100 ns to process an instruction. The same instruction can be executed in a 5-stage pipelined processor, where each stage takes 20 ns. (i) What is the minimum number of instructions for which the speedup achieved by the pipelined processor compared to the non-pipelined processor is at least 4? (ii) The instruction takes the same time (100 ns) to execute whether on the pipelined processor or on the non-pipelined processor. So why do we say...
Sell or Process Further, Basic Analysis Carleigh, Inc., is a pork processor. Its plants, located in...
Sell or Process Further, Basic Analysis Carleigh, Inc., is a pork processor. Its plants, located in the Midwest, produce several products from a common process: sirloin roasts, chops, spare ribs, and the residual. The roasts, chops, and spare ribs are packaged, branded, and sold to supermarkets. The residual consists of organ meats and leftover pieces that are sold to sausage and hot dog processors. The joint costs for a typical week are as follows: Direct materials $85,500 Direct labor 34,200...
Sell or Process Further, Basic Analysis Carleigh, Inc., is a pork processor. Its plants, located in...
Sell or Process Further, Basic Analysis Carleigh, Inc., is a pork processor. Its plants, located in the Midwest, produce several products from a common process: sirloin roasts, chops, spare ribs, and the residual. The roasts, chops, and spare ribs are packaged, branded, and sold to supermarkets. The residual consists of organ meats and leftover pieces that are sold to sausage and hot dog processors. The joint costs for a typical week are as follows: Direct materials $85,000 Direct labor 29,000...
How can a business speed up its cash cycle which is part of cash management?
How can a business speed up its cash cycle which is part of cash management?
Identify a technique(sensor) through which we can measure the speed of a train and its location....
Identify a technique(sensor) through which we can measure the speed of a train and its location. explain its working briefly?
Instructions: Use the 6 step rational choice decision making process (Attached) to make a decision about...
Instructions: Use the 6 step rational choice decision making process (Attached) to make a decision about the following issue. Abdulla is in charge of scheduling the work for the service department of a car dealership. Recently, many of the sales representatives have been taking phone calls from their regular customers, and promising that their car repairs can be completed on certain days or at certain times. Things are not going well, and today it seems like everyone is unhappy –...
Consider the difficulty of the healthcare policy-making process; The process to which the congressional budget is...
Consider the difficulty of the healthcare policy-making process; The process to which the congressional budget is dispersed and the appropriations process. The ideals that American’s have and apply to government policy-making and individual governing locally, state-wide, country-wide, and at a micro-level within facilitates share similar frameworks. Public and Private governing is another aspect of policymaking and influencing that takes place. Does this change your view of our political system?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT