当前位置:网站首页>Memory management - dynamic partition allocation simulation
Memory management - dynamic partition allocation simulation
2022-07-26 08:33:00 【biyezuopin】
memory management - Simulation of dynamic partition allocation
Second course assignment of operating system - Simulation of dynamic partition allocation
Project requirements
Assuming the initial state , The available memory space is 640K, And there is the following request sequence , Please use the first adaptation algorithm and the best adaptation algorithm to allocate and recycle memory blocks respectively , It also shows the free partition chain after each allocation and recycling .
Homework 1 apply 130K |
---|
Homework 2 apply 60K |
Homework 3 apply 100k |
Homework 2 Release 60K |
Homework 4 apply 200K |
Homework 3 Release 100K |
Homework 1 Release 130K |
Homework 5 apply 140K |
Homework 6 apply 60K |
Homework 7 apply 50K |
Homework 6 Release 60K |
Project purpose
- data structure 、 Allocation algorithm
- Deepen the understanding of dynamic partition storage management mode and its implementation process
development environment
development environment : Windows 10
Development software :
- Visual Studio Code1.34.0
- WebStorm2019.1.1.WS-191.6707.60
development language : html, javascript, css, jQuery
Main reference block content :
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
Project structure
│ README.md
│ Simulation of dynamic partition allocation _ Design scheme Report .md
│ Simulation of dynamic partition allocation _ Design scheme Report .pdf
│
├─Resource
│ memory.png
│
└─src
│ Dynamic partition allocation.html
│
└─static
├─css
│ range.css
│ style.css
│
└─js
clear.js
nextAssingment.js
randColor.js
RangeSlider.js
select.js
Operation instructions
- Double click the directory
src
Under theDynamic partition allocation.html
file , And open... In the browser , After opening, the interface is shown in the figure below
- Choose the dynamic partition allocation algorithm you want to simulate *( First adaptation algorithm / Best fit algorithm )*
- Adjust the slider to change the current memory size *( The length of the simulated chain space above will change dynamically with the sliding of the sliding bar )*
- Click on next step Scheduling jobs
- The simulated memory above will show the free partition chain after each allocation and recycling *( Different colors for different jobs , To distinguish the location distribution of different jobs in memory )*
- The log information below will show the job apply / Release Etc
- Click on Clear Memory It will clear all contents of jobs and log information in memory , At this time, you can adjust the memory space again , And the dynamic partition allocation mode is simulated again
Systems analysis
First adaptation algorithm
Algorithm logic : Record the space used in the current memory , At the same time, record the available space in the current memory ( And list them in order of physical location )
If the current job needs to apply for memory space => The size of the first free block is larger than the required space => Mark the occupied memory empty as used => Adjust the size and position of the free block accordingly
Best fit algorithm
Algorithm logic : Also record the space used in the current memory , At the same time, record the available space in the current memory ( And list them by physical capacity )
If the current job needs to apply for memory space => Find the physical block with the smallest current capacity and meeting the current application requirements => Mark the occupied memory empty as used => Adjust the size and position of the free block accordingly
The system design
Interface design
- Integral design
Function realization screenshot display
First adaptation algorithm
Best fit algorithm
Out of memory
Choose a dynamic partition allocation algorithm
Adjust the slider to dynamically change the memory size
Click next to schedule the job
Log information
边栏推荐
- Dear teachers, how can sqlserver get DDL in flinkcdc?
- 23.9 application exit application exit
- Why reserve a capacitor station on the clock output?
- 基于C语言设计的换乘指南打印系统
- flink oracle cdc 读取数据一直为null,有大佬知道么
- sed作业
- 2022-7-8 personal qualifying 5 competition experience (supplementary)
- 2022-7-9 personal qualifying 6 competition experience
- CV learning notes (optical flow)
- The second lesson is the construction of development environment
猜你喜欢
22-07-14 personal training match 2 competition experience
[endnote] detailed explanation of document template layout syntax
Kotlin program control
NLP (natural language processing) natural language processing learning
Mysql8 one master one slave +mycat2 read write separation
Sub Chocolate & paint area
B title: razlika priority queue approach
Code cloud change remote warehouse command
为什么要在时钟输出上预留电容的工位?
How to safely delete a useless activity in Android studio
随机推荐
Uninstallation of dual systems
Share high voltage ultra low noise LDO test results
为什么要在时钟输出上预留电容的工位?
The data read by Flink Oracle CDC is always null. Do you know
Fluent custom popupmenubutton
Mycat2 sub database and sub table
Seq2seq and attention model learning notes
The first ide overlord in the universe, replaced...
Flutter custom player progress bar
Basic music theory rhythm connection problem, very important
Use of room database in kotlin
小蜜蜂吉他谱 高八度和低八度
Prefix infix suffix expression (written conversion)
Shell programming
Flutter WebView three fingers rush or freeze the screen
关于期刊论文所涉及的一些概念汇编+期刊查询方法
Guitar staff link Jasmine
Mycat2 deploy master-slave MariaDB
QT uses QSS to make a beautiful login interface (hand-in-hand teaching)
Date and time function of MySQL function summary