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 9.9, Problem 9.10PP
Program Plan Intro
Simple Segregated Storage:
Simple Segregated Storage is the fastest and simplest
- It works by separating a blocks of memory into fixed size chunks.
- The free list holds same size blocks for each size class, respectively the size of the largest item of the size class.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Problem 15 (#2.3.30).If f and f◦g are one-to-one, does it follow that g must
be one-to-one? Justify your answer.
R-13.17 - There are eight small islands in a lake, and the state wants to build seven bridges to connect them so that each island can be reached from any other one via one or more bridges. The cost of constructing a bridge is proportional to its length. The distances between pairs of islands are given in the following table.
Find which bridges to build to minimize the total construction cost.
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?
Chapter 9 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Ch. 9.2 - Prob. 9.1PPCh. 9.3 - Prob. 9.2PPCh. 9.6 - Prob. 9.3PPCh. 9.6 - Prob. 9.4PPCh. 9.8 - Practice Problem 9.5 (solution page 882) Write a C...Ch. 9.9 - Prob. 9.6PPCh. 9.9 - Prob. 9.7PPCh. 9.9 - Prob. 9.8PPCh. 9.9 - Prob. 9.9PPCh. 9.9 - Prob. 9.10PP
Ch. 9 - Prob. 9.11HWCh. 9 - Repeat Problem 9.11 for the following address....Ch. 9 - Repeat Problem 9.11 for the following address....Ch. 9 - Given an input file hello.txt that consists of the...Ch. 9 - Determine the block sizes and header values that...Ch. 9 - Prob. 9.16HWCh. 9 - Prob. 9.17HWCh. 9 - Prob. 9.18HWCh. 9 - Prob. 9.19HWCh. 9 - Write your own version of malloc and free, and...
Knowledge Booster
Similar questions
- 113. Banker's algorithm for resource allocation deals with a. deadlock prevention b. deadlock avoidance c. deadlock recovery d. mutual exclusionarrow_forwardDevelop a C/C++ program that accepts the name of a memory trace file as a command line argument. Use the data to simulate a set associative cache using LRU replacement. Additional command line arguments will be needed to identify the details of the simulated cache. The arguments should appear in the following order: the memory trace input file X, where 2X == the number of direct-mapped sets Y, where 2Y == the number of blocks per set Z, where 2Z == the number of cached words per block Your program (say it's a compiled C program) could be run like this: ./cache data.tra 3 2 4 This would simulate an 8 set associative LRU cache with 4 blocks per set, where each block caches 16 addresses. NOTE… the reason I've chosen to use exponents for arguments is to ensure we have powers of 2 for everything. Trace File The trace file is line based with each line containing a memory address requested, in hex. Please note this data is real, so the addresses are larger than 32-bits. In…arrow_forward4.22 [5] <§4.5> Consider the fragment of LEGv8 assembly below: STUR X16, [X6, #12] LDUR X16, [X6, #8] SUB X7, X5, X4 CBZ X7, Label ADD X5, X1, X4 SUB X5, X15, X4 Suppose we modify the pipeline so that it has only one memory (that handles both instructions and data). In this case, there will be a structural hazard every time a program needs to fetch an instruction during the same cycle in which another instruction accesses data. 4.22.1 [5] <§4.5> Draw a pipeline diagram to show were the code above will stall. 4.22.2 [5] <§4.5> In general, is it possible to reduce the number of stalls/NOPs resulting from this structural hazard by reordering code? 4.22.3 [5] <§4.5> Must this structural hazard be handled in hardware? We have seen that data hazards can be eliminated by adding NOPs to the code. Can you do the same with this structural hazard? If so, explain how. If not, explain why not. 4.22.4 [5] <§4.5> Approximately how many stalls would you expect this…arrow_forward
- Write a C/C++ code to Implement the following scenario: An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to three groups of customers as follows: a. The first group has 64 customers; each needs 256 addresses. b. The second group has 128 customers; each needs 128 addresses. c. The third group has 128 customers; each needs 64 addresses. Design and Implement the sub blocks and find out how many addresses are still available after these allocations.arrow_forward28. Four necessary conditions for deadlock are non pre-emption, circular wait, hold and wait and a. mutual exclusion b. race condition c. buffer overflow d. None of abovearrow_forward7. a. Explain the concept and the cause of a memory leak. b. Explain the idea of garbage collection and how it is related to current heap linksarrow_forward
- 4.25 Consider the following loop. LOOP: LDUR X10, [X1, #0] LDUR X11, [X1, #8] ADD X12, X10, X11 SUBI X1, X1, #16 CBNZ X12, LOOP Question) Assume that perfect branch prediction is used (no stall due to control hazard), that it has full forwarding support, and that branches are resolved in the ID stage. Show a pipeline execution time diagram for the first two iterations of this loop. please explain with IF,ID,EX, MEM,WB figure thank youarrow_forward10. Consider the following code: .386 .model flat, stdcall .stack 4096 ExitProcess PROTO, dwExitCode : DWORD .data aVal SDWORD -6 bVal SWORD 19h cVal DWORD 17h .code mov edx, aVal add edx, edx mov eax, 0FFFFFFFFh mov ax, bVal sub edx, eax Show the content of edx and eax after executing each instruction in Hexadecimaarrow_forwardExplain with a diagram an undesirable effect of stack memory and heap memory in terms of memory allocationarrow_forward
- (Practice) a. Using Figure 2.14 and assuming the variable name rate is assigned to the byte at memory address 159, determine the addresses corresponding to each variable declared in the following statements. Also, fill in the correct number of bytes with the initialization data included in the declaration statements. (Use letters for the characters, not the computer codes that would actually be stored.) floatrate; charch1=M,ch2=E,ch3=L,ch4=T; doubletaxes; intnum,count=0; b. Repeat Exercise 9a, but substitute the actual byte patterns that a computer using the ASCII code would use to store characters in the variables ch1, ch2, ch3, and ch4. (Hint: Use Appendix B.)arrow_forwardProblem 1 Consider a direct mapped cache of size 16 KB with block size 256 bytes. The size of main memory is 128 KB. Find- Number of bits in tag Tag directory sizearrow_forward1. 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_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