Dynamic Storage Management-Chapter 2-Analysis of exercises in data structure question set-yan Weimin Wu Weimin edition and Yan Weimin Wu Weimin, Data Structure
Question set Parsing
Chapter 2 Dynamic Storage Management
-- Data Structure question set-yan Weimin. Wu Weimin
Source code instructions☛☛☛Data Structure-C language version (Yan Weimin, Wu Weimin version) Textbook source code + EXERCISE set parsing instructions
Textbook source code compilation Link☛☛☛Data Structure textbook source code compilation
Question set full resolution Link☛☛☛Analysis and compilation of data structure question set
Test data download link☛Data Packets
Directory where this exercise document is stored: Data Structure \ ▼ \ ▼ 08 Dynamic Storage Management
Source code storage directory in the document: Data Structure \ ▼ \ ▼ 08 Dynamic Storage Management \ ▼ exercise test documentation-08
Source code test Data storage directory: Data Structure \ ▼ \ ▼ 08 Dynamic Storage Management \ FAQs test documentation-08 \ Data
I. Basic knowledge questions
8.1 transition assume that the boundary identification method is used to adapt to policy allocation for the first time. It is known that the status of the available space table at a specific time is shown in:
(1) Draw the linked list status after the system recycles an idle block with a starting address of 559 and a size of 45;
(2) draw out the linked list status of a free block with the starting address of 100 and the size of 44 after the system accepts the request of the storage block size of 515.
Note: The value of a large or small domain in the bucket header and the storage size requested for allocation both include the storage space at the header and the end.
8.2 when conditions can be attached to a reusable space table organized as a circular linked list, the first adaptation policy is changed to the best adaptation policy?
8.3 then, two idle blocks of the sizes of 100 and 200 are sequentially linked to the available space table. When a block is allocated, the remaining part of the block remains in the original link status in the available space table. The application sequence meeting the following conditions is given respectively:
(1) The best adaptation policy can satisfy all applications, but the first adaptation policy cannot;
(2) The first adaptation policy can satisfy all applications, but the best adaptation policy cannot.
8.4 why is the efficiency of the boundary flag algorithm in the dynamic storage management method of variable-length blocks higher than the efficiency of the Space table that can be organized in the node structure shown in?
8.5 ✓ consider the two border flag methods (best adaptation and first adaptation ):
(1) What are the main differences between data structures?
(2) What are the main differences between allocation algorithms?
(3) What are the main differences between recycling algorithms?
8.6. What is the binary address of the partner of a block with a binary address of 011011110000 and a size of (4) 10? What if the block size is (16) 10?
8.7 Bytes: a memory of 512 characters is known. Suppose six users have successively put forward allocation requests with sizes of 52,100, 11, and 19, respectively, after that, the block size is 45, and the order of 52 and 11 is released. Assume that the partner system implements dynamic storage management,
(1) Draw the initial state of the available space table;
(2) Draw the status of the linked list after six Users enter and the starting address of each user's storage block;
(3) Draw the linked list status after the three user-released storage blocks are recycled.
8.8 explain a spatial application sequence a1, a2,… that meets the following conditions ,..., An: starting from the initial state of the partner management system with the available space of 25, a1, a2 ,..., An-1 can meet, while an cannot, and a1 + a2 +... + An is the smallest.
8.9 distinct has five generalized tables: L = (L1, L3), L1 = (L2, L3, L4), L2 = (L3), L3 = (), l4 = (L2 ). If you use access counters for storage management, you need to add a header node to each table or sub-table and set a counting field in it.
(1) Try to plot the storage structure of table L with counters;
(2) which nodes in the linked list can be released when the sub-Table L1 is deleted from table L? How does the counting field of each sub-Table change?
(3) What will happen if L2 = (L3, L4?
8.10 notify assume that the "Heap" structure is used for dynamic storage management. The following table lists the memory formats before the storage compression process is executed. Please use a table to show the memory pattern after the storage compression process is executed.
Reprinted with the source: original article link
Ii. Algorithm Design Questions
8.11 Tib consider the dynamic storage management problem of space release following the "last distributor first release (stack)" rule, and set the size of idle blocks applied for in each space application.
(1) design an appropriate data structure for dynamic storage management;
(2) write an algorithm for allocating storage blocks for a space of n.
8.12 limit is the same as the 8.11 condition. Write an algorithm to recycle and release blocks.
Boundary flag Method
8.13 complete the border flag test and allocate the corresponding block recycling algorithm according to the first adaptation policy.
Partner System
8.14 complete the storage collection algorithm of the partner management system.
Useless Unit collection8.15 The upstream and downstream addresses of the allocated space are given by the variables highbound and lowbound respectively to form a "heap" consisting of blocks of the same size ". Write an algorithm to link all the blocks with 0 tag fields to a usable space table (set the block size field to cellsize) in ascending order of the starting address ).
Storage tightening
8.16 The textbook tried to complete the storage compression algorithm described in section 8.6 of the textbook.