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
Question
Chapter 11.3, Problem 11.1PP
Program Plan Intro
IP addresses:
- The IP address denotes an unsigned integer that is 32-bit.
- The IP addresses is been stored by network programs in IP address structure.
- The addresses present in IP address structure are stored in network byte order.
- An unsigned 32-bit integer is converted from host byte order to network byte order by “htonl” function.
- An unsigned 32-bit integer is converted from network byte order host byte order by “ntohl” function.
- The IP address is presented to humans in a form known as “dotted-decimal” notation.
- Each byte is been represented by its corresponding decimal value and is separated by a period from other bytes.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
I ONLY NEED 3 AND 4
Suppose memory has 256KB, OS use low address 20KB, there is one program sequence:
Prog1 request 80KB, prog2 request 16KB,
Prog3 request 140KB
Prog1 finish, Prog3 finish;
Prog4 request 80KB, Prog5 request 120kb
Use first match and best match to deal with this sequence
(from high address when allocated)
(1)Draw allocation state when prog1,2,3 are loaded into memory?
(2)Draw allocation state when prog1, 3 finish?
(3)use these two algorithms to draw the structure of free queue after prog1 , 3 finish
(4) Which algorithm is suitable for this sequence ? Describe the allocation process?
1. We wish to compare the performance of two different machines: M1 and M2. The following measurements have been made on these machines:
Program
Time on M1
Time on M2
1
10 seconds
5 seconds
2
3 seconds
4 seconds
Which machine is faster for each program, and by how much?
2. For M1 and M2 of problem 1, the following additional measurements are made:. Find the instruction execution rate (instructions per second) for each machine when running program 1.
Program
Instructions executed on M1
Instructions executed on M2
1
200 x 106
160 x 106
3. For M1 and M2 of problem 1, if the clock rates are 200 MHz and 300 MHz, respectively, find the CPI for program 1 on both machines using the data provided in problems 1 and 2.
4. You are going to enhance a machine, and there are two possible improvements: either make multiply instructions run four times faster than before or make memory access instructions run two times faster than before. You…
Answer only 3 and 4
Suppose memory has 256KB, OS use low address 20KB, there is one program sequence: (20) • Prog1 request 80KB, prog2 request 16KB, • Prog3 request 140KB • Prog1 finish, Prog3 finish; • Prog4 request 80KB, Prog5 request 120kb • Use first match and best match to deal with this sequence • (from high address when allocated) • (1)Draw allocation state when prog1,2,3 are loaded into memory? • (2)Draw allocation state when prog1, 3 finish? • (3)use these two algorithms to draw the structure of free queue after prog1 , 3 finish(draw the allocation descriptor information,) • (4) Which algorithm is suitable for this sequence ? Describe the allocation process?
Chapter 11 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Ch. 11.3 - Prob. 11.1PPCh. 11.3 - Prob. 11.2PPCh. 11.3 - Practice Problem 11.3 (solution page 967) Write a...Ch. 11.4 - Prob. 11.4PPCh. 11.5 - Prob. 11.5PPCh. 11 - Prob. 11.6HWCh. 11 - Prob. 11.7HWCh. 11 - Prob. 11.8HWCh. 11 - Modify TINY SO that when it serves static content,...Ch. 11 - Prob. 11.10HW
Knowledge Booster
Similar questions
- (Practice) Although the total number of bytes varies from computer to computer, memory sizes of millions and billions of bytes are common. In computer language, the letter M representsthe number 1,048,576, which is 2 raised to the 20th power, and G represents 1,073,741,824, which is 2 raised to the 30th power. Therefore, a memory size of 4 MB is really 4 times 1,048,576 (4,194,304 bytes), and a memory size of 2 GB is really 2 times 1,073,741,824 (2,147,483,648 bytes). Using this information, calculate the actual number of bytes in the following: a. A memory containing 512 MB b. A memory consisting of 512 MB words, where each word consists of 2 bytes c. A memory consisting of 512 MB words, where each word consists of 4 bytes d. A thumb drive that specifies 2 GB e. A disk that specifies 4 GB f. A disk that specifies 8 GBarrow_forwardIn the previous answers:Isn't 1 is supposed to be subtracted from the 64 as well? Malloc for x: Requested size: 10k Address returned to the caller: 32k + 1k = 33k (since x will be placed after the header of 1k) Address returned to the program: 33k Remaining free memory: 54k (64k - 10k) (here) Address of the remaining free memory: 43k andHere, the requested size is 20, why is 10 subtracted? Malloc for y (again): Requested size: 20k Address returned to the caller: 44k (previous address) Address returned to the program: 44k (previous address) Remaining free memory: 54k (64k - 10k) (here) Address of the remaining free memory: 64karrow_forwardPlease if could, typed solution Consider a logical address space of 32 pages of 1024 words each, mapped onto a physical memory of 64 frames. How many bits are there in the logical address? How many bits are there in the physical address?arrow_forward
- 1. Develop a mathematical model for measuring performance based on overall memory access time with a neat diagram for the following memory design and derive the formula to calculate the Overall Memory Access Time. Main Memory : 1 Internal Cache : 1 External Cache: 1 Register S and Register B have fastest access time: Data Search order [ Registers – Internal Cache – External Cache – Memory] [Hint: Register access time is considered negligible]arrow_forwardThis problem is adapted from an earlier edition of P&H, and should be submitted.Consider the following code used to implement a new instruction: foo $t3,$t1,$t2:mask : . word 0xFFFFF83Fs t a r t : l a $t0 , masklw $t0 , 0 ( $ t 0 )l a $t3 , s h f t rlw $t3 , 0 ( $ t 3 )and $t3 , $t3 , $ t 0a ndi $t2 , $t2 , 0 x 0 0 1 fs l l $t2 , $t2 , 6o r $t3 , $t3 , $ t 2l a $t5 , s h f t rsw $t3 , 0 ( $ t 5 )s h f t r : s l l $t3 , $t1 , 0Add meaningful comments to the code and write a brief (2 sentence max) description of what foo does. Thisis not the same as saying how it does it - e.g., when asked to describe what a pedestrian is doing, you wouldsay they are walking, not that they are ilfting their left leg, angling it forward, putting it down, . . ..State at least one reason why writing “self-modifying code” such as this is a bad idea (and often times notactually allowed by the operating system)?arrow_forwardSUBJECT: COMPUTER ORGANASATION 1. a. How many address bits are required to access 256K words of memory? b. How many bytes of memory can be addressed by 24 address bits?arrow_forward
- Q1: Suppose the hypothetical processor has two I/O instructions: (3+3+3)0011=Load AC from I/O0111=Store AC to I/OIn this case, the 12-bit address identifies a particular external device. Show the program execution using figure for the following program:a) Load AC from device 6b) Add contents of memory location 880c) Store AC to device 7 (Note: Question is to be solved similar to the pictures attached with minimum explaination of a line or two with the steps and SHOULD include the memory location 880 as stated in the question)arrow_forward1. 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_forward4.19.16: [5] <COD §4.6>. In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems in this exercise assume that individual stages of the datapath have the following latencies: Also, assume that instructions executed by the processor are broken down as follows: (a) What is the clock cycle time in a pipelined and non-pipelined processor? (b) What is the total latency of an lw instruction in a pipelined and non-pipelined processor? (c) If we can split one stage of the pipelined datapath into two new stages, each with half the latency of the original stage, which stage would you split and what is the new clock cycle time of the processor? (d) Assuming there are no stalls or hazards, what is the utilization of the data memory? (e) Assuming there are no stalls or hazards, what is the utilization of the write-register port of the "Registers" unit? No hand written and fast answer with explanationarrow_forward
- Computer Science Consider the following code: lb x6, 3(x7) sd x6, 8(x7) Assume that the register x7 contains the address (>10000000 and the data at address (>10000000 is: 0x11223344CCDDEEFF, while the data at address (>10000008 is: 0xF1E2D3C4B5A69780. Q1: What value is stored in 0x10000008 on a MIPS (big-endian) machine? Q2: What value is stored in 0x10000008 on a RISC-V (little-endian) machine?arrow_forwardSection 1.0 cites as a pitfall the utilization of a subset of the performace equation as a performance metric. To illustrate this, consider the following two processors. P1 has a clock rate of 4GHz, average CPI of 0.9, and requires the execution of 5.0E9 instructions. P2 has a clock rate of 3GHz, an average CPI of 0.75, and requires the execution of 1.0E9 instructions. (1) A common fallacy is to use MIPS to compare the performace of two different processors, and consider that the processor with the largest MIPS has the largest performance. Check if this is true for P1 and P2. (2) Another common performace figure is MFLOPS, defined as MFLOPS = No. FP operations / (execution time x 1E6) but this figure has the same problems as MIPS. Assume that 40% of the instructions executed on both P1 and P2 are floating-point instructions. Find the MFLOPS figures for the processors.arrow_forwardMr. H. Ahmed works from 9 to 5. Write an assembly language code using emu 8086 that takes integer days for each monthand calculates the yearly income. Considering $15/hrs and a yearly bonus of 10%.Sample Input:January: 10 February: 10 March: 10 April: 10 May: 10 June: 10 July: 10 August: 10 September: 10 October: 10 November: 10 December: 10Sample Output:Income: $15,840arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr