HW1
.pdf
keyboard_arrow_up
School
Riverside City College *
*We aren’t endorsed by this school
Course
161
Subject
Computer Science
Date
Dec 6, 2023
Type
Pages
3
Uploaded by arora.tanish
H.A. Esfeden
Spring 2019
CS161 - Homework 1
DUE Monday, April 29, 2019 IN CLASS!
A) Performance Evaluation:
1-
Your job is to evaluate the potential performance of two processors, each implementing a
different ISA. The evaluation is based on its performance on a particular benchmark. On the
processor implementing ISA A, the best compiled code for this benchmark performs at the rate
of 10 IPC. That processor has a 500 MHz clock. On the processor implementing ISA B, the best
compiled code for this benchmark performs at the rate of 2 IPC. That processor has a 600 MHz
clock.
a.
What is the performance in Millions of Instructions per Second (MIPS) of the
processor implementing ISA A?
b.
What is the performance in MIPS of the processor implementing ISA B?
c.
Which is the higher performance processor: A? B? Or
Don’t know
? Briefly explain
your answer.
2-
Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a
3 GHz clock rate and a CPI of 1.5, P2 has a 2.5 GHz clock rate and a CPI of 1.0, and P3 has a
4.0 GHz clock rate and has a CPI of 2.2.
a.
Which processor has the highest performance expressed in instructions per second?
b.
If the processors each execute a program in 10 seconds, find the number of cycles and the
number of instructions for each processor.
c.
For processor P1, we are trying to reduce the execution time by 30% but this leads to an
increase of 20% in the CPI. What clock rate should we have to get this time reduction?
3-
Consider two different implementations of the same instruction set architecture (ISA). The
instructions can be divided into four classes according to their CPI (class A, B, C, and D). P1
with a clock rate of 2.5 GHz have CPIs of 1, 2, 3, and 3 for each class, respectively. P2 with a
clock rate of 3 GHz and CPIs of 2, 2, 2, and 2 for each class, respectively.
Given a program with a dynamic instruction count of 1,000,000 instructions divided into classes
as follows: 10% class A, 20% class B, 50% class C, and 20% class D, which implementation is
faster?
a.
What is the global CPI for each implementation?
b.
Find the clock cycles required in both cases.
H.A. Esfeden
Spring 2019
4-
Compilers can have a profound impact on the performance of an application. Assume that for
a program, compiler A results in a dynamic instruction count of 1.0E9 and has an execution time
of 1.1 s, while compiler B results in a dynamic instruction count of 1.2E9 and an execution time
of 1.5 s.
a.
Find the average CPI for each program given that the processor has a clock cycle time of
1 ns.
b.
Assume the compiled programs run on two different processors (compiled program A
runs on processor A, compiled program B runs on processor B). If the execution times on
the two processors are the same, how much faster is the clock of processor A versus the
clock of processor B?
c.
A new compiler is developed that uses only 6.0E8 instructions and has an average CPI of
1.1. What is the speedup of using this new compiler versus using compiler A or B on the
original processor?
5-
Memory operations currently take 30% of execution time of program A. A new widget called
a “cache” speeds up 80% of memory
operations by a factor of 4. A second new widget called a
“L2 cache” speeds up
half of the remaining 20% by a factor of 2. What is the total speed up?
B) MIPS ISA:
Tip: While you are not expected to memorize all of the assembly instructions, the key skill
necessary is to be able to look up MIPS references (or Google ;-) and understand the operation.
6-
For the MIPS assembly instructions below, what is the corresponding C statement? Assume
that the variables
f
,
g
,
h
,
i
, and
j
are assigned to registers
$s0
,
$s1
,
$s2
,
$s3
, and
$s4
,
respectively. Assume that the base address of the arrays
A
and
B
are in registers
$s6
and
$s7
,
respectively.
sll
is shift left logical, and is an I-type instruction.
sll
$t0, $s0, 2
# $t0 = f * 4
add
$t0, $s6, $t0
# $t0 = &A[f]
sll
$t1, $s1, 2
# $t1 = g * 4
add
$t1, $s7, $t1
# $t1 = &B[g]
lw
$s0, 0($t0)
# f = A[f]
addi $t2, $t0, 4
lw
$t0, 0($t2)
add
$t0, $t0, $s0
sw
$t0, 0($t1)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Computer Organization and ArchitectureAssignment
Submit your work by uploading it in Blackboard or bringing it as a hard copy to my office by the deadline.
Answer the following question:1-What is the datapath?2-What is the Instruction cycle?3-What is the memory hierarchy?
4-Give small description or example and indicate the format of the following MIPS functions:(The first two of them are examples)
Please here is three columns one to instructions and two to format of instruction and three column is to description of function to all instructions but i don't copy to here only
Please solve it.
FormatFormatDescription
lw $1,100($2)Iload word from $2+100 and put it in $1
and $1,$2,$3Gadd $2 and $3 and put the result in $1 | $1= $2+$3
Sw $1,100($2)
la $1,label
andi $1,$2,100
or $1,$2,100
srl $1,$2,10
li $1,100
move $1,$2
Beq $1,$2,100
Bne $1,$2,100
div $2,$3
Bgt $1,$2,100
addi $1,$2,100
addu $1,$2,$3
arrow_forward
Logical address converted into linear address using
then into physical address on memory using.
A
is a logically self-contained unit of code that
receives a list of parameters and performs computation, and
returns results
The
combines your program's object file created by
the assembler with libraries to produces an executable program
makes it possible to start an instruction before
completing the execution of previous one.
The architecture that has a small and simple instruction set with
which all instructions have the same width
Uses the system bus to communicate with the processor and to
handle low-level operations
The mode in which each program can address a maximum of 4 GB
of memory.
Expensive, used for cache memory, faster access, no refresh
The table provided by the operating system contains segment
descriptors for all programs and initialized during boot up.
A special 32-bit register that indicates the address of the next
instruction to be executed by the microprocessor…
arrow_forward
please helllllllllllllllllllllllllllllllllllp
arrow_forward
computer architecture
Assume that the operation times of one add instruction for the major functional units are 325 ps for memory access, 185 ps for ALU operations and 125 ps for register file read/writes. Please fill the table first and perform the following a )What is the total cycle in single-cycle implementation?
b )What is the total cycle in pipelining implementation?
c) What is the total cycle in pipelining implementation if there are 5 million add instructions?
d) What is the total cycle in pipelining implementation for 5 million add instructions, if the stages are balanced?
e)What is the speed up of pipelining implementation over single-cycle implementation?
arrow_forward
Q1:.
arrow_forward
Assume that the operation times of one add instruction for the major functional units are 325 ps for memory access, 185 ps for ALU operations and 125 ps for register file read/writes. Please fill the table first and perform the following
a )What is the total cycle in single-cycle implementation?
b )What is the total cycle in pipelining implementation?
c) What is the total cycle in pipelining implementation if there are 5 million add instructions?
d) What is the total cycle in pipelining implementation for 5 million add instructions, if the stages are balanced?
e)What is the speed up of pipelining implementation over single-cycle implementation?
arrow_forward
A program runs in 15 seconds on computer X, which has a 2 Ghz clock. You are required to help a computer designer to build another computer, Y, that
will run the program in 10 seconds. The designer has determined that a substantial increase in the clock rate is possible, but this increase will affect the
rest of the CPU design, causing computer Y to require 1.5 times as many clock cycles as computer for this program. What clock rate should you tell the
designer to target?
Select one:
a.0.3 Ghz
b.3 Ghz
c.9 Ghz
d.8 Ghz
arrow_forward
1. Anna designs a 2.5 GHz processor where two important programs, A and B, take onesecond each to execute. Each program has a CPI of 1.25. Elsa is tasked with designingthe company's next-generation processor and she comes up with an idea that improvesthe CPI of A to 1.1 and the CPI of B to 0.9. But the idea is so complex that theprocessor can only be implemented with a cycle time of 0.5 ns. Does Elsa's newprocessor out-perform Anna's processor on program A? How about on program B?2. Consider two different implementations of the same instruction set architecture. Theinstructions can be divided into four classes according to their CPI (class A, B, C, andD). P1 with a clock rate of 2.5 GHz and CPIs of 1, 2, 3, and 3, and P2 with a clockrate of 3 GHz and CPIs of 1, 2, 2, and 2.Given a program with a dynamic instructioncount of 106 instructions divided into classes as follows: 10% class A, 20% class B,50% class C, and 20% class D, which is faster: P1 or P2?
arrow_forward
Please written by computer source
Two main techniques are used for memory management in modern computers and operating systems, as described in this module's readings: paging and segmentation. Sometimes they are combined in a segmentation with paging scheme.
Design a memory management scheme for a 50 bit computer architecture, using paging, segmentation or both, as described in this module's readings.
Your post should include a clear translation scheme from a 50 bit logical address to a 50 bit physical address including a picture that shows how this translation takes place. In particular, each field of the logical address must be clearly depicted and its length in bits must be specified.
The proposed scheme must be at least somewhat realistic; for this reason, simple paging and simple segmentation schemes are automatically disqualified, due to the impossible requirements imposed on the implementation in this case (50 bits addresses).
arrow_forward
Q6: A digital computer has a memory unit with 24 bits per word. The instruction set
consists of 110 different operations. All instructions have an operation code part
(opcode) and an address part (allowing for only one address). Each instruction is
stored in one word of memory.
(a) How many bits are needed for the opcode?
(b) How many bits are left for the address part of the instruction?
(c) What is the maximum allowable size for memory?
(d) Can we extend this instruction set by adding new 10 instructions and
keeping the same length of opcode part?
(e) Determine the type of this instruction set: stack-based ISA or accumulator-
based ISA or general purpose registers-based ISA?
arrow_forward
CS & IT
Suppose you wish to run a
program P with 24.5 x
10 9 instructions on a 8 GHz
ww
machine with a CPI of 0.60.
What is the expected CPU time
to execute this program on this
machine?
arrow_forward
a program runs in 10 seconds on computer A, which has a 4 GHz clock. We are trying to help a
computer designer build a computer, B, which will run this program in 6 seconds. The designer
has determined that a substantial increase in the clock rate is possible, but this increase will
affect the rest of the CPU design, causing computer B to require 1.2 times as many clock
cycles as computer A for this program. What clock rate should we tell the designer to target?
arrow_forward
Help please mcq
arrow_forward
In computer architecture, SIMD may refer to the situation where.
a) multiple CPU cores can access the same memory concurrently.
b) the same operation can be applied to multiple operands with only a single instruction.
c) multiple independent instructions can be executed at the same time in the same CPU core.
d) multiple independent memory banks show up as a single address space.
arrow_forward
Q2. P1, P2, and P3 are three processors executing the same instruction set. P1
has a 3 GHz clock rate and a Cycle per Instruction (CPI) of 1.5. P2 has a 2.5 GHz
clock rate and a CPI of 1.0. P3 has a 4.0 GHz clock rate and has a CPI of 2.2. Based
on these values, Answer the following questions (show all calculations and the
formulas you are using):
1. Which processor has the highest performance in terms of instructions
per second?
2.
If the processors individually require 10 seconds to execute a program,
find the number of cycles and the number of instructions for each
processor.
3. We aim to reduce the execution time by 30% (i.e., in 7 seconds) but this
leads to an increase of 20% in the CPI. What clock rates should the
processors have to achieve this time reduction?
arrow_forward
Please use the photo to answer this question: Compare the cost/performance ratio with and without this improvement.
arrow_forward
A two-word directive
The address field of LOAD is saved at
position 300, and the address field of LOAD
is stored at the following location.
The address field has a value of 600, and the
value saved at 600 is 500, and the value
stored at 500 is 650.
400, 401, and 402 are the words stored at
900, 901, and 902, respectively.
The number 800 is stored in a processor
register R, and the value of the index
register is 100.
If the instruction's addressing mode is as
follows, evaluate the effective address and
operand:
1. Immediate 4. Direct
2. Indirect 5. Indirect registration
3. Relationship
6. the index
arrow_forward
Sim8085 - A 8085 microprocessor simulator
arrow_forward
This is an Operating system review question. Answer the question by true or false. Please help me with this review question, this is not a graded question. please also explain why so that i could understand.
arrow_forward
10. The register content for an Intel 8086 microprocessor is as follows:CS = 5000H, DS = 6000H, SS = 7000H, SI = 8000H, DI = 9000HBX = 4A1FH, BP = 3000H, AX = 3597H, CX = 19DAH, DX = 8B73HCalculate the physical address of the memory where the operand is stored and thecontents of the memory locations in each of the addresses shown below:a) MOV [BP + 58], AXb) MOV [SI][BX]+2FH, DXc) MOV [DI][SI]+49AH, DX
arrow_forward
introduction to oprating system multichoice questions
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Related Questions
- Computer Organization and ArchitectureAssignment Submit your work by uploading it in Blackboard or bringing it as a hard copy to my office by the deadline. Answer the following question:1-What is the datapath?2-What is the Instruction cycle?3-What is the memory hierarchy? 4-Give small description or example and indicate the format of the following MIPS functions:(The first two of them are examples) Please here is three columns one to instructions and two to format of instruction and three column is to description of function to all instructions but i don't copy to here only Please solve it. FormatFormatDescription lw $1,100($2)Iload word from $2+100 and put it in $1 and $1,$2,$3Gadd $2 and $3 and put the result in $1 | $1= $2+$3 Sw $1,100($2) la $1,label andi $1,$2,100 or $1,$2,100 srl $1,$2,10 li $1,100 move $1,$2 Beq $1,$2,100 Bne $1,$2,100 div $2,$3 Bgt $1,$2,100 addi $1,$2,100 addu $1,$2,$3arrow_forwardLogical address converted into linear address using then into physical address on memory using. A is a logically self-contained unit of code that receives a list of parameters and performs computation, and returns results The combines your program's object file created by the assembler with libraries to produces an executable program makes it possible to start an instruction before completing the execution of previous one. The architecture that has a small and simple instruction set with which all instructions have the same width Uses the system bus to communicate with the processor and to handle low-level operations The mode in which each program can address a maximum of 4 GB of memory. Expensive, used for cache memory, faster access, no refresh The table provided by the operating system contains segment descriptors for all programs and initialized during boot up. A special 32-bit register that indicates the address of the next instruction to be executed by the microprocessor…arrow_forwardplease helllllllllllllllllllllllllllllllllllparrow_forward
- computer architecture Assume that the operation times of one add instruction for the major functional units are 325 ps for memory access, 185 ps for ALU operations and 125 ps for register file read/writes. Please fill the table first and perform the following a )What is the total cycle in single-cycle implementation? b )What is the total cycle in pipelining implementation? c) What is the total cycle in pipelining implementation if there are 5 million add instructions? d) What is the total cycle in pipelining implementation for 5 million add instructions, if the stages are balanced? e)What is the speed up of pipelining implementation over single-cycle implementation?arrow_forwardQ1:.arrow_forwardAssume that the operation times of one add instruction for the major functional units are 325 ps for memory access, 185 ps for ALU operations and 125 ps for register file read/writes. Please fill the table first and perform the following a )What is the total cycle in single-cycle implementation? b )What is the total cycle in pipelining implementation? c) What is the total cycle in pipelining implementation if there are 5 million add instructions? d) What is the total cycle in pipelining implementation for 5 million add instructions, if the stages are balanced? e)What is the speed up of pipelining implementation over single-cycle implementation?arrow_forward
- A program runs in 15 seconds on computer X, which has a 2 Ghz clock. You are required to help a computer designer to build another computer, Y, that will run the program in 10 seconds. The designer has determined that a substantial increase in the clock rate is possible, but this increase will affect the rest of the CPU design, causing computer Y to require 1.5 times as many clock cycles as computer for this program. What clock rate should you tell the designer to target? Select one: a.0.3 Ghz b.3 Ghz c.9 Ghz d.8 Ghzarrow_forward1. Anna designs a 2.5 GHz processor where two important programs, A and B, take onesecond each to execute. Each program has a CPI of 1.25. Elsa is tasked with designingthe company's next-generation processor and she comes up with an idea that improvesthe CPI of A to 1.1 and the CPI of B to 0.9. But the idea is so complex that theprocessor can only be implemented with a cycle time of 0.5 ns. Does Elsa's newprocessor out-perform Anna's processor on program A? How about on program B?2. Consider two different implementations of the same instruction set architecture. Theinstructions can be divided into four classes according to their CPI (class A, B, C, andD). P1 with a clock rate of 2.5 GHz and CPIs of 1, 2, 3, and 3, and P2 with a clockrate of 3 GHz and CPIs of 1, 2, 2, and 2.Given a program with a dynamic instructioncount of 106 instructions divided into classes as follows: 10% class A, 20% class B,50% class C, and 20% class D, which is faster: P1 or P2?arrow_forwardPlease written by computer source Two main techniques are used for memory management in modern computers and operating systems, as described in this module's readings: paging and segmentation. Sometimes they are combined in a segmentation with paging scheme. Design a memory management scheme for a 50 bit computer architecture, using paging, segmentation or both, as described in this module's readings. Your post should include a clear translation scheme from a 50 bit logical address to a 50 bit physical address including a picture that shows how this translation takes place. In particular, each field of the logical address must be clearly depicted and its length in bits must be specified. The proposed scheme must be at least somewhat realistic; for this reason, simple paging and simple segmentation schemes are automatically disqualified, due to the impossible requirements imposed on the implementation in this case (50 bits addresses).arrow_forward
- Q6: A digital computer has a memory unit with 24 bits per word. The instruction set consists of 110 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory. (a) How many bits are needed for the opcode? (b) How many bits are left for the address part of the instruction? (c) What is the maximum allowable size for memory? (d) Can we extend this instruction set by adding new 10 instructions and keeping the same length of opcode part? (e) Determine the type of this instruction set: stack-based ISA or accumulator- based ISA or general purpose registers-based ISA?arrow_forwardCS & IT Suppose you wish to run a program P with 24.5 x 10 9 instructions on a 8 GHz ww machine with a CPI of 0.60. What is the expected CPU time to execute this program on this machine?arrow_forwarda program runs in 10 seconds on computer A, which has a 4 GHz clock. We are trying to help a computer designer build a computer, B, which will run this program in 6 seconds. The designer has determined that a substantial increase in the clock rate is possible, but this increase will affect the rest of the CPU design, causing computer B to require 1.2 times as many clock cycles as computer A for this program. What clock rate should we tell the designer to target?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning