Computer operating system - Dynamic memory allocation
The free partitions are linked in an incremental order of address, and allocation: search in sequence from the beginning of the chain. After finding it, a piece of memory space is divided from the partition according to the job size to allocate it to the requester. The remaining free partitions are still left in the free chain.
It is an improvement of FF. Start the search from the next one of the last free partition found.
The free partitions are linked in incremental order by their size. Find the first free area that meets the requirements by the chain. Leave fragments at the beginning and large pieces at the end, and search for large pieces slowly.
Free partitions are linked in decreasing order by their size. Find the first free area that meets the requirements by the chain. Leave fragments at the beginning and large pieces at the end, and search for large pieces slowly.
Numbers, with correctness test, it is recommended that the visual effect be better at around 20
Numbers, with correctness test, range from 1-4
[The selected information and input information will be displayed at the top of the window here]
Numbers, with correctness test, range 1-3
1-申请内存
2-释放内存
3-退出程序
1-输入程序进程号(进程号不能存在)以及申请的空间
2-输入需要释放的程序进程号(程序号需要存在)
3-直接退出程序
After the background checks the user input and executes it, the execution result is returned, and the current memory allocation status is displayed to the user, and the user waits for the next input. If an execution error occurs, the output error reason will be returned.