日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

系统盘压缩卷小于可用空间_操作系统中的可用空间管理

發布時間:2025/3/11 windows 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 系统盘压缩卷小于可用空间_操作系统中的可用空间管理 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

系統盤壓縮卷小于可用空間

可用空間管理 (Free space management)

As we know that the memory space in the disk is limited. So we need to use the space of the deleted files for the allocation of the new file. one optical disk allows only one write at a time in the given sector and thus it is not physically possible to reuse it for other files. The system maintains a free space list by keep track of the free disk space. The free space list contains all the records of the free space disk block. Thee free blocks are those which are not allocated to other file or directory. When we create a file we first search for the free space in the memory and then check in the free space list for the required amount of space that we require for our file. if the free space is available then allocate this space to the new file. After that, the allocating space is deleted from the free space list. Whenever we delete a file then its free memory space is added to the free space list.

眾所周知,磁盤中的存儲空間是有限的。 因此,我們需要使用已刪除文件的空間來分配新文件。 一個光盤一次只能在給定扇區中進行一次寫操作,因此在物理上不可能將其重用于其他文件。 系統通過跟蹤可用磁盤空間來維護可用空間列表。 可用空間列表包含可用磁盤塊的所有記錄。 空閑塊是未分配給其他文件或目錄的塊。 創建文件時,我們首先在內存中搜索可用空間,然后在可用空間列表中檢查文件所需的空間量。 如果可用空間可用,則將該空間分配給新文件。 之后,分配空間將從可用空間列表中刪除。 每當我們刪除文件時,它的可用內存空間就會添加到可用空間列表中。

The process of looking after and managing the free blocks of the disk is called free space management. There are some methods or techniques to implement a free space list. These are as follows:

照顧和管理磁盤的空閑塊的過程稱為空閑空間管理。 有一些方法或技術可以實現空閑空間列表。 這些如下:

  • Bitmap

    位圖

  • Linked list

    鏈表

  • Grouping

    分組

  • Counting

    數數

1.位圖 (1. Bitmap)

This technique is used to implement the free space management. When the free space is implemented as the bitmap or bit vector then each block of the disk is represented by a bit. When the block is free its bit is set to 1 and when the block is allocated the bit is set to 0. The main advantage of the bitmap is it is relatively simple and efficient in finding the first free block and also the consecutive free block in the disk. Many computers provide the bit manipulation instruction which is used by the users.

此技術用于實現自由空間管理。 當可用空間被實現為位圖或位向量時,則磁盤的每個塊都由一個位表示。 當該塊空閑時,其位設置為1,當分配該塊時,該位設置為0。位圖的主要優點是,在找到第一個空閑塊以及其中的連續空閑塊時,它相對簡單有效。磁盤。 許多計算機提供用戶使用的位操作指令。

The calculation of the block number is done by the formula:

塊號的計算由以下公式完成:

(number of bits per words) X (number of 0-value word) + Offset of first 1 bit

(每個字的位數)X(0值字的數量)+前1位的偏移量

For Example: Apple Macintosh operating system uses the bitmap method to allocate the disk space.

例如: Apple Macintosh操作系統使用位圖方法分配磁盤空間。

Assume the following are free. Rest are allocated:

假設以下內容是免費的。 其余分配:

Advantages:

優點:

  • This technique is relatively simple.

    此技術相對簡單。

  • This technique is very efficient to find the free space on the disk.

    此技術對于查找磁盤上的可用空間非常有效。

Disadvantages:

缺點:

  • This technique requires a special hardware support to find the first 1 in a word it is not 0.

    此技術需要特殊的硬件支持,才能找到單詞中不為0的第一個1。

  • This technique is not useful for the larger disks.

    此技術對較大的磁盤沒有用。

For example: Consider a disk where blocks 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 17, 18, 25,26, and 27 are free and the rest of the blocks are allocated. The free-space bitmap would be: 001111001111110001100000011100000

例如:考慮一個磁盤,其中塊2、3、4、5、8、9、10、11、12、13、17、18、25、26和27是空閑的,其余塊已分配。 可用空間位圖將是:001111001111110001100000011100000

2.鏈表 (2. Linked list)

This is another technique for free space management. In this linked list of all the free block is maintained. In this, there is a head pointer which points the first free block of the list which is kept in a special location on the disk. This block contains the pointer to the next block and the next block contain the pointer of another next and this process is repeated. By using this disk it is not easy to search the free list. This technique is not sufficient to traverse the list because we have to read each disk block that requires I/O time. So traversing in the free list is not a frequent action.

這是用于自由空間管理的另一種技術。 在此所有空閑塊的鏈接列表中,將保留該塊。 在此,有一個頭指針,它指向列表的第一個空閑塊,該塊保留在磁盤上的特殊位置。 該塊包含指向下一個塊的指針,下一個塊包含另一個下一個塊的指針,并重復此過程。 通過使用該磁盤,搜索空閑列表并不容易。 這種技術不足以遍歷列表,因為我們必須讀取每個需要I / O時間的磁盤塊。 因此,在空閑列表中遍歷不是經常的操作。

Advantages:

優點:

  • Whenever a file is to be allocated a free block, the operating system can simply allocate the first block in free space list and move the head pointer to the next free block in the list.

    每當要為文件分配空閑塊時,操作系統都可以簡單地在空閑空間列表中分配第一個塊,并將頭指針移動到列表中的下一個空閑塊。

Disadvantages:

缺點:

  • Searching the free space list will be very time consuming; each block will have to be read from the disk, which is read very slowly as compared to the main memory.

    搜索可用空間列表將非常耗時; 每個塊都必須從磁盤讀取,與主存儲器相比,磁盤讀取速度非常慢。

  • Not Efficient for faster access.

    無法快速訪問。

In our earlier example, we see that keep block 2 is the first free block which points to another block which contains the pointer of the 3 blocks and 3 blocks contain the pointer to the 4 blocks and this contains the pointer to the 5 block then 5 block contains the pointer to the next block and this process is repeated at the last .

在我們前面的示例中,我們看到keep塊2是第一個空閑塊,它指向另一個包含3個塊的指針的塊,而3個塊包含指向4個塊的指針,并且包含指向5個塊的指針,然后是5塊包含指向下一個塊的指針,最后重復這個過程。

3.分組 (3. Grouping)

This is also the technique of free space management. In this, there is a modification of the free-list approach which stores the address of the n free blocks. In this the first n-1 blocks are free but the last block contains the address of the n blocks. When we use the standard linked list approach the addresses of a large number of blocks can be found very quickly. In this approach, we cannot keep a list of n free disk addresses but we keep the address of the first free block.

這也是自由空間管理的技術。 在此,對空閑列表方法進行了修改,該方法存儲了n個空閑塊的地址。 這樣,前n-1個塊是空閑的,但最后一個塊包含n個塊的地址。 當我們使用標準鏈表方法時,可以很快找到大量塊的地址。 在這種方法中,我們無法保留n個可用磁盤地址的列表,但保留了第一個可用塊的地址。

4.計數 (4. Counting)

Counting is another approach for free space management. Generally, some contiguous blocks are allocated but some are free simultaneously. When the free space is allocated to a process according to the contiguous allocation algorithm or clustering. So we cannot keep the list of n free block address but we can keep the address of the first free block and then the numbers of n free contiguous block which follows the first block. When there is an entry in the free space list it consists the address of the disk and a count variable. This method of free space management is similar to the method of allocating blocks. We can store these entries in the B-tree in place of the linked list. So the operations like lookup, deletion, insertion are efficient.

計數是可用空間管理的另一種方法。 通常,分配一些連續的塊,但同時釋放一些。 當根據連續分配算法或集群將可用空間分配給進程時。 因此,我們不能保留n個空閑塊地址的列表,但可以保留第一個空閑塊的地址,然后保留第一個塊之后的n個連續塊的數目。 當可用空間列表中有一個條目時,它由磁盤地址和一個計數變量組成。 這種可用空間管理方法類似于分配塊的方法。 我們可以將這些條目存儲在B樹中,代替鏈接列表。 因此,查找,刪除,插入等操作非常有效。

翻譯自: https://www.includehelp.com/operating-systems/free-space-management.aspx

系統盤壓縮卷小于可用空間

總結

以上是生活随笔為你收集整理的系统盘压缩卷小于可用空间_操作系统中的可用空间管理的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。