Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 5, Problem 5.15HW
Write a version of the inner product procedure described in Problem 5.13 that uses 6 × 6 loop unrolling. Our measurements for this function with x86-64 give a CPE of 1.06 for integer data and 1.01 for floating-point data.
What factor limits the performance to a CPE of 1.00?
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Show examples of C code that explicitly do a read-modify-write operation on SAMD21 I/O pin PA02 to setthis bit in a PORT register, clear it in a PORT register, and toggle it in a PORT register. You may assumeit has already been initialized as an output. If possible, show an example of code that implicitlydoes a read-modify-write operation on this pin.
Write a program in MIPS assembly that allows replacing a substring with another substring. Use any function and variable of your choice.
For example:
Input:
- Initial text: XXabXXcd
- Word to replace : XX
- Replacement word: YY
Output: YYabYYcd
How can you teach an old dog new tricks? How can a bird in the hand be worth two in the bush? How can you have your cake and eat it too? How can a serial in/parallel out register kill two birds with one stone and be used as a serial in/serial out register?
Chapter 5 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
This statement can cause other program statements to execute only under certain conditions. 1. Conditional 2. D...
Starting Out With Visual Basic (7th Edition)
What would be the hexadecimal representation of the largest memory address in a memory consisting of 4MB if eac...
Computer Science: An Overview (12th Edition)
State whether each of the following is true or false. A nested control statement appears in the body of another...
Java How To Program (Early Objects)
What would be the output in Self-Test Exercise 5 if the assignment were changed to the following? intextra=37;
Absolute Java (6th Edition)
Explain the purpose of indexing in database implementation.
Modern Database Management
Suppose that a binary file contains exactly three numbers written to the file using the method writeDouble of t...
Java: An Introduction to Problem Solving and Programming (8th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Implement a shared-memory pthread program on in C to find Prefix Sum of n integers. Keep theparallel overheads to a minimum. (One barrier synchronization may be enough.) Vary n as 210, 215, and 220 (or moreif desired), and p, the number of processes, from 1 to 8, and obtain the speedup relative to the sequential timingswithout any overheads. Produce a speedup plot with p on x-axis and Sp on y-axis. Each n will result in a separatespeedup curve. Use same plot for all the curves to see how speedup varies as problem size increases.arrow_forwardConsider a program where 95% of the code can be parallelized. If you have aninfinite number of processors, what is the maximum speedup possible accordingto Amdahl's Law?arrow_forwardWrite code to implement the expression: A = (B + C) * (D + E) on 3-, 2-, 1- and 0-addressmachines. In accordance with programming language practice, computing theexpression should not change the values of its operands.arrow_forward
- Given x86-code write equivalent RV64I code, assume same register names for convenience pop raxarrow_forwardSuppose that we have an atomic test-and-set-lock instruction that atomically copies val to old_val, and sets val to 1. void test_and_set(int* old_val, int* val); Write the implementations for the following functions of a Spinlock. void acquire(int* lock) { // your code } void release(int* lock) { // your code } PROVIDE CODE IN Carrow_forwardThe SAR instruction is suitable for signed integers True or False?arrow_forward
- 1. Consider the following y86-64 program: .pos 0x0irmovq $128,%rdxirmovq $3,%rcxrmmovq %rcx, 0(%rdx)irmovq $10,%rbxmrmovq 0(%rdx), %rax # Load %raxaddq %rbx,%rax # Use %raxhalt What value will be in register %rbx when the halt statement is reached? Give your result in hex, without leading 0s or 0x. Answer: 2. Consider the following y86-64 program: .pos 0x0irmovq $128,%rdxirmovq $3,%rcxrmmovq %rcx, 0(%rdx)irmovq $10,%rbxmrmovq 0(%rdx), %rax # Load %raxaddq %rbx,%rax # Use %raxhalt Memory is written to by this program. What is the memory address? Give your result in hex, without leading 0s or 0x. Answer: 3. Consider the following y86-64 program: .pos 0x0irmovq $128,%rdxirmovq $3,%rcxrmmovq %rcx, 0(%rdx)irmovq $10,%rbxmrmovq 0(%rdx), %rax # Load %raxaddq %rbx,%rax # Use %raxhalt Memory is written to by this program. What value is written to memory? Give your result in hex, without leading 0s or 0x. Answer: 4. Consider the following y86-64 program: .pos 0x0irmovq…arrow_forwardIn 8086 ASM 64 bit, how to write assembly code for taking input for a single digit positive number, increment the input number by 2, write the single digit result, decrement the input number by 1 and then finally write the single digit result.arrow_forward5.9 Implement a serial bit stream sequence detector with first two data are 00 followed by at least twoconsecutive 11 by doing the following. Specification example, if input data senquence is 0011 or 00111or 001111, ...the output will be 1; otherwise the output will be 0, such as the input is 01XX or 10XX or0010 or any sequence, ...[1] How many flip flop is needed to implement this detector?[2] Derive a state diagram for this detector.[3] What type flip flop is going to be used?[4] Draw a truth table for this detector with considering the FF chosen in [3][5] Develop state input equations[6] Sketch a logic diagram for this detectorarrow_forward
- 25: . Find the time delay in the following program if the crystal frequency is 1 MHz. Do not ignore the time delay due to the first and last instruction. DELAY: LDI R16, 30 AGAIN: LDI R17, 35 HERE: NOP NOP DEC R17 BRNE HERE DEC R16 BRNE AGAIN RET 26: Write a program to display 2 on 7 segment. A 7 segment is connected to PortD.arrow_forwardPLEASE ANSWER THE QUESTION AND EXPLAIN THE ANSWER Assume that the register %rbp is currently holding 0x7fffffffebc0. Using the following GDB dump, write out, in ASCII, the string of characters starting at -0x20(%rbp). (gdb) x/4gx $rbp - 40 0x7fffffffeb98: 0x0096620656874207 0x6f66207964757453 0x7fffffffeba8: 0x6966206568742072 0x05684000006c616e 0x7fffffffebb8: 0x0068656c6c6f2063 0x7332363100000000 Hint 1: a string of characters is an array of chars with variable length. Hint 2: 0x00 is used to mark the end of a character string in C.arrow_forwardIn the following code, the first printf() reached produces the output “14,” but the second printf() can cause a bus error or a segmentation fault. Why? main(){ int *p;funct(p);printf("%d\n",*p);}funct(int *p2){p2=(int *)malloc(4);*p2=14;printf("%d\n",*p2);}arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Boolean Algebra - Digital Logic and Logic Families - Industrial Electronics; Author: Ekeeda;https://www.youtube.com/watch?v=u7XnJos-_Hs;License: Standard YouTube License, CC-BY
Boolean Algebra 1 – The Laws of Boolean Algebra; Author: Computer Science;https://www.youtube.com/watch?v=EPJf4owqwdA;License: Standard Youtube License