How to assign free areas? | Operating system principle

简介: How to assign free areas? | Operating system principle

Under variable partition storage management, the main storage free areas arranged incrementally by address are: 10KB, 4KB, 20KB, 18KB, 7KB, 9KB, 12KB, and 15KB. For the following continuous storage requests: 12KB, 10KB, 15KB, 18KB, ask: using the first fit algorithm, the best adaptation algorithm, Which idle area will be used ?


Answer

(1) First fit algorithm:

    Free zone queue is: 10KB , 4KB , 20KB , 18KB , 7KB , 9KB , 12KB , 15KB

    First allocate:
      Allocate 12KB jobs: find free zone of first conform is 20KB, segmentation this free zone, this job use 12KB, Remaining free zone 8KB.
      Free zone end queue of assignment is:
10KB | 4KB | 8KB | 18KB | 7KB | 9KB | 12KB |15KB
| -- | -- | -- | -- | -- | -- | -- | -- | -- |

    Second allocate:
      Allocate 10KB jobs: find free zone of first conform is 10KB, is completely assigned.
      Free zone end queue of assignment is:
4KB | 8KB | 18KB | 7KB | 9KB | 12KB | 15KB
| -- | -- | -- | -- | -- | -- | -- |

    The third allocate:
      Allocate 15KB jobs: find free zone of first conform is 18KB, segmentation this free zone, this job use 15KB, Remaining free zone 3KB.
      Free zone end queue of assignment is:

    The fourth allocate:
      Allocate 18KB jobs: can't find free zone of Greater than 18KB, so this job allocate failed.


(2) Best fit algorithm:

    Free zone queue is:

    First allocate:
      Allocate 12KB jobs: find free zone of first conform is 12KB, is completely assigned.
      Free zone end queue of assignment is:

    Second allocate:
      Allocate 10KB jobs: find free zone of first conform is 10KB, is completely assigned.
      Free zone end queue of assignment is:
4KB | 7KB | 9KB | 15KB | 18KB | 20KB
| -- | -- | -- | -- | -- | -- | -- | -- |

    The third allocate:
      Allocate 15KB jobs: find free zone of first conform is 15KB, is completely assigned.
      Free zone end queue of assignment is:

    The fourth allocate:
      Allocate 18KB jobs: find free zone of first conform is 18KB, is completely assigned.
      Free zone end queue of assignment is:
4KB | 7KB | 9KB | 20KB
| -- | -- | -- | --

---

(3) Worse fit algorithm:

    Free zone queue is:

    First allocate:
      Allocate 12KB jobs: find free zone of first conform is 20KB, segmentation this free zone, this job use 12KB, Remaining free zone 8KB.
      Free zone end queue of assignment is:

    Second allocate:
      Allocate 10KB jobs: find free zone of first conform is 18KB, is completely assigned.
      Free zone end queue of assignment is:

    The third allocate:
      Allocate 15KB jobs: find free zone of first conform is 15KB, segmentation this free zone, this job use 15KB, Remaining free zone 3KB.
      Free zone end queue of assignment is:

    The fourth allocate:
      Allocate 18KB jobs: can't find free zone of Greater than 18KB, so this job allocate failed.

如有侵权,请联系作者删除
目录
相关文章
|
C# C++ Windows
PDMS call Operating System Command
PDMS call Operating System Command eryar@163.com 1.Introduction AVEVA提供了三种二次开发的方式:DARs, PML和AVEVA .Net(C#)。
2082 0
|
10月前
|
机器人 BI 人工智能
The Blocks Problem(问题的抽象)
The Blocks Problem(问题的抽象)
57 0
The Blocks Problem(问题的抽象)
relocation R_X86_64_PC32 against symbol can not be used when making a shared object recompile with
relocation R_X86_64_PC32 against symbol can not be used when making a shared object recompile with
455 0
can not be used when making a shared object; recompile with -fPIC
can not be used when making a shared object; recompile with -fPIC
235 0
SAP QM中阶之Reference Operation Set 的使用
SAP QM中阶之Reference Operation Set 的使用
SAP QM中阶之Reference Operation Set 的使用
|
Oracle 关系型数据库 Unix
SAP RETAIL WA01创建分配表报错- No allocation rule allowed for allocation strategies or variants-
SAP RETAIL WA01创建分配表报错- No allocation rule allowed for allocation strategies or variants-
SAP RETAIL WA01创建分配表报错- No allocation rule allowed for allocation strategies or variants-
Why expand does not work for complex note
Why expand does not work for complex note? Created by Wang, Jerry, last modified on Jan 12, 2015
107 0
Why expand does not work for complex note
|
Web App开发
How to trouble shoot if there is no entityset available when creating a tile
How to trouble shoot if there is no entityset available when creating a tile
How to trouble shoot if there is no entityset available when creating a tile
how to know which settype an assignment block is built based on
how to know which settype an assignment block is built based on
102 0
how to know which settype an assignment block is built based on