WO2010143364A1 - Partition management device, partition management method, and program - Google Patents

Partition management device, partition management method, and program Download PDF

Info

Publication number
WO2010143364A1
WO2010143364A1 PCT/JP2010/003456 JP2010003456W WO2010143364A1 WO 2010143364 A1 WO2010143364 A1 WO 2010143364A1 JP 2010003456 W JP2010003456 W JP 2010003456W WO 2010143364 A1 WO2010143364 A1 WO 2010143364A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
allocation
division
partition
level
Prior art date
Application number
PCT/JP2010/003456
Other languages
French (fr)
Japanese (ja)
Inventor
吉岡誠
國分光裕
新庄敏男
Original Assignee
株式会社エスグランツ
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社エスグランツ filed Critical 株式会社エスグランツ
Publication of WO2010143364A1 publication Critical patent/WO2010143364A1/en
Priority to US13/323,407 priority Critical patent/US9619151B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Definitions

  • the present invention relates to a partition management device, a partition management method, and a program for managing partitions of a storage device.
  • a file system such as FAT (File Allocation Tables) or NTFS (NT File System) has been adopted.
  • FIG. 1A is a diagram for explaining partition assignment in an external storage device such as a hard disk conventionally employed.
  • the storage area of the external storage device 306 is assigned four partitions 1 to 4 (191, 192, 193, 194) by a utility program such as a disk allocator (not shown), and each of them is assigned to a certain file system. Assigned.
  • a master boot record 195 having a partition management table 195a storing partition management data is arranged at the head of the partition.
  • the partition management table 195a includes entries for a partition number 196a, a start position 196b, and a partition size 196c.
  • the partition number 196a stores a partition number for identifying the partition, and is 3 in the illustrated example. Information on the top address of the section is stored at the start position, and the contents thereof are omitted in the illustrated example.
  • the partition size 196c stores the number of allocation unit areas of the partition, which is 52 in the illustrated example.
  • Disk allocation management for files in each partition is complicated because it depends on the allocation method specific to the file system to which each partition is allocated. For example, according to FAT, a link list indicating a block to which allocation is performed is held for each file. Further, according to NTFS, information about the start position of the block assigned for each file and the number of continuous blocks is held. In order to solve the problem of allocation management in these file systems, for example, a technique related to a buddy system disclosed in Patent Document 1 below has been proposed. According to the buddy system, the allocation is managed by dividing the area into 2 k sizes. A basic buddy system is used for allocating memory areas in a memory management system that does not use the virtual storage method.
  • the allocation area 490 is, for example, the sections 1 to 4 illustrated in FIG. 1A.
  • the tree structure 580 is a hierarchical model of the relationship between the areas obtained by sequentially dividing the allocation area 490 into half the size of the allocation unit. In the example shown in the figure, the level of the root node is 4 when the hierarchy of the area of the allocation unit size is level 1.
  • the root node 480 of the tree structure 580 corresponds to the entire area (level 4 area) of the allocation area 490 before division, as indicated by the dotted arrow, and “8” described in the node corresponds to This corresponds to the size of the allocation area 490.
  • the numbers in parentheses are intra-level numbers that identify areas within the same level.
  • a node 440 connected to the root node 480 via a link 540 and a node 441 connected to the root node 480 via a link 541 correspond to an area (level 3 area) obtained by dividing the allocation area 490 into two. The size of each area is 4 as shown in the figure. Below the node 440 are a size 2 node 420 connected by a link 520 and a size 2 node 421 connected by a link 521. Similarly, a size 2 node 422 connected by a link 522 and a size 2 node 423 connected by a link 523 exist below the node 441. These four nodes correspond to the level 2 region.
  • a size 1 node 412 connected by a link 512 and a size 1 node 413 connected by a link 513 exist below the node 421, and a node 413 connected by a link 514 below the node 422.
  • the size 1 node 414 connected by the link 515 and the size 1 node 415 connected by the link 515 exist, and the size 1 node 416 connected by the link 516 and the size connected by the link 517 are below the node 423.
  • These eight nodes correspond to the level 1 region. Nodes other than the root node 480 correspond to one of the areas obtained by dividing the area corresponding to the parent node into two. Therefore, the sum of the sizes of the areas at each level matches the size of the allocation area 490.
  • 1B has a bit value corresponding to each node of the tree structure 580, as indicated by a dotted arrow.
  • the bit value of the bit position indicated by the in-level number 409 of level 4 indicated by reference numeral 408 in the bitmap 400 indicates whether the level 4 area is in use, and is within the level 3 level indicated by reference numeral 404.
  • the bit values of numbers 0 and 1 indicate whether the corresponding area is in use.
  • level 2 in-level numbers 0 to 3 indicated by reference numeral 402 indicate whether or not each level 2 area is in use
  • level 1 in-level numbers 0 to 7 indicated by reference numeral 401 indicate level 1 areas. Indicates whether it is in use.
  • bit “1” is set in the intra-level number 0 of level 4, the intra-level number 0 of level 3, the intra-level number 0 of level 2, and the intra-level number 0 of level 1.
  • the area of size 1 corresponding to the node 410 is in use as indicated by the level number 0 in level 1, the larger area including that area cannot be used as it is. Is shown.
  • the area is allocated in units of powers of 2, for example, when a 2.1 GB file is allocated, a 4 GB area is required, and data is written to the block after the file allocation.
  • a file cannot be added to the area in the conventional file system, and the area cannot be used effectively.
  • a partition that is a physical or logical area allocated to a requester requesting a storage area must be managed as a 64 GB partition at the maximum. I didn't get it.
  • the buddy system since the area is allocated in units of powers of 2, it is easy to allocate and release files and memory areas and manage the areas, but from areas of power-of-two sizes to areas that are not power-of-two sizes Since there is no management of the remaining area when acquiring the area, and management of the remaining area when acquiring the area of the power of 2 from the area that is not the power of 2 size, there is a problem that the area cannot be effectively used. is there.
  • the present invention manages the remaining areas even when an area that is not a power of 2 size is acquired from an area of a power of 2 size or an area that is a power of 2 size is acquired from an area that is not a power of 2 size.
  • An object of the present invention is to provide a technique capable of effectively using an area by an efficient method when the area management means allocates a file and a memory area to the area.
  • the size of a partition when the size of a partition is acquired and the size of the partition is represented by the product of the sum of powers of two different from each other and the size of the allocation unit of the partition, each power of two constituting the sum
  • the area of the size is divided into sections by sequentially assigning the area as the main area to the sections in the order of the size, and the main area is divided into one-by-two main areas corresponding to the area and the main area of each size size. Then, generate a multi-layer partition allocation table that stores allocation information indicating the file allocation status of each size area and main area, and allocate the area to the file based on the allocation information stored in the multi-layer partition allocation table Manage.
  • the multi-layer division table shows the allocation information of the area in the order of the division level of the area.
  • the same division level store in the order of arrangement within the division of the area, assign a division number that is an identification number for identifying the area to which the allocation information corresponds according to the storage order of the allocation information, and use the division number to Manage the allocation of
  • the empty area of the partition level that is one greater than the largest of the partition levels is used.
  • the primary allocation area that is larger than the allocation request size is searched for, and the primary allocation area is divided into the secondary allocation area, which is an area in which areas of different division levels are continuously assigned in the order of the division level, and the remaining areas.
  • the secondary allocation area is divided into adjacent multi-layer areas, which are areas in which areas with different division levels are continuously assigned in the reverse order of the division level in which areas with different division levels of the secondary allocation area are assigned. Use is set for the allocation status of the multi-layer division allocation table corresponding to each of the areas, and the empty candidate status is set for the allocation status of the multi-layer division allocation table corresponding to the area constituting the adjacent multi-layer area That.
  • a partition is managed by a combination of power-of-two sizes, it is possible to efficiently manage a partition of any size efficiently and without waste. As a result, the files are allocated to the consecutive areas without waste, so that the areas can be effectively used.
  • FIG. 2A is a diagram illustrating an outline of partition management according to an embodiment of the present invention.
  • the outline of the partition management in one embodiment of the present invention will be described with reference to FIG. 2A, and some terms related to the partition management of the present invention will be defined.
  • the “section” is an area allocated in advance as described with reference to FIG. 1A and is an area allocated first. In the present invention, it is assumed that the section has been acquired.
  • a partition is a physical or logical area allocated to a request source requesting a storage area, and a subject that executes the request source and allocation is a file system or a disk allocator. There is no such restriction.
  • the partition in the present invention is not limited to the storage area of the external storage device, and can be, for example, a pre-allocated area of various storage devices included in the data storage device 308 described later with reference to FIG. 2C.
  • the memory area defined in the present invention is defined again.
  • the memory area is an area in a partition that is requested by a request source that requests allocation of a partition area and is allocated to the request source by the partition management device. If the request source is a file system, the memory area allocated to the file system is used as a file storage area by the file system.
  • a file system will be described as an example of a request source, so expressions such as file allocation and file and memory area allocation are used.
  • An “area” is an allocated or allocated area. Since a partition is a pre-allocated region, it is one of the zones and is a specific one of the zones. Dividing the area into a plurality of areas having the size of the product of the power of 2 and the assigned unit area is called “multi-layer division”. A multi-layered area is referred to as a “multi-layer area”. In the following description, reference to the allocation unit area is omitted, and the notation of the area size may be simply a notation such as a size of 2n. For the sake of simplicity, for example, the value 3 stored in the storage area or the set value stored in the partition number 196a illustrated in FIG. 1A is called the partition number 196a. Sometimes called.
  • vision means that an area is assigned or an area is divided and assigned, and is sometimes called “assignment”.
  • a region is an area or section.
  • main area the area assigned by the main division.
  • the main division is an initial allocation for a partition.
  • the number of powers of 2 that is the area or the allocation size of the main area by the section or the main section is referred to as “section level”.
  • Each division level of the main areas 698, 692, 691 shown in FIG. 2A is 3,1,0.
  • the partition management method which is the principle of the present invention, divides a partition continuously into sections in which the allocation unit areas of the sections are assigned to different powers of two, and the sections are continuously Manage as assigned.
  • FIG. 2A further describes a tree structure group 790 corresponding to the multilayer section of the partition 690, and a bitmap 600 indicating the allocation state of the area in which the allocation state corresponding to the node of the tree structure group 790 is reduced to a bitmap. Has been.
  • the tree structure group 790 includes a tree having a node 680 corresponding to the main section to which the main area 698 is allocated as a root node, a tree having a node 624 corresponding to the main section to which the main area 692 is allocated as a root node, and a main area 691. It is composed of a tree having a node 6110 corresponding to the main section to be assigned as a root node. That is, the root node 680 corresponds to a main section (hereinafter, also referred to as a main section 788) that assigns the entire main section 698 of the section level 3 as indicated by a dotted arrow 788, and the root node 624 is a dotted line.
  • a main section hereinafter, also referred to as a main section 788
  • the root node 6110 corresponds to a main section (hereinafter, also referred to as a main section 782) that allocates the entire main area 692 of the section level 1,
  • the structure of each tree is similar to that of the tree structure 580 described in FIG. 1B in that it is a binary tree.
  • the numbers in parentheses are division numbers for identifying individual divisions (sometimes referred to as division units) for dividing the division 690 into multiple divisions for each division level.
  • the section number of the main section 788 corresponding to the largest size main section 698 is 0.
  • the division number may be referred to as a division number of an area divided by the division identified by the division number. That is, instead of the expression of the section number of the main section 788, it may be referred to as the section number of the main section 698.
  • an area divided by a division unit having a certain division number may be referred to as an area having the division number.
  • the node 640 connected to the root node 680 via the link 740 and the node 641 connected to the root node 680 via the link 741 correspond to the division in which the main area 698 is divided into two and the area of division level 2 and size 4 is allocated. To do.
  • Each partition number is 1 and 2 following 0 which is the end of the partition number corresponding to the node of partition level 3 that is one level higher.
  • a size 2 node 622 connected by a link 722 and a size 2 node 623 connected by a link 723 exist below the node 641.
  • These four nodes correspond to the divisions of the division level 1 area.
  • the division numbers corresponding to these four nodes are 3 to 6 following 2 which is the last number of the division number corresponding to the node of the division level 2 which is the next higher division level.
  • a size 1 node 610 connected by a link 710 and a size 1 node 611 connected by a link 711 exist below the node 621.
  • a size 1 node 612 connected by a link 712 and a size 1 node 613 connected by a link 713 exist below the node 621, and a node 622 connects by a link 714.
  • the partition numbers corresponding to these eight nodes are the main partition 782 following the number at the end of the partition number corresponding to the node of the partition level 1 that is the partition level one higher in the tree having the root node as the node 680. 8 to 15 further following the number at the end of the partition number corresponding to the node of the tree corresponding to the root node of the partition level corresponding to 3.
  • the node 618 connected to the root node 624 via the link 718 and the node 619 connected to the root node 624 via the link 719 divide the main area 692 into two parts and assign an area of division level 0 and size 1.
  • the partition number of the root node 624 is 7 following the end 6 of the partition number corresponding to the node at the partition level 1 of the tree corresponding to the main partition 788.
  • the partition number of node 618 is 16 following the end 15 of the partition number corresponding to the node at partition level 0 of the tree corresponding to main partition 788, and the partition number of node 618 is 17 following it.
  • the tree corresponding to the main section 781 to which the main area 691 of size 1 is assigned is configured only by the node 6110 that is the root node, as indicated by the dotted arrow 781.
  • the partition number of the node 6110 is 18 following the end 17 of the partition number corresponding to the node at the partition level 0 of the tree corresponding to the main partition 782.
  • the division level that is the size of the area divided by the division unit identified by the division number can be obtained. Based on the difference between the first division number at the division level and the division number, the position on the division of the area to be allocated by the division unit can be obtained.
  • the bitmap 600 shown in FIG. 2A has a bit value obtained by reducing the allocation state corresponding to each node of the tree structure group 780 to a bitmap, as indicated by a dotted arrow.
  • a 2-bit value corresponds to each node.
  • the bit value of the bitmap 600 will be described in detail later.
  • the illustration of FIG. 2A will be briefly described below.
  • the bit value of the bitmap 600 represents the allocation state at the end of the initial allocation of the area corresponding to the node having each division number.
  • the bit position 00 of the division level 3 indicated by the reference numeral 608 and having the division level 3 division number 609 value of 0 indicates that the area of the division number 0 division is empty. It is.
  • the bit position 10 of the division level 2 indicated by reference numeral 604 and having the division numbers 1 and 2 indicates that the allocation state of the corresponding area is pending.
  • the bit value having the division number 3 to 6 of the division level 1 indicated by the reference numeral 602 as the bit position is the reserved state of the corresponding area, and the bit value having the division number 7 as the bit position is applicable. Indicates that the allocation status of the area is empty.
  • bit values having the bit numbers of the division numbers 8 to 17 of the division level 0 indicated by the reference numeral 601 indicate that the allocation state of the corresponding area is pending, and the bit values having the bit number of the division number 18 are the corresponding area. Indicates that the allocation state of is empty.
  • the distinction between empty and pending in the allocation state is related to the priority when allocating an empty area of the allocation request size. That is, even if the area is substantially empty, the assigned state is used from the empty state. Details of this will be described later.
  • FIG. 2B is a diagram illustrating an example of software and hardware environment of the allocation system according to the embodiment of the present invention.
  • the allocation system 100 includes an initialization unit 101 and a multi-layer division management unit 102. Initialization and multi-layer division management will be described in detail later.
  • the initialization unit 101 receives an initialization request including a partition size from an initialization program 201 such as a disk allocator or an initialization unit of a file system, and configures a data storage device 308, for example, a main storage device 305, an external It initializes the multi-layer division management information of the partitions allocated to the storage device 306, the remote storage device 307 accessed via the communication device (hereinafter also simply referred to as storage device).
  • an initialization request including a partition size from an initialization program 201 such as a disk allocator or an initialization unit of a file system
  • a data storage device 308 for example, a main storage device 305, an external It initializes the multi-layer division management information of the partitions allocated to the storage device 306, the remote storage device 307 accessed via the communication device (hereinafter also simply referred to as storage device).
  • the multi-layer division management unit 102 executes division division, that is, division division allocation by writing the multi-layer division management information in response to the area allocation request including the allocation request size from the file system 202, and the written multi-layer The division management information is read and an allocation result including the allocation category number is returned to the file system 202.
  • the file system 202 receives a file operation request from the system 200 that uses a file such as an application program / OS, and if the file operation request requires allocation of an area to the file, the file system 202 has a multilayer structure.
  • An allocation request including the allocation request size is made to the category management unit 102, the allocation result is received, the category number returned from the multi-layer category management unit of the allocation system 100 is designated as the allocation category number, and the file is sent to the file operation system 203 Make an operation request.
  • the file operation system 203 acquires the address of the area allocated from the multilayer partition management unit 102 by the specified partition number, and executes data writing or data reading as a file operation on the file stored in the storage device.
  • the operation result is returned to the file system 202.
  • the file system 202 returns the operation result returned from the file operation system 203 as a file operation response to the system 200 using a file such as an application program / OS.
  • the allocation system 100 according to the present invention can be used by adjusting the interface with the allocation system 100 according to the present invention.
  • the initialization program 201 can be applied as well. Therefore, descriptions of these programs and systems are omitted.
  • FIG. 2C is a diagram illustrating an exemplary hardware configuration according to an embodiment of the present invention.
  • partition management of a storage device and allocation and release processing of an area to a file are performed by a data processing device 301 including at least a central processing unit 302 and a cache memory 303 using a data storage device 308.
  • the data storage device 308 includes a multi-layered division management table 309 for managing a multi-layered division level, which will be described later, a multi-layered division table 310 for holding an allocation state for each division, and a partition 311 to be managed.
  • the data storage device 308 can be realized by the main storage device 305 or the external storage device 306, or a combination thereof, or a device disposed at a remote location connected via the communication device 307. It is also possible to use.
  • the main storage device 305 can be the one in the data processing device 301, the multi-layer partitioning table 310 and the multi-layer partition management table 309 are held in the main storage device 305, and the partition 311 is assigned to the external storage device 306.
  • the present invention is applicable even when a partition is assigned to the main storage device 305.
  • the main storage device 305, the external storage device 306, and the communication device 307 are connected to the data processing device 301 by one bus 304, but the connection method is not limited to this.
  • the name of the temporary storage area may be the name of the data stored or set in the temporary storage area.
  • the name of the temporary storage area May be the name of the data to be stored or set.
  • initialization of multi-layer division management information in an embodiment of the present invention will be described. Note that initialization of the multi-layer division management information may be referred to as division initialization.
  • FIG. 3 is an explanatory diagram illustrating an example of an initialization state of a partition corresponding to the partition size.
  • partition initialization is performed by allocating a partition to the file system and then receiving an initialization request including the partition size of the partition from the initialization program. This is done by the system initialization unit.
  • the partition configuration main partition table 130 is created according to the partition size received from the initialization program.
  • the partition configuration main partition table 130 is composed of 1-bit entries corresponding to the partition levels as indicated by the subscripts 0 to 7.
  • the partition level 0 is changed from the partition level 0 to the highest partition level 7. It has 8 corresponding entries.
  • the bit value of the corresponding partition level entry is set according to the bit value when the partition size is displayed in binary format.
  • the entry whose bit value is “1” in the partition configuration main partition table 130 Main sections 185, 184, and 182 of the partition level size corresponding to are initially allocated.
  • the division level corresponding to the main area may be called the main division level. That is, it can be said that the partition configuration main partition table 130 displays the main partition level with the bit value 1.
  • the multi-layer division management table 309 includes a main division number management table 309a, a head number management table 309b, and a total division number management table 309c.
  • the main partition number management table 309a and the head number management table 309b are configured by entries corresponding to the partition levels as in the partition configuration main partition table 130.
  • An entry in the main division number management table 309a is composed of the main division number 114, and an entry in the top number management table 309b is composed of the top number 116. The value of each entry is set in the initialization process based on the value of the partition configuration main division table 130.
  • the total number of partitions management table 309c is set with a total number of partitions 115 that is the total number of partition units that are partitioned in accordance with the size of the partition to be initialized. In other words, the total number of sections 115 divided into the size of each section level is set for each section level in the total section number 115.
  • 19 corresponding to the division numbers 0 to 18 is set.
  • 101 corresponding to the division numbers 0 to 100 is set.
  • the division number corresponding to the main division is stored in the entry of the division level.
  • “ ⁇ 1” is stored as an unexpected division number in the entry at the division level.
  • the value of each entry of the main division number 114 is -1, -1, 0, 3, -1, 22, -1, -1, from the higher division level.
  • the head number 116 is a section number associated with the first entry of the section division table at each section level among the section numbers uniquely associated with each entry of the multi-layer section table 310, and is exemplified in FIG. Further, the value of each entry of the leading number 116 is -1, -1, 0, 1, 4, 10, 23, 49 from the higher division level. The setting of these values will be described in detail later with reference to FIGS. 4A to 4C.
  • the multi-layer division table 310 is for managing the allocation state of the area in the partition 311 and is the same as the allocation bitmap 600 shown in FIG. 2A. However, as shown in FIG. 3, the in-level number 172 is associated with the multi-layer division table 310 in addition to the division number 171.
  • the multilayer division table 310 is generated and initialized based on the value of the multilayer division management table 309 in the initialization process.
  • the multi-layered division table 310 is divided into the division levels from the lowest division level to the highest division level where the bit value of the division configuration main division table 130 is 1. It consists of the corresponding division table 160-165.
  • An entry in each partition allocation table is composed of a 2-bit allocation state 170 of the section of the partition number corresponding to the entry.
  • the bit values “00”, “01”, “10”, “11” in the allocation state correspond to the “empty”, “empty candidate”, “hold”, and “in use” states of the areas of the respective division numbers. To do. Although the meaning of these states will be described in detail later, by using 2 bits for the allocation state 170, “empty candidates” can be identified, and the storage area can be used more efficiently.
  • each entry in the division table 160 to 165 has two main divisions, that is, one corresponding to the main division, and two division levels one level higher, as indicated by arrows 75, 74 and 72 in FIG.
  • There is a division to be divided that is, a division corresponding to an area obtained by dividing an area of an upper division level into two.
  • Each entry in the multi-layer partitioning table 310 includes a partition number that is a serial number from 0 from the top entry in the partitioning table 165 at the highest partition level to the last entry in the partitioning table 160 at the lowest partition level. 171 can be associated. Further, for each division table, an in-level number 172 that is a serial number starting from 0 can be associated from the first entry to the last entry.
  • the start number 116 of the start number management table 309b is the start number of the partition number at the corresponding partition level.
  • a partition size that is, a partition configuration main partition table
  • the configuration of the multi-layer partition table is uniquely determined and is partitioned by the partition unit identified by the partition number.
  • the location and size of the area to be determined is also uniquely determined.
  • "00" indicating empty is displayed in the allocation status 170 of the entry corresponding to the main zone, and the allocation status of the other entries. Is initially set to “10” for displaying the hold.
  • the main area 185, 184, 182 is divided and assigned to the area 311, and an empty area is set among the areas managed in the multi-layered area division table 310.
  • the partition 311 is initially allocated. The initial setting of the multi-layer division table 310 will be described in detail later with reference to FIGS. 4A to 4C.
  • the above-described method of assigning the division number 171 and the in-level number 172 is merely an example, and if the file allocation management described later is possible, for example, the first number is set to 1 instead of 0. It will be apparent to those skilled in the art that various modifications are possible, such as reversing the order of application.
  • the partition 311 assigned to the file system is managed in a multi-layered manner by using the multi-partition partitioning table 310 and the allocation state 170 corresponding to the partition level for the same area. .
  • the division number of an empty area of a certain division level or a continuous empty area of a different division level is obtained by searching the multi-layer partitioning table, This is done by setting the division number in use. If there is no empty area, an empty candidate area is searched.
  • the file system that has requested the file allocation returns the segment number that is in use as the allocation segment number from the allocation system.
  • the file operation system receives a file operation request designating this partition number, the file operation system receives address information of the section of this partition number from the multi-layer partition management unit.
  • the multi-layer division management unit searches the multi-layer division management table 309 by the division number, obtains the division level and the intra-level number of the area corresponding to the division number, and thereby determines the position and size in the division of the area assigned to the file. I can know. These processes will be described in detail later.
  • the processing for initializing the partitions is specifically processing for initializing the values of the multilayer partition management table 309 and the multilayer partition partitioning table 310 shown in FIG. 3, for example.
  • description will be made with reference to the multi-layer division management table 309 and the multi-layer division table 310 as an example.
  • FIG. 4A is a diagram illustrating an example of a processing flow in the previous stage for initializing a partition.
  • step S401 from the partition size received from the program requesting partition initialization, the bit of the partition level entry according to the bit value when the partition size is displayed in binary format. Create a partition main partition table with values set.
  • step S402 the highest partition level of the partition configuration main partition table is set as the main partition level, and in step S403, the total number of sections in the total partition number management table is set to 0 as an initial value.
  • the process proceeds to S404.
  • a partition configuration main partition table 130 is created, and 7 is set as the main partition level.
  • the main partition level in which the highest partition level of the partition configuration main partition table in step S402 is set is an example of the temporary storage area (not shown) described above.
  • step S404 the bit value of the partition configuration main partition table pointed to by the main partition level is extracted.
  • step S405 it is determined whether or not the extracted bit value is significant, that is, a value of 1. If the extracted bit value is not 1, the process branches to step S406, the value “ ⁇ 1” is set in the main partition number management table pointed to by the main partition level, and then in step S407, the head number management pointed to by the main partition level is set. A value “ ⁇ 1” is set in the table, and the main division level is decreased by 1 in step S408, and the process returns to step S404. The loop processing from step S404 to step S408 is repeated for the first time in step S405 until it is determined that the bit value of the partition configuration main division table is significant.
  • this loop process causes the main partition number management table 309a and the head number management table 309b to be The value “ ⁇ 1” is set for both the division level 7 and the division level 6.
  • step S409 the value “0” is set as the head number
  • the value “1” is set as the number of sections in step S410
  • the name of the data is the name of the temporary storage area.
  • FIG. 4B is a diagram illustrating an example of a subsequent processing flow for initializing a partition.
  • step S411 a value obtained by adding 1 to the main number and subtracting 1 is set to the main division number.
  • 1 is set to the number of sections by the process of step S410, and in the subsequent processes, the value is set by the process of step S423 described later.
  • step S412 the main division number is set in the main division number management table pointed to by the main division level
  • step S413 the head number is set in the head number management table pointed to by the main division level.
  • 0 is set to the division level 5 of the main division number management table 309a and the head number management table 309b, respectively.
  • step S414 the allocation state of the multi-level partitioning table at the partition level indicated by the main partition level is initialized. Details of the processing in step S414 will be described later with reference to FIG. 4C.
  • step S415 the number of sections obtained in step S414 is added to the total number of sections in the total section number management table, and the process proceeds to step S416.
  • step S416 it is determined whether the main division level is the lowest division level. If it is the lowest division level, the process ends. If it is not the lowest division level, the process branches to step S417.
  • step S417 the main division level is decreased by one, the number of divisions is added to the top number in step S418, the number of divisions is doubled in step S419, and the flow proceeds to step S420.
  • step S420 the bit value of the partition configuration main partition table at the partition level indicated by the main partition level is extracted.
  • step S421 it is determined whether the extracted bit value is significant, that is, the value 1. If the bit value of the partition configuration main partition table pointed to by the main partition level extracted in step S420 is not significant, the process branches to step S422, sets the value “ ⁇ 1” in the main partition number, and returns to step S412. For example, it branches to step S423, adds 1 to the number of divisions, and returns to step S411. The loop processing from step S411 to step S423 is repeated until it is determined in step S416 that the main division level is the lowest division level.
  • the main partition number of the partition level has the value “ ⁇ ” as described above. 1 ”is set.
  • 1 is set in the division level 4 of the head number management table 309b, and the division level 4 of the main division number management table 309a is set to the head number 1 and the division in the second processing in step S411.
  • 3 is set by subtracting 1 from the sum of Equation 3.
  • the division level 3 of the head number management table 309b is set to 4 which is obtained by adding the number of divisions 3 to the head number 1 of the division level 4, and the division level 4 of the main division number management table 309a is set in the process of step S422.
  • ⁇ 1 is set.
  • 22, -1, and -1 are set in the division levels 2, 1, and 0 of the main division number management table 309a, respectively.
  • 10, 23, and 49 are set in the division levels 2, 1, and 0 of the head number management table 309b, respectively, and 101 is set in the total division number management table 309c.
  • FIG. 4C is a diagram illustrating an example of a processing flow for initializing the multi-layer partitioning table for each partition level in the embodiment of the present invention.
  • this is a process of setting the values of the partitioning tables 160 to 165 to the values shown.
  • the partitioning table from the partitioning table 165 to the partitioning table 160 is initialized, and the initialization of the multi-layer partitioning table 310 is completed. . *
  • step S431 the head number is set to the section number, and in step S432, a value obtained by adding the number of sections to the head number and subtracting 1 is set.
  • the head numbers in step S431 and step S432 are set in step S409 shown in FIG. 4A or step S418 shown in FIG. 4B. Further, the number of sections in step S432 is set in step S410 shown in FIG. 4A or step S419 or step S423 shown in FIG. 4B.
  • step S431 and step S432 is processing for setting the first division number and the last division number of the division table attached to each division level.
  • step S434 it is determined whether the segment number and the end number are equal. If the section number and the end number are not equal, in step S435, the allocation state of the multi-layer partition table attached by the section number is set to hold, and in step S436, the section number is incremented by one and the process returns to step S434. Repeat the determination of whether the end numbers are equal.
  • the loop processing from step S434 to step S436 is performed in the allocation state of the division table attached by the division number from the first division number of the division division attachment table corresponding to the division level being processed to the division number immediately before the end number. This is a process for setting a hold.
  • step S434 determines whether the section number and the end number are equal. If it is determined in step S434 that the section number and the end number are equal, the process proceeds to step S437, where it is determined whether the main section number is the value “ ⁇ 1”.
  • the main division number here is the one set in step S411 or step S422 shown in FIG. 4B.
  • step S437 If it is determined in step S437 that the main division number is the value “ ⁇ 1”, in step S438 the suspension is set in the allocation state of the multi-layer division table attached by the division number, and the process is terminated. In step S437, If it is determined that the main division number is not the value “ ⁇ 1”, the allocation state of the multi-layer division table attached to the division number is set to empty in step S439, and the process is terminated.
  • the processing in step S438 and step S439 is processing for setting the allocation state of the segment number at the end of the segmentation table corresponding to the segment level being processed. As illustrated in FIG.
  • the division number of the division unit corresponding to the main area is the end of the division number corresponding to the division level of the main area, and the allocation state of the division table of the division number at the end is As seen in the allocation states of the division numbers 0, 3, and 22, “00”, that is, empty. All other assignment states of the multi-layered division table are “10”, that is, hold.
  • the reason for introducing “hold” in addition to “empty” in the area allocation state in the section initialization described in detail above is to facilitate securing of large continuous empty areas.
  • the main area 184 that is, the area of the partition number 3 can be selected from the main areas that are empty. .
  • the areas of the division numbers 1 and 2 are also empty, and if the allocation request for an area having a size larger than 16 is generated in the future, the division number 1 is assigned so that a continuous area can be assigned.
  • a means for selecting the area of the division number 3 from 2, 3 is required to use the area effectively. However, that means is more complicated than introducing “hold” in the allocation state.
  • a state of “pending” is introduced and represented by a 2-bit value “10”.
  • the allocation state of a zone is set to “pending”. Is excluded from the allocation target. Therefore, in the above-described step S438, it is possible to set a non-empty state indicating that allocation to the area of the division number is not performed in the allocation state of the multi-layered division allocation table indicated by the division number.
  • area allocation is performed by the multi-layer division management unit of the allocation system by accepting an allocation request including an allocation request size from the file system after partition initialization. .
  • FIG. 5 is a diagram for explaining an example of a schematic processing flow of the entire processing for assigning areas.
  • step S503 referring to the multi-layered division table, an empty area in which the assigned state of the area is “empty” is searched from the areas of the allocation requesting division level, and the division number of the empty area is acquired. Details of the processing in step S503 will be described later with reference to FIG.
  • step S504 it is determined whether or not the division number of the empty area has been acquired. If it can be acquired, the process proceeds to step S507, and if it cannot be acquired, the process proceeds to step S505.
  • step S505 an empty candidate area whose allocation state is “empty candidate” is searched from the areas at the allocation request classification level with reference to the multi-layered division table, and a classification number of the empty candidate area is acquired. Details of the processing in step S505 will be described later with reference to FIG.
  • step S506 it is determined whether or not an empty candidate state area can be acquired. If it can be acquired, the process proceeds to step S507. If it cannot be acquired, the area allocation process ends as an acquisition failure.
  • step S507 it is determined whether the size of the area corresponding to the classification level of the classification number acquired in step S503 is larger than the allocation request size set in step S501.
  • the allocation request size is not equal to a power of 2, that is, when it is displayed in binary format, there are multiple significant bit positions (in this case, the allocation request is called a multi-bit request, while the allocation request is equal to a power of 2; If there is a single bit request), the size of the acquired area is larger than the allocation request size. Therefore, the determination in step S507 is to determine whether the allocation request is a multibit request or a single bit request.
  • step S507 determines whether the determination in step S507 is a single bit request. If the determination in step S507 is a multibit request, the process branches to step S508. In step S508, the primary allocation area corresponding to the acquired classification number is divided into multilayer areas, the secondary allocation area of the allocation request classification is obtained, and the process proceeds to step S509. In addition, although the area
  • step S509 as the allocation result, the allocation area category number that is primarily allocated to the allocation category number is set, and the process ends.
  • the allocation division number set here is returned to the file system as the allocation result, as shown in FIG. 2A.
  • the multi-layer partition management unit of the allocation system uses the allocation section number corresponding to the file to calculate the relative address from the start position of the partition allocated to the file system to the start position of the area allocated to the file requested for allocation. It can be obtained from the multi-layer division management table.
  • FIG. 6 explains the details of the processing in step S503 of FIG. 5, and describes an example of a processing flow for searching for an empty area at the allocation requesting division level from the multi-layered division table and acquiring the division number of the empty area. It is a figure to do.
  • step S601 an empty area including the size of the allocation requesting division level is searched from the multi-layer division allocation table, and an empty area division number is acquired.
  • the multi-layer partition management according to an embodiment of the present invention, even when an empty area at the allocation required partition level cannot be found, if an empty area at a partition level higher than the allocation partition level exists, it can be found.
  • the allocation request division level is 3, as shown in the division division table 163 of the division level 3, there is no space in the division level 3 area.
  • an empty area with a division number 3 exists in the division level 2, and this division number 3 is acquired. In this way, allocating an empty area at a division level larger than the allocation division level may be referred to as provisional allocation. Details of step S601 will be described later with reference to FIGS. 7A to 7D.
  • step S602 it is determined whether or not the division number has been acquired in the process of step S601. If it has not been acquired, an acquisition failure is returned and the process ends. If it has been acquired, the process proceeds to step S603.
  • step S603 it is determined whether the classification level (acquired classification level) related to the classification number acquired in the process of step S601 is equal to the allocation request classification level. This determination corresponds to determination of whether or not provisional allocation has been performed. If the acquired category level and the allocation request category level are equal, acquisition success is returned and the process is terminated. If the acquired category level and the allocation request category level are not equal, that is, if provisional allocation is performed, the process branches to step S604. .
  • step S604 the temporarily allocated area that has been temporarily allocated is divided into multi-layer areas, and the primary allocation area of the division number of the allocation request classification level is obtained. That is, an area having the size of the allocation request classification level is acquired as the primary allocation, the classification number is acquired, acquisition success is returned, and the process is terminated. Details of step S604 will be described later with reference to FIGS. 8A and 8B.
  • FIG. 7A explains the details of the processing in step S601 in FIG. 6, and a processing flow for searching the empty area including the size of the allocation requesting division level from the multi-layer division table and obtaining the division number of the empty region It is a figure explaining an example.
  • step S701 the allocation request category level is set as the category level.
  • the value of the allocation request classification level is set in step S502 of FIG.
  • step S702 the head number indicated by the division level is extracted from the head number management table.
  • step S703a the extracted head number is set as the section number
  • step S703b the last number of the section number in the section level partition table currently being processed is set as the end number. Details of the processing in step S703b will be described later with reference to FIG. 7D.
  • step S704 the allocation state of the multi-layer partitioning table indicated by the value set in the segment number is read.
  • step S705 it is determined whether the read allocation state is empty. If it is determined in step S705 that the allocation state is empty, the process proceeds to step S710.
  • step S705 determines whether the allocation state is not empty. If it is determined in step S705 that the allocation state is not empty, the process branches to step S706. In step S706, it is determined whether the division number is equal to the end number set in step S703b. If the section number is not equal to the end number, the process branches to step S707, and the section number is incremented by 1, and the process returns to step S704. Thereafter, the division number is incremented by 1 within the same division level to search for an empty area.
  • step S706 If it is determined in step S706 that the segment number and the end number are equal, the process proceeds to step S708, and it is determined whether or not the segment level is the highest segment level. If the classification level is the highest classification level, an acquisition failure is returned and the process is terminated. When it is determined in step S708 that the division level is not the highest division level (when the division level is a lower division level than the highest division level), the process proceeds to step S709, and 1 is added to the division level. The process returns to step S702.
  • step S702 the above processing is repeated, and the allocation state of the multi-layer division table for the higher division level is searched one by one. If an empty area is obtained as a result of the search, the process proceeds to step S710.
  • step S710 the allocation state of the multi-layer partitioning table indicated by the value set in the segment number is set to be in use, and the process ends.
  • the value set for the partition number and the partition level, which are temporary storage areas, and data indicating acquisition success or acquisition failure are output as search results.
  • FIG. 7B and 7C are diagrams for explaining the empty area search processing shown in FIG. 7A by a specific example with reference to the multi-layer division management table 310 shown in FIG.
  • the example shown in FIG. 7B is an example in which the allocation request is a multi-bit request and an empty area is searched at the allocation request classification level.
  • the bit value 1 is set in the first bit (partition level 1) and the third bit (partition level 3) of the allocation request size 220. Therefore, the allocation request category level 234 is set with a category level 4 higher than the category level 3 as indicated by the dotted arrow 224.
  • the setting up to this point is performed by the processing in steps S501 and S502 in FIG.
  • the empty search 244 of the partition level 4 partition allocation table before allocation of the multi-layer partition partition table 310 with the reference numeral 164a is performed.
  • the assignment state of the division number 171 of 1 and 2 is “11”
  • the assignment state of the division number 3 is “00” and is empty. Therefore, the empty area is acquired 274a as indicated by the solid line arrow in the figure, and the division number 171 is set to the allocation state of 3 as shown in the division level 4 division division table after the assignment with the reference numeral 164b. 11 "is set and it is displayed that it is in use.
  • the section 311 is assigned with the section level 4 and the section number 3 as the primary allocation section 280.
  • the above-described allocation of the primary allocation area 280 is executed by the loop processing in steps S704 to S707 and the processing in step S710 shown in FIG. 7A.
  • the allocation request is a single bit request and an empty area cannot be searched at the allocation request classification level
  • the allocation request size 220 is not described in FIG. 7C
  • the allocation request 241a indicated by the dotted arrow is of the allocation request category level 1, and therefore the allocation request is a single bit request in which only the first bit is 1. .
  • step S708 in step S706, and the loop processing of step S702 via step S709 is performed at the upper division level. Will repeat until you find.
  • the partitioning table of the upper partition level is sequentially referred to from the lower partition level (partition level 1 in FIG. 7C) shown in FIG. 7C, and empty in the searched partition level.
  • partition level 1 in FIG. 7C partition level 1 in FIG. 7C
  • empty state is searched in order from the top number for each division level area.
  • a search for an empty area of division level 1 that is the allocation requesting division level indicated by the dotted arrow 241a in the figure is requested, and among the multi-layer division table 310, the allocation state of the division level table 161 of the division level 1 is assigned to the division number.
  • the empty state is searched from the division number 23 which is the head number to the division number 48 which is the tail number (see arrow 241b in FIG. 7C).
  • a search for two empty areas is required.
  • an empty state is searched for the allocation state in the partition level attached table 162 at the partition level 2 from the partition number 10 as the top number to the partition number 22 as the end number in the ascending order of the partition numbers (see the arrow 242b in FIG. 7C). . Since there is no empty area even if the search is performed up to the area having the end number of the section number 22, the search for the empty state of the section level 3 which is the upper section is requested by adding one to the section level (FIG. 7C). (See arrow 243a). Similarly, with respect to the division level table 163 at the division level 3, the allocation state from the division number 4 area which is the first number to the division number 9 area which is the last number is sequentially searched (see arrow 243b in FIG.
  • FIG. 7D is a diagram illustrating an example of a processing flow for acquiring the end partition number of each partition level in an embodiment of the present invention.
  • step S721 it is determined whether the currently processed partition level is the lowest partition level. If it is not the lowest partition level, the process proceeds to step S722, and if it is the lowest partition level, step S724 is performed. Proceed to
  • step S722 the head number indicated by the value obtained by subtracting the classification level by one is extracted from the head number management table, and in step S723, the value subtracted by one from the extracted head number is set as the tail number, and the process ends. To do.
  • step S724 the total number of sections is extracted from the total number of sections management table, and in step S725, a value obtained by subtracting one from the extracted total number of sections is set as the end number, and the process is terminated.
  • the primary allocation area or the temporary allocation area is obtained.
  • FIG. 8A explains the details of the process of step S604 in FIG. 6, and the process of dividing the temporary allocation area obtained by the process of step S601 into multiple sections and obtaining the primary allocation area of the section number of the allocation request section level. It is a figure explaining the example of a flow.
  • step S801 the head number indicated by the division level acquired in step S601 of FIG. 6 is extracted from the head number management table. Since the processing flow in FIG. 8A is based on the assumption that provisional allocation has been performed, the acquired classification level is larger than the allocation request classification.
  • step S803 a value obtained by subtracting the head number extracted in step S801 from the acquired division number is set to the in-level number.
  • step S804 a value obtained by subtracting one from the acquired category level is set in the category level, and the process proceeds to step S805.
  • step S805 the head number indicated by the division level is extracted from the head number management table.
  • step S807 a value obtained by doubling the value set in the in-level number is set in the in-level number. This process corresponds to the fact that there are two areas at the lower level of the partition corresponding to a certain area.
  • step S808 a value obtained by adding the in-level number to the head number is set to the division number.
  • step S809 a value obtained by adding 1 to the section number is set to the pair section number.
  • the in-level numbers of the areas in the one sub-division level that is obtained by dividing the area in which the in-level number is “10” at a certain division level are “20” and “21”.
  • step S810 “in use” is set in the allocation state of the multi-layer partitioning table indicated by the section number, and in step S811, empty is set in the allocation state of the multi-layer partitioning table pointed to by the pair of partition numbers.
  • step S812 “in use” is set in the allocation state of the multi-layer partitioning table indicated by the section number, and in step S811, empty is set in the allocation state of the multi-layer partitioning table pointed to by the pair of partition numbers. The process proceeds to S812.
  • step S812 it is determined whether the partition level is higher than the allocation request partition level. If so, the process branches to step S813, and the value set in the partition level is decreased by one, and the process returns to step S805. If the determination result is not large, that is, if the classification level is equal to the allocation request classification level, the process is terminated. As explained above, the acquired classification level is larger than the allocation request classification. Then, since the loop processing from step S805 to step S813 is repeated while decreasing the partition level by one, it is determined in step S812 that the partition level is not larger than the allocation request partition level. Is equal to.
  • step S804 and the loop process of steps S805 to S813 start from the provisionally assigned area, divide the area into two pairs of areas at the next lower division level, and In use in the assigned state, empty is set in the assigned state in the area on the old number side.
  • an area at the allocation request classification level is primarily allocated to the younger number side of the provisional allocation area classification number, and the remaining continuous Since the area is set as empty, the area can be used efficiently. It is obvious to those skilled in the art that the primary assignment is not limited to the younger number side of the division number, but can be the older number side.
  • FIG. 8B is a diagram illustrating a process for obtaining the primary allocation area by dividing the provisional allocation area shown in FIG. 8A into a multilayer by referring to the multilayer division management table 310 shown in FIG. 3 by a specific example.
  • the allocation request is a single-bit request similar to that illustrated in FIG. 7C, and the primary allocation area is acquired from the temporary allocation area 280a shown in FIG. 7C.
  • FIG. 8B shows a temporary allocation area (section number 2) which is an allocation state before the primary allocation by reference numeral 280a.
  • a division level 4 division table attached with a reference numeral 164b according to a multi-layer division request that requires division of each related area from division level 4 to division level 1 of the temporary allocation area, indicated by an arrow 241 from the temporary allocation area 280a.
  • the process starts from The division assignment table 164b stores the same assignment state as shown in FIG. 7C.
  • This setting process is executed in the processes of steps S805 to S811 in FIG. Since 4 is extracted as the head number and 1 is set to the in-level number by the initial processing in steps S801 to S803 in FIG. 8A, 2 is set to the in-level number in step S807. Is done. Then, 6 is obtained by adding the in-level number 2 to the head number 4 as the division number. Further, 7 is obtained as the pair division number.
  • the allocation status of the area of level number 4 (division number 14) in the division level allocation table 162 is being used. “11” is set, and an empty “00” is set in the allocation state of the intra-level number 4 and the intra-level number 5 (section number 15) constituting the segment pair 292a.
  • the allocation state of the division number 7 is set to empty, as shown by the arrow 273b, the area 283b of the empty division number 7 is added to the temporary allocation area after the primary allocation indicated by the reference numeral 280b. Assigned.
  • the allocation state of the area of the level number 8 (section number 31) in the partition level allocation table 161 of the partition level 1 is in use “11 "Is set, and an empty" 00 “is set in the allocation state of the in-level number 9 (section number 32) that forms the section pair 291a with the section in the in-level number 8. Since the allocation state of the division number 15 is set to empty, the area 282b of the empty division number 15 is allocated to the temporary allocation area 280b after the primary allocation, as shown by the arrow 272b.
  • the temporary allocation area 280b after the primary allocation is primarily allocated as the area 281a of the division number 31 is in use.
  • Area 281b with number 32 is allocated as empty.
  • the temporary allocation area 280b after the primary allocation is an adjacent multilayer adjacent to the primary allocation area 281a, which is composed of a primary allocation area 281a in use and empty areas 281b, 282b, 283b as shown in the figure. Divided into areas 290b.
  • FIG. 9 explains the details of the processing in step S505 of FIG. 5, and is an example of a processing flow for searching for empty candidate areas at the allocation requesting division level from the multi-layer division table and acquiring the division number of the empty candidate area.
  • FIG. The empty candidates are set as the allocation state of the areas constituting the remaining adjacent multi-layer areas when the secondary allocation is performed by dividing the primary allocation area in the multi-bit request, which will be described later with reference to FIGS. 11A to 11C Is done.
  • step S904 is obtained by replacing the empty area with the empty candidate area in steps S601 to S604 shown in FIG. 6, description thereof will be omitted.
  • FIG. 10A illustrating the details of the processing in step S901 in FIG. 9 is a processing flow for searching for empty candidate areas that are larger than the allocation request classification level size from the multi-layered division table and acquiring the division number of the empty candidate area.
  • 7A corresponds to the diagram illustrating a processing flow for searching for an empty area having a size equal to or larger than the allocation requesting division level from the multi-layer division allocation table shown in FIG. 7A and acquiring the division number of the empty area.
  • Steps S1001 to S1009 in FIG. 10A are different from those in which it is determined in step 705 in FIG. 7A that the allocation state is empty, but only where the allocation state is determined to be an empty candidate in step S1005. A description of FIG. 10A is also omitted.
  • FIG. 10B for explaining the details of the process of step S904 in FIG. 9 is a process of dividing the temporary allocation area obtained by the process of step S901 into multiple sections and obtaining the primary allocation area of the section number of the allocation request section level.
  • FIG. 8 is a diagram for explaining the flow, and illustrates the processing flow for obtaining the primary allocation area of the allocation request classification level by dividing the provisional allocation area obtained in the process of step S601 of FIG. Corresponds to the figure.
  • Steps S1021 to S1033 in FIG. 10B show that the allocation state of the multi-layer partitioning table indicated by the pair partition number is set to empty in step 811 in FIG. 8A, whereas the pair partition number is set in step S1031. Since only the empty candidate is set in the allocation state of the multi-layered division table to be pointed, the description of FIG. 10B is also omitted.
  • FIG. 11A is a diagram for explaining the processing flow of the previous stage to obtain the secondary allocation area of the allocation request classification by dividing the primary allocation area of the acquired classification number into a multilayer area.
  • step S1101 the leading number pointed to by the classification level (acquisition classification level) of the acquired primary allocation area is extracted from the leading number management table. A value obtained by doubling the result obtained by subtracting the head number is set.
  • step S1104 in order to divide the primary allocation area, an allocation configuration classification table composed of bit values in which the allocation request size is represented in binary is created from the allocation request size.
  • step S1105 a value obtained by subtracting 1 from the acquired division level is set as the division division level.
  • step S1106 as the minimum division division level, the bit position having a bit value of 1 in the allocation configuration division table and the lowest bit position when viewed from the lower 0 bit are set, and in step S1107 of FIG. move on. For example, when the bit value of the allocation configuration division table is “1010”, bit position 1 is set to the minimum division division level.
  • FIG. 11B is a diagram illustrating a subsequent process flow in which the primary allocation area of the acquired classification number is divided into multi-layered areas to obtain the secondary allocation area of the allocation request classification.
  • step S1107 the head number indicated by the division level set in step S1105 is extracted from the head number management table.
  • step S1109 a value obtained by adding the value set in the in-level number to the extracted top number is set in the division number.
  • step S1110 a value obtained by adding 1 to the division number is set in the paired division number. To do.
  • step S1111 a bit value is extracted from the allocation configuration classification table indicated by the division classification level, and in step S1112, it is determined whether the extracted bit value is 1. If it is determined in step S1112 that the extracted bit value is not 1 (0), the process branches to step S1113. If it is determined that the extracted bit value is 1, the process proceeds to step S1115.
  • step S1113 “used” is set in the allocation state of the multi-layer partitioning table indicated by the section number, and in step S1114, an empty candidate is set in the allocation state of the multi-layer partitioning table specified by the pair of partition numbers, and the process proceeds to step S1119. .
  • step S1115 it is determined whether the division division level is the minimum division division level set in step S1106. If the division level is not equal to the minimum division level, the process branches to step S1116. If the division level is equal, the process proceeds to step S1121.
  • step S1116 “used” is set in the allocation state of the multi-layer partitioning table indicated by the section number, and in step S1117, “used” is set in the allocation state of the multi-layer partitioning table indicated by the paired section number.
  • step S1118 the in-level number is incremented by 1, and the process proceeds to step S1119.
  • step S1119 the in-level number is doubled, the process proceeds to step S1120, the division division level is decreased by 1, and the process returns to step S1107.
  • step S1115 When it is determined in step S1115 that the division division level is equal to the minimum division division level and the process proceeds to step S1121, “in use” is set in the allocation state of the multi-layer division attachment table indicated by the division number. In step S1122, the pair division number is set. An empty candidate is set in the allocation state of the multi-layered division table to be pointed, and the process is terminated.
  • FIG. 11C illustrates the process of obtaining the secondary allocation area of the allocation request classification by dividing the primary allocation area shown in FIG. 11A and FIG. 11B with reference to the multilayer allocation table 310 shown in FIG. It is a figure to do.
  • the value set in the allocation request size 220 and the primary allocation area are the primary allocation area 280 of the division number 3, secondary allocation is performed following the primary allocation illustrated in FIG. 7B. It is.
  • the allocation configuration division table 230 is composed of 1-bit entries corresponding to the division level as indicated by 0 to 5 below it. In the example of FIG. 11C, the division level 0 is changed to the highest division level 5. It has 6 corresponding entries. As indicated by the dotted arrows 223 and 221 in the figure, the bit value of the corresponding partition level entry is set according to the bit value when the allocation request size is displayed in binary format. The setting up to this point is performed by the processing of step S501 in FIG. 5 and step S1104 in FIG. 11A.
  • the secondary allocation is executed based on the bit values in the allocation configuration table 230 described above.
  • the multi-layer division from the division division table of the division level 4 which is the acquisition division level denoted by reference numeral 164b. Is started.
  • the division assignment table 164b stores the same assignment state as shown in FIG. 7B.
  • step S1116 and step S1117 in the partition level attached table 163, which is the partition pair 293b corresponding to one set of regions that occupy the same region as the region of the partition number 3 in the partition level 3 region “11” indicating in-use is set in the allocation state of both the in-level number 4 (section number 8) and the in-level number 5 (section number 9).
  • the area of the intra-level number 5 (partition number 9) of the segment level 3 becomes the target of the segment request 273d.
  • the bit value corresponding to the division level 2 of the allocation configuration division table 230 is 0. Therefore, the processing of steps S1113 and S1114 in FIG.
  • the allocation state of the level number 10 (section number 20) in the section level division table 162 which is the section pair 292b corresponding to a set of sections occupying the same area as the section of section number 9, “11” is set, and “01” indicating an empty candidate is set in the allocation state of the in-level number 11 (section number 21).
  • the section of the division level 2 with the level number 10 becomes the target of the section request 272c.
  • the step S 1121 and the step of FIG. By the processing of S1122, the intra-level number 20 in the division level 1 division division table 161, which is the division pair 291b corresponding to a set of areas that occupy the same area as the division number 20 area, which is the division level 1 area. “11” indicating in use is set in the allocation state of (section number 43), and “01” indicating an empty candidate is set in the allocation state of in-level number 21 (section number 44).
  • the primary allocation area 280 is divided into multiple layers as shown in the primary allocation area 280c after the secondary allocation.
  • the section 283c of the section number 8 of the section level 3 is allocated as in use, and subsequently, the section 281c of the section number 43 of the section level 1 is allocated as shown by the arrow 271c. Allocated as in use and secondary allocated area 290c is allocated as a multilayer area.
  • the section 282d of the section number 21 of the section level 2 is assigned as a blank candidate, and subsequently, the section of the section number 44 of the section level 1 as shown by the arrow 271d. 281d is assigned as an empty candidate, and is also assigned as an adjacent multilayer area 290d.
  • the areas are allocated in descending order of the partition level, and in the adjacent multi-layer area 290d, the areas are allocated in the ascending order of the partition level which is reverse to the secondary allocation area.
  • the classification number acquired in the primary allocation is returned to the file system as the allocation classification number.
  • the area of the classification number acquired in the primary allocation (3 in the above example) Since the start position of the second assignment area is the same as the start position of the second assignment area, it is possible to respond to the address inquiry of the assignment area specifying the section number from the file operation system.
  • secondary allocation is performed from the younger number side of the division number, but as described above for primary allocation after provisional allocation, the fact that it can be performed from the old number side of the segment number is, It will be apparent to those skilled in the art.
  • FIG. 12 is a diagram for explaining an example of a schematic process flow of the entire process for releasing the allocated area and attempting to connect the empty areas.
  • step S1201 an allocation area number is set as the division number.
  • This allocated area number is returned to the file system when the area to be released is allocated to the file, and can be included in the allocation area release request from the file system.
  • the allocation request size can be included at that time.
  • step S1202 the multi-layered division management table is searched with the set division number, and the division level corresponding to the division number is obtained. Details of the processing in step S1202 will be described later with reference to FIG. Next, proceeding to step S1203, it is determined whether or not the classification level has been obtained in the process of step S1202, and if not, the process is terminated. If so, the process proceeds to step S1204.
  • step S1204 the partition level obtained in the process of step S1202 is set as the release partition level, and in step S1205, a temporary storage area named as a connection request is initially set as a flag for attempting to connect empty areas. .
  • step S1206 an attempt is made to release an area included in the primary allocation area indicated by the division number and connect an empty area. If the original allocation request is a single bit request, the processing in step S1206 ends if the allocation state of the division number set in step S1201 is set to empty. If the original allocation request is a multi-bit request, secondary allocation has been performed and not only the secondary allocation area is released, but also the empty candidate area in the adjacent multi-layer area is linked to the released area. An attempt is made to empty the allocation status of the upper division level area. Details of the processing in step S1206 will be described later with reference to FIGS. 14A and 14B.
  • step S1207 it is determined whether there is a connection request. If not, the process ends. If there is, an attempt is made in step S1208 to connect the primary allocation area indicated by the section number and the adjacent area adjacent to each other to make the allocation state of the upper area empty. As will be apparent from the following description, there is a connection request and the process proceeds to step S1208 when the primary allocation area is released in the process of step S1206. Details of the processing in step S1208 will be described later with reference to FIGS. 17A, 17B, and 17C.
  • FIG. 13 explains the details of the processing in step S1202 of FIG. 12, and is a diagram for explaining an example of a processing flow for searching a multi-layered division management table by division number and obtaining a division level corresponding to the division number. .
  • step S1301 the total number of divisions is extracted from the total division number management table.
  • step S1302 it is determined whether the section number is significant and smaller than the total number of sections.
  • the division number the allocation division number given from the allocation area release request source in step S1201 of FIG. 12 is set.
  • the processing in step S1302 checks whether the value of the assigned division number is within a valid range, and guarantees the existence of a division level division unit corresponding to the division number for the following processing. .
  • step S1302 If the determination result in step S1302 is negative, the corresponding classification level is not returned, and the process ends. If the determination result is affirmative, the process proceeds to step S1303.
  • step S1303 the highest partition level of the multi-layer partition management table is set as the initial value for the partition level. In the example shown in FIG. 3, 7 is set as the division level.
  • step S1304 the start number indicated by the division level is extracted from the start number management table, and in step S1305, it is determined whether the extracted start number is significant. If the head number is not significant, the process proceeds to step S1306, the division level is decreased by 1, and the process returns to step S1304.
  • the loop processing from step S1304 to step S1306 described above skips the division level determination processing from the highest division level to the division level one level higher than the division level of the actually allocated area.
  • step S1307 determines whether the division level is the lowest division level. If the division level is the lowest division level, the information of the lowest division level 0 is returned as the division level is present, and the process is terminated. If the partition level is not the lowest partition level, the process proceeds to step S1308, and the start number pointed to by the value obtained by subtracting the partition level from the start number management table is extracted as the next start number.
  • step S1309 the partition number Determines whether it is less than the next head number. If it is determined that the division number is smaller than the next head number, the division level is returned as the division level is present, and the process is terminated. If it is determined in step S1309 that the segment number is not smaller than the next head number, the process proceeds to step S1310, the segment level is decreased by 1, and the process returns to step S1307.
  • step S1307 to step S1310 is repeated while decreasing the partition level by one, and before the partition level becomes the lowest partition level, in the determination of step S1309 of a certain partition level,
  • the partition level when it becomes smaller than the head number of the partition level is the partition level related to the partition unit indicated by the partition number. If the partition level becomes the lowest partition level before the partition number becomes smaller than the head number of the next partition level, the lowest partition level, that is, the partition level 0 becomes the corresponding partition level.
  • FIG. 14A is a diagram for explaining an example of a processing flow for attempting to release an area included in the primary allocation area indicated by the division number and connect an empty area.
  • an allocation configuration division table is created from the allocation request size.
  • the allocation request size can be included in the release request of the file system that requested the area release as described above.
  • the allocation configuration division table is created in the same manner as the processing in step S1104 shown in FIG. 11A.
  • FIG. 11A shows an allocation request for a multi-bit request, it is clear that an allocation configuration table with a bit value of 1 is formed in the case of a single bit request. .
  • step S1402 the bit position where the first bit 1 viewed from the low-order 0th bit of the allocation configuration section table is set at the minimum section level.
  • step S1405 the division allocation status in the allocation area is obtained from the allocation configuration classification table and pushed onto the division allocation status stack, and the process proceeds to step S1407.
  • the division allocation status is a division level, a division number, and a release display of an area where the allocation area is divided and assigned.
  • step S1407 the division allocation status stack is popped, and the division level, division number, and release display are read out.
  • step S1409 it is determined whether the read partition level is the release partition level. If the partition level is the release partition level, the process branches to step S1416. If the partition level is not the release partition level, the process proceeds to step S1411. If the original allocation request is a single bit request, the process branches to step S1416 in the determination process of the first step S1409.
  • step S1411 it is determined whether the release display read in step S1407 indicates “Yes”. If there is a release display, the process proceeds to step S1413. If there is no release display, the process proceeds to step S1412. In step S1412, it is determined whether there is a connection request. If there is, the process proceeds to step S1413. If not, the process returns to step S1407.
  • step S1413 an attempt is made to release the segment pair indicated by the segment number, and the process returns to step S1407. Details of the processing in step S1413 will be described later with reference to FIG.
  • the processing after step S1416 in which it is determined that the partition level is equal to the release partition level in the determination of step 1409 described above is a release processing of the area of the release partition level.
  • step S1416 it is determined whether there is a connection request. If there is no connection request, the process is terminated. That is, even in the case of a multi-bit request, if there is a connection request, the allocation state for the primary allocation area composed of the secondary allocation area and the adjacent multi-layer area is set to be empty by the process of step S1417.
  • FIG. 14B refers to the multi-layer partition allocation table 310 shown in FIG. 3 and, according to a specific example, a process of attempting to release an area included in the primary allocation area shown in FIG. 14A and FIG. It is a figure explaining.
  • the example shown in FIG. 14B releases the secondary allocation area secondary allocated by the multi-bit request similar to that illustrated in FIG. 11C, and concatenates with the adjacent area to empty the allocation status of the upper division level area. It is to set. Therefore, the values set in the allocation request size 220 and the allocation configuration classification table 230 are the same as those shown in FIG. 11C.
  • 14B is the allocation state before the secondary allocation area is released and connected, and is an empty candidate for the primary allocation area 280c after the secondary allocation shown in FIG. 11C.
  • the area 282d of the section number 21 that is present is in use.
  • the allocation state of the area 281d of the division number 44 remains an empty candidate.
  • the release and concatenation processes are sequentially performed from the partition level 1 that is the minimum partition level to the higher partition level while referring to the bit values in the allocation configuration partition table 230.
  • the division level 1 which is the minimum division level
  • the corresponding bit value of the allocation configuration division table 230 is 1 (corresponding is indicated by a dotted arrow 231a). That is, since there is a release display, step S1413 in FIG. 14A, that is, the process shown in FIG. 16 is executed.
  • the partition level 1 release request arrow 251a the release of the zone 281c is guaranteed, and the value of the partition number 171 in the partition level 1 partitioning table before the release indicated by the reference numeral 161c is 43.
  • step S1605 in FIG. It is assumed that there is a connection request (indicated by an arrow 241c) for setting the allocation state of the division level 1 division pair 291c consisting of the division of the division number 43 and the division number 44 division to be empty, indicated by an arrow 241c.
  • the allocation state of the division number 43 and the paired division number 44 is set to hold.
  • the initial setting of the multi-layered division table 310 shown in FIG. 3 when the sky of the upper division level area is set, setting the hold to the allocation state of the lower division level area included in the area It is the same.
  • the corresponding bit value of the allocation configuration division table 230 is 0 (indicating the correspondence by the dotted arrow 232a), and since there is a connection request 241c, it is the upper division area as shown by the arrow 241d.
  • a request for releasing the area of the division number 20 in the division level attached table of the division level 2 before the release with the reference numeral 162c is made. Since the area of the division number 20 and the area of the division number 21 constituting the division pair 292c are in use, the determination in step S1605 of FIG. 16 is negative, and only the area of the division number 20 is shown as indicated by the arrow 242c.
  • the allocation state of the partition pair 292c becomes empty and in use, as shown in the partition level 2 partition allocation table after release with reference numeral 162d. Also, there is no connection request. Therefore, it is the area above the division pair 292c as indicated by the dotted arrow 242d, and the area of the division number 9 in which the allocation state is in use as indicated in the division level 3 divisional table before release, which is denoted by reference numeral 163c. Will not be released.
  • the corresponding bit value of the allocation configuration division table 230 is 1 (indicated by the dotted arrow 233a), and the area 283c is indicated by the release level arrow 253a of the division level 3 as shown.
  • the area of division number 9 whose allocation state is in use is not released and is in use. Therefore, as indicated by the arrow 243c, only the area of the division number 9 and the area of the division number 8 constituting the division pair 293c are released, and the allocation state of the division pair 293c is the level of the division level 3 after the release with the reference numeral 163d. It becomes empty and in use as shown in the Warranty Schedule.
  • the primary allocation area 280d after the secondary allocation area is released by the above-described release and connection processing corresponds to the allocation state of the multi-layer division allocation table 310 by arrows 273e and 272e and dotted arrow 272f.
  • the section number 8 is an empty area 283c
  • the section number 20 is an empty area 282c
  • the section number 21 is an in-use area 282d.
  • FIG. 15 is a diagram for explaining the details of the processing in step S1405 in FIG. 14A.
  • FIG. 15 is a diagram for explaining an example of a processing flow for obtaining the split allocation status in the allocation area and pushing it to the split allocation status stack using the allocation configuration classification table. It is.
  • step S1501 the release partition level set in step S1204 shown in FIG. 12 is set as the partition level.
  • step S1501a the leading number indicated by the partition level is extracted from the leading number management table, and in step S1501b. Then, a value obtained by subtracting the head number of the read management information from the division number is set in the in-level number, and the process proceeds to step S1502.
  • step S1502 the bit value pointed to by the division level is extracted from the allocation configuration division table as a release display. If the bit value is 1, the display is released, and if the bit value is 0, the release is not displayed.
  • step S1502a the division level, the division number, and the release display are pushed onto the division allocation status stack as the division allocation status in the allocation area.
  • step S1504 it is determined whether the partition level is equal to the minimum partition level. If it is determined that the segment level is higher than the minimum segment level, the process branches to step S1504a to determine whether there is a release display. If there is no release display, the process proceeds to step S1506. In step S1505, 1 is added to the in-level number, and the flow advances to step S1506. In step S1506, the in-level number is doubled, and in step S1507, the division level is decreased by one. In step S1507a, the head number indicated by the section level is extracted from the head number management table. In step S1507b, a value obtained by adding the in-level number to the head number is set in the section number, and the process returns to step S1502.
  • step S1504 The above-described loop processing from step S1502 to step S1507b is repeated until it is determined in step S1504 that the division level is equal to the minimum division level. If it is determined in step S1504 that the segment level is equal to the minimum segment level, the process ends.
  • the division number is 3, the division level is 4, and the intra-level number is 2 and the bit value indicated by the division level 4 in the allocation configuration division table is 0.
  • the partition level, the partition number, and the release display pushed to the allocation status stack are 4, 3, and 0 (no release display), respectively.
  • the division level is updated to 3, and the division number is updated to “8” which is the sum of the start number “4” in the start number management table indicated by the division level 3 and the in-level number “4”.
  • the bit value indicated by the division level 3 in the allocation configuration division table is 1. Therefore, 3, 8, and 1 (with release indication) are pushed as the division level, the division number, and the release indication on the division allocation status stack, respectively.
  • the division level is updated to 2
  • the division number is updated to “20” which is the sum of the start number “10” of the start number management table indicated by the division level 2 and the in-level number “10”.
  • the bit value indicated by the division level 2 in the allocation configuration division table is 0. Therefore, 2, 20, and 0 (no release indication) are pushed as the division level, the division number, and the release indication on the division allocation status stack, respectively.
  • the division level is updated to 1 which is the minimum division level, and the division number is updated to “43” which is the sum of the start number “23” of the start number management table indicated by the division level 1 and the in-level number “20”.
  • the bit value indicated by the division level 1 in the allocation configuration division table is 1. Therefore, 1, 43 and 1 (with release indication) are pushed as the division level, the division number, and the release indication, respectively, on the split allocation status stack.
  • the area allocated by the multi-bit request is released. If the area allocated by a single bit request is to be released, the release partition level and the minimum partition level are the same, and only one set of partition level, partition number, and release display is pushed to the partition allocation status stack, and the release display There is.
  • FIG. 16 is a diagram for explaining details of the processing in step S1413 in FIG. 14A, and is a diagram for explaining an example of a processing flow for attempting to release a pair of segments indicated by a segment number.
  • the processing steps shown in FIG. 16 are executed for each partition level from the minimum partition level to the partition level one level lower than the release partition level by sequentially popping the split allocation status stack.
  • step S1602 a value obtained by adding the value 1 to the partition number is set in the pair partition number, and the process proceeds to step S1604, where the allocation state of the multi-layer partition table attached by the pair partition number is read, In step S1605, it is determined whether the read allocation state is empty or empty candidate. If the read assignment state is empty or empty candidate, the process proceeds to step S1606. If the read assignment state is neither empty nor empty candidate, the process branches to step S1609.
  • step S1606 a hold is set in the allocation state of the multi-layer partition table attached by the category number
  • step S1607 a hold is set in the allocation state of the multi-layer partition table attached by the pair category number.
  • step S1608 the presence of the connection request is set, and the process ends.
  • the processes in steps S1606 to S1608 correspond to the process with a connection request indicated by the arrow 241c in the example of FIG. 14B.
  • step S1609 empty is set in the allocation state of the multi-layer partitioning table indicated by the partition number, and in step S1610, nothing is set in the connection request, and the process ends.
  • this process corresponds to the process of releasing only the own area indicated by the arrows 242c and 243c.
  • FIG. 17A is a diagram illustrating an example of a processing flow in which the primary allocation area and an adjacent empty area are connected to try to make the allocation state of the upper area empty.
  • step S1701 the release partition level is set as the partition level, and the flow advances to step S1702.
  • step S1702 the start number indicated by the division level is extracted from the start number management table.
  • step S1703a the value obtained by adding the in-level number to the extracted start number is set in step S1703a, and the process proceeds to step S1703b.
  • the in-level number is set by step S1501b of the process flow of FIG. 15 showing details of the process of step S1405 shown in FIG. 14A.
  • step S1703b the main division number indicated by the division level is extracted from the main division number management table, and the process proceeds to step S1705.
  • step S1705 it is determined whether the division number is equal to the main division number. If equal, the process branches to step S1710, and if not equal, the process proceeds to step S1706.
  • step S1706 an attempt is made to release the pair of segments indicated by the segment number. Details of the processing in step S1706 will be described later with reference to FIG. 17C.
  • step S1707 it is determined whether there is a connection request. If there is no connection request, it means that it is determined in step S1605 in FIG. 16 that the assignment state of the paired segment number is neither empty nor empty candidate. If there is, the process branches to the processing of step S1708 and the subsequent steps, and the connection processing of the upper division level area is attempted. In step S1708, the division level is set one level higher, the process proceeds to step S1709, the quotient obtained by dividing the in-level number by the value 2 is set in the in-level number, and the process returns to step S1702.
  • step S1710 which branches when it is determined in step S1705 that the division number and the main division number are equal, the allocation state of the multi-layer division table attached by the division number is set to be empty, and the process ends.
  • the section number is equal to the main section number, there is no section of the section number that is paired with the section number as is clear from the illustration of FIG.
  • the allocation state is set to empty and the process ends.
  • FIG. 17B refers to the multi-layer division table 310 shown in FIG. 3 and connects the primary allocation area shown in FIG. 17A and FIG. 17C and the adjacent empty area to make the allocation state of the upper area empty. It is a figure explaining the process which tries this by a specific example. In the following description, connecting the primary allocation area and the adjacent empty area to make the allocation state of the upper area empty may be simply referred to as connection.
  • the allocation state of the upper division level area is set empty by concatenating with the adjacent area. It is.
  • the area of the division number 31 that was in use of the temporary allocation area 280b after the primary allocation shown in FIG. 8B is released as the multilayer area in the allocated state before the released primary allocation area is connected,
  • a multi-layered area 280e is illustrated in which the area 283b of the division number 7 that was empty is in use.
  • the allocation state of the area 281b with the division number 32 and the area 282b with the division number 15 remains empty.
  • the concatenation process is sequentially performed from the segment level 1 that is the release segment level to the higher segment level where the concatenation process is no longer possible. That is, the areas that are adjacent to the area 281a of the section number 31 that has been released and that are not in use are connected.
  • step S1207 shown in FIG. 12 since the determination in step S1207 shown in FIG. 12 is affirmative, a connection request indicated by an arrow 240e is made to the released area 281a, and the processing of the division level 1 that is the release division level is performed. Is called.
  • the assignment state of the division number 32 area that is paired with the division number 171 value 31 and the in-level number 172 value 8 is empty.
  • the allocation state of division number 31 and paired division number 32 is set to hold.
  • FIG. 14B when the upper section level area is set to be empty, setting the holding state to the allocation state of the lower section level area included in the area is shown in FIG. This is the same as the case of the initial setting of the multi-layer division table 310 shown.
  • division level 2 since there is a connection request, a release request for the area of division number 14 in the division level table of division level 2 before connection, which is the upper division area as indicated by arrow 241f, and is attached with reference numeral 162e. Is done. Since the area of the division number 14 and the area of the division number 15 constituting the division pair 292d are empty, there is a connection request as shown by the arrow 242e. As shown, the allocation is set to the allocation state of the segment number 14 and the pair segment number 15.
  • the area of the upper division that is, the area of division number 6 in the division level attachment table of division level 2 before connection, which is denoted by reference numeral 163e, is released.
  • a request is made. Since the area of the division number 6 and the area of the division number 7 constituting the division pair 293d are in use, only the allocation state of the area of the division number 6 is set to empty as shown by the arrow 243e, and the allocation state of the division pair 293d is , Empty and in use as shown in the division level attached table of division level 3 after concatenation with reference numeral 163f. Since there is no connection request, the area of the division number 2 that is an upper area as shown by the dotted arrow 243f and the allocation state is in use as shown in the division division table 164 of the division level 4 is released. Instead, the assigned state remains in use.
  • the multi-layer area 280f in the allocated state after the primary allocation area is connected to the adjacent empty area by the above processing of releasing and connecting the area is changed to the allocation state of the multi-layer division table 310 by the arrow 273e and the dotted arrow 272f.
  • the section number is 6 and the area is empty 283e, and the section number is 7 and the area is used 283f.
  • FIG. 17C explains the details of the processing in step S1706 of FIG. 17A and is a diagram for explaining an example of a processing flow for attempting to release the segment pair indicated by the segment number.
  • the category pair indicated by the category number means the category pair to which the category unit identified by the category number belongs, and as will be described later, the category number is not necessarily the younger number. In other words, the in-level number corresponding to the division number is not always an even number.
  • the processing step shown in FIG. 17C is executed for each partition level in the direction from the release partition level to the higher partition level, and attempts to release the upper partition level region by concatenating empty regions. It is done.
  • step S1711 it is determined whether the in-level number is an even number.
  • the process flow shown in FIG. 17C is similar to that shown in FIG. 16, but as described above, in the process of FIG. 17A, that is, step S1208 of FIG. 12, the in-level number is not always an even number. Absent. This is because the in-level number corresponding to the primary allocation area that has been released and becomes empty may be an even number or an odd number.
  • 8 is set, but when the area 283f with the assigned allocation division number 7 shown in FIG. 17B becomes empty, the in-level number is 3, which is an odd number.
  • step S1712 the value obtained by adding the value 1 to the division number is set in the pair division number, and the process proceeds to step S1714. If the number in the level is an odd number, the pair division number is entered in step S1713. In step S1714, a value obtained by subtracting 1 from the division number is set.
  • step S1714 the allocation state of the multi-layer partition allocation table indicated by the paired segment number is read out, and in step S1715, it is determined whether the read allocation state is empty or empty candidate. If the read assignment state is empty or empty candidate, the process proceeds to step S1716. If the read assignment state is neither empty nor empty candidate, the process branches to step S1719.
  • step S1716 the allocation state of the multi-layer partitioning table indicated by the division number is set to hold, and in step S1717, holding is set as the allocation state of the multi-layer partitioning table indicated by the pair of division numbers.
  • step S1718 the group pair connection request is set to “Yes”, and the process ends.
  • the processes in steps S1716 to S1718 correspond to the connection request processes indicated by arrows 241e and 242e in the illustration of FIG. 17B.
  • step S1719 the allocation state of the multi-layer partitioning table indicated by the partition number is set to be empty, and in step S1720, none is set in the connection request, and the process ends.
  • This process corresponds to the process of releasing only the own area indicated by the arrow 243e in the example of FIG. 17B.
  • partition management device can be constructed on a computer by a program that causes a computer such as the data processing device 301 illustrated in FIG. 2C to execute the partition management method of the present invention.
  • a program that causes a computer such as the data processing device 301 illustrated in FIG. 2C to execute the partition management method of the present invention.
  • a functional block configuration example relating to the partition management apparatus of the present invention will be described below.
  • FIG. 18A is a diagram illustrating a functional block configuration example of a partition management device according to an embodiment of the present invention.
  • the partition management device 800 is roughly composed of an initialization unit 810 and a multilayer section management unit 840.
  • the initialization unit 810 and the multilayer partition management unit 840 correspond to the allocation system (initialization unit) 101 and the allocation system (multilayer partition management unit) 102 illustrated in FIG. 2B.
  • the initialization unit 810 includes a section size acquisition unit 820 that acquires a section size, and a multi-layer partitioning table generation unit 830.
  • the multi-layer partitioning table generation means 830 represents the size of each partition as the product of the sum of powers of two different from each other and the size of the allocation unit of the partition, and the size of each of the powers of 2 constituting the sum and the allocation unit of the partition.
  • the main area of the product size is divided into sections in the order of the size, and the sections are divided, and each main area is divided by half, and each size is sequentially divided into the allocation unit size.
  • a multi-layer division table that stores allocation information indicating the allocation status of each area corresponding to each area including the main area is generated and initialized.
  • the function of the multi-layer partitioning table generation unit 830 can be realized by the processing flow example described with reference to FIGS. 4A to 4C.
  • the multi-layer division management unit 840 includes an area allocation unit 850 that allocates a file or a memory area to an empty area, and an area release unit 860 that releases the allocation area from the allocation of the file or memory area.
  • FIG. 18B is a diagram illustrating an example of a functional block configuration of the area allocating unit according to the embodiment of the present invention.
  • the area allocation unit 850 includes an allocation request reception unit 851 that receives an allocation request, an empty area search unit 852, a secondary allocation unit 853, and an allocation category number output unit.
  • Allocating means 857 is included.
  • the function of the area allocating unit 850 can be realized by the processing flow example described with reference to FIG.
  • the allocation request size which is the size included in the allocation request, is represented by the product of the sum of powers of two different from each other and the size of the allocation unit of the partition, and is the sum of the sizes of the areas of different partition levels.
  • a search is made for a primary allocation area that is an empty area of a partition level that is one larger than the maximum of the partition level and is larger than the allocation request size, and the allocation request size that is the size included in the allocation request is 2
  • an empty area of the allocation request size is searched as a primary allocation area.
  • the function of the empty area searching means 852 corresponds to the processing flow illustrated in FIGS.
  • the temporary allocation means 857 of the empty area search means 852 refers to the allocation status corresponding to the upper division level area of the multi-layer division division table when the empty area cannot be searched at the division level of the primary allocation area. An empty area at a higher division level is searched, and the allocation state of the multi-layer division allocation table is set to be in use with the area as a temporary allocation area, and the temporary allocation area is defined as the primary allocation area and the remaining areas at the division level.
  • the function of the temporary allocation unit 857 corresponds to the processing flow illustrated in FIGS. 7A and 8A, and FIGS. 10A and 10B.
  • the secondary allocation means 853 is a secondary allocation in which the primary allocation area is an area in which areas having different division levels are sequentially assigned in descending order of the division level. Divide into areas and adjacent multi-layer areas where areas with different division levels are assigned sequentially from the remaining areas, starting with the lowest division level, and correspond to each of the secondary allocation areas In-use is set in the allocation state of the multi-layer partitioning table, and an empty candidate state is set in the allocation state of the multi-layer partitioning table corresponding to the area constituting the adjacent multi-layer area.
  • the function of the secondary allocation unit 853 corresponds to the processing flow illustrated in FIGS. 11A and 11B.
  • FIG. 18C is a diagram illustrating an example of a functional block configuration of the area releasing unit according to the embodiment of the present invention.
  • the area release means 860 includes a release request reception means 851 that receives a release request, a primary allocation area release means 862 that attempts to release an area in the primary allocation area, and a partition level that is higher than the partition level of the primary allocation area.
  • Higher-level area release means 863 that attempts to release the area.
  • the function of the area releasing means 860 corresponds to the processing flow example illustrated in FIG.
  • the release request size which is the size included in the release request, is the sum of the areas having different partition levels
  • the primary allocation area release means 862 obtains the partition number of the smallest area in the adjacent multi-layer area and determines its partition number.
  • the multi-layer division corresponding to the minimum area in the secondary allocation area and the minimum area in the adjacent multi-layer area Attempts to release the area at the next higher partition level by setting the allocation state in the contingency table, and if the allocation status of the smallest area in the adjacent multi-layer area is in use, the lowest in the secondary allocation area
  • the area assignment state is set to empty.
  • the function of the primary allocation area release means 862 corresponds to the processing flow illustrated in FIG. 14A.
  • the upper area release means 863 has the same division level as the primary allocation area when the primary allocation area is released and the allocation state of the multi-layered division allocation table indicated by the division number is empty, and is one level higher. Read the allocation status of the other area from the multi-level allocation table when one area is divided into two areas as the primary allocation area, and the allocation status of the other area is empty or empty candidate If so, it sets a hold in the allocation state of the multi-layer partitioning table corresponding to the one area and the other area, tries to release the area of the higher division level, and the allocation state of the other area is in use If there is, the allocation state of one area is made empty.
  • the function of the upper zone release means 863 corresponds to the processing flow illustrated in FIG. 17A.

Abstract

Provided is a technology by which an area can be flexibly partitioned and managed regardless of the capacity of a storage device, and an area can effectively utilized by an effective method when a file is allocated to a partition. A size of a partition of a storage device is expressed by a sum of mutually different power of twos, and when an area having a size of each of the power of twos constituting the sum defines a main section, each main section is divided into sections having sizes obtained by sequentially halving the main section, and an allocation table which stores allocation information indicating the file allocation status with respect to each of the sections having respective sizes including the main section is generated. The partitions are managed on the basis of the allocation information stored in the allocation table.

Description

区画管理装置、区画管理方法及びプログラムPartition management apparatus, partition management method and program
 本発明は、記憶装置の区画を管理する、区画管理装置、区画管理方法及びプログラムに関する。 The present invention relates to a partition management device, a partition management method, and a program for managing partitions of a storage device.
 従来から、ハードディスク等の記憶装置に記憶するデータを管理するための方式として、例えばFAT(File Allocation Tables)やNTFS(NT File System)等のファイルシステムが採用されている。 Conventionally, as a method for managing data stored in a storage device such as a hard disk, a file system such as FAT (File Allocation Tables) or NTFS (NT File System) has been adopted.
 図1Aは、従来から採用されているハードディスク等の外部記憶装置における区画割付を説明する図である。
 図1Aに示すように、例えば外部記憶装置306の記憶領域は、図示しないディスクアロケータ等のユーティリティプログラムにより4つの区画1~4(191,192,193,194)が割り付けられ、それぞれあるファイルシステムに割り当てられている。区画の先頭には区画の管理データを格納した区画管理テーブル195aを備えたマスターブートレコード195が配置されている。図1Aに区画番号3についての区画情報196が例示されているように、区画管理テーブル195aは、区画番号196a、開始位置196b、区画サイズ196cのエントリを含んでいる。区画番号196aには、区画を識別する区画番号が格納されており、図示の例では3である。開始位置には、区画の先頭アドレスの情報が格納されており、図示の例ではその内容は省略している。区画サイズ196cには、区画の割当単位領域の個数が格納されており、図示の例では52である。
FIG. 1A is a diagram for explaining partition assignment in an external storage device such as a hard disk conventionally employed.
As shown in FIG. 1A, for example, the storage area of the external storage device 306 is assigned four partitions 1 to 4 (191, 192, 193, 194) by a utility program such as a disk allocator (not shown), and each of them is assigned to a certain file system. Assigned. A master boot record 195 having a partition management table 195a storing partition management data is arranged at the head of the partition. As illustrated in FIG. 1A with the partition information 196 for the partition number 3, the partition management table 195a includes entries for a partition number 196a, a start position 196b, and a partition size 196c. The partition number 196a stores a partition number for identifying the partition, and is 3 in the illustrated example. Information on the top address of the section is stored at the start position, and the contents thereof are omitted in the illustrated example. The partition size 196c stores the number of allocation unit areas of the partition, which is 52 in the illustrated example.
 各区画におけるファイルに対するディスクの割付管理は、それぞれの区画が割り当てられたファイルシステム特有の割付方法に依存するため煩雑であった。例えば、FATによれば、割付を行ったブロックを示すリンクリストをファイルごとに保持している。また、NTFSによれば、ファイルごとに割付を行ったブロックの開始位置及び連続するブロック数についての情報を保持している。
 これらのファイルシステムにおける割付管理の問題を解決するために、例えば、下記特許文献1に開示されているバディシステムに関する技術が提案されている。バディシステムによれば、領域を2からなるサイズごとに分割して割付の管理を行う。仮想記憶方式を使用していないメモリ管理システムでのメモリ領域の割り付けでは、基本的なバディシステムが採用されている。
Disk allocation management for files in each partition is complicated because it depends on the allocation method specific to the file system to which each partition is allocated. For example, according to FAT, a link list indicating a block to which allocation is performed is held for each file. Further, according to NTFS, information about the start position of the block assigned for each file and the number of continuous blocks is held.
In order to solve the problem of allocation management in these file systems, for example, a technique related to a buddy system disclosed in Patent Document 1 below has been proposed. According to the buddy system, the allocation is managed by dividing the area into 2 k sizes. A basic buddy system is used for allocating memory areas in a memory management system that does not use the virtual storage method.
 図1Bは、バディシステムの割付原理を説明する図である。図1Bに示すのは、サイズが2=8の割当領域490とそれに対応するツリー構造体580と、ツリー構造体580のノードに対応する領域が使用中であるかを示すビットマップ400である。割当領域490は、例えば図1Aに例示した区画1~4等である。
 ツリー構造体580は、割当領域490を2分の1のサイズに順次割付単位のサイズまで分割して得られる領域の関係を階層的にモデル化したものである。割付単位のサイズの領域の階層をレベル1とすると、図に示す例では、ルートノードのレベルは4となる。
FIG. 1B is a diagram illustrating the allocation principle of the buddy system. Shown in FIG. 1B is a bitmap 400 that indicates an allocation area 490 of size 2 3 = 8, a corresponding tree structure 580, and an area corresponding to a node of the tree structure 580 is in use. . The allocation area 490 is, for example, the sections 1 to 4 illustrated in FIG. 1A.
The tree structure 580 is a hierarchical model of the relationship between the areas obtained by sequentially dividing the allocation area 490 into half the size of the allocation unit. In the example shown in the figure, the level of the root node is 4 when the hierarchy of the area of the allocation unit size is level 1.
 ツリー構造体580のルートノード480は、点線の矢印で示すように、分割前の割当領域490全体の領域(レベル4の領域)に対応し、ノード内に記載された“8”は、対応する割当領域490のサイズに相当する。また、括弧内の数字は、同一レベル内の領域を識別するレベル内番号である。 The root node 480 of the tree structure 580 corresponds to the entire area (level 4 area) of the allocation area 490 before division, as indicated by the dotted arrow, and “8” described in the node corresponds to This corresponds to the size of the allocation area 490. The numbers in parentheses are intra-level numbers that identify areas within the same level.
 ルートノード480にリンク540で接続されたノード440と、ルートノード480にリンク541で接続されたノード441は割当領域490を2分割した領域(レベル3の領域)に対応する。それぞれの領域のサイズは図に示すように4である。
 ノード440の下位には、リンク520で接続されたサイズ2のノード420と、リンク521で接続されたサイズ2のノード421が存在する。同様に、ノード441の下位には、リンク522で接続されたサイズ2のノード422と、リンク523で接続されたサイズ2のノード423が存在する。これら4つのノードはレベル2の領域に対応する。
A node 440 connected to the root node 480 via a link 540 and a node 441 connected to the root node 480 via a link 541 correspond to an area (level 3 area) obtained by dividing the allocation area 490 into two. The size of each area is 4 as shown in the figure.
Below the node 440 are a size 2 node 420 connected by a link 520 and a size 2 node 421 connected by a link 521. Similarly, a size 2 node 422 connected by a link 522 and a size 2 node 423 connected by a link 523 exist below the node 441. These four nodes correspond to the level 2 region.
 ノード420の下位には、リンク510で接続されたサイズ1のノード410と、リンク511で接続されたサイズ1のノード411が存在する。同様に、ノード421の下位には、リンク512で接続されたサイズ1のノード412と、リンク513で接続されたサイズ1のノード413が存在し、ノード422の下位には、リンク514で接続されたサイズ1のノード414と、リンク515で接続されたサイズ1のノード415が存在し、ノード423の下位には、リンク516で接続されたサイズ1のノード416と、リンク517で接続されたサイズ1のノード417が存在する。これら8つのノードはレベル1の領域に対応する。
 ルートノード480以外のノードは親ノードの対応する領域を2分割した領域の1つに対応したものとなっている。したがって、各レベルの領域のサイズの総和は、割当領域490のサイズに一致する。
Below the node 420 are a size 1 node 410 connected by a link 510 and a size 1 node 411 connected by a link 511. Similarly, a size 1 node 412 connected by a link 512 and a size 1 node 413 connected by a link 513 exist below the node 421, and a node 413 connected by a link 514 below the node 422. The size 1 node 414 connected by the link 515 and the size 1 node 415 connected by the link 515 exist, and the size 1 node 416 connected by the link 516 and the size connected by the link 517 are below the node 423. There is one node 417. These eight nodes correspond to the level 1 region.
Nodes other than the root node 480 correspond to one of the areas obtained by dividing the area corresponding to the parent node into two. Therefore, the sum of the sizes of the areas at each level matches the size of the allocation area 490.
 図1Bに示すビットマップ400は、点線の矢印で示すように、ツリー構造体580の各ノードに対応したビット値を持つものである。ビットマップ400の、符号408で示すレベル4のレベル内番号409で示すビット位置のビット値は、レベル4の領域が使用中であるかを示すものであり、符号404で示すレベル3のレベル内番号0、1のビット値は、該当する領域が使用中であるかを示している。同様に、符号402で示すレベル2のレベル内番号0~3はレベル2の各領域が使用中であるかを示し、符号401で示すレベル1のレベル内番号0~7はレベル1の各領域が使用中であるかを示している。 1B has a bit value corresponding to each node of the tree structure 580, as indicated by a dotted arrow. The bit value of the bit position indicated by the in-level number 409 of level 4 indicated by reference numeral 408 in the bitmap 400 indicates whether the level 4 area is in use, and is within the level 3 level indicated by reference numeral 404. The bit values of numbers 0 and 1 indicate whether the corresponding area is in use. Similarly, level 2 in-level numbers 0 to 3 indicated by reference numeral 402 indicate whether or not each level 2 area is in use, and level 1 in-level numbers 0 to 7 indicated by reference numeral 401 indicate level 1 areas. Indicates whether it is in use.
 図1Bに示す例では、レベル4のレベル内番号0、レベル3のレベル内番号0、レベル2のレベル内番号0、レベル1のレベル内番号0にビット“1”が立っており、そのビット位置に対応する領域全体を新たに使用することはできないことを示している。つまり、レベル1のレベル内番号0にその状態を示すように、ノード410に対応するサイズ1の領域が使用中であるので、その領域を含むより大きいサイズの領域をそのまま使用することはできないことを示している。 In the example shown in FIG. 1B, bit “1” is set in the intra-level number 0 of level 4, the intra-level number 0 of level 3, the intra-level number 0 of level 2, and the intra-level number 0 of level 1. This shows that the entire area corresponding to the position cannot be newly used. In other words, since the area of size 1 corresponding to the node 410 is in use as indicated by the level number 0 in level 1, the larger area including that area cannot be used as it is. Is shown.
 上述のバディシステムによれば、ある大きさのファイル及びメモリ領域を割り付けるとき、その大きさと等しいかそれを超える2からなるサイズの領域の中から空き領域を探して割り付け、解放するときもそのサイズの空き領域群に戻せばよいので、ファイル及びメモリ領域の割り付けと解放及び領域の管理が容易である。 According to the above-mentioned buddy system, when allocating files and memory areas of a certain size, that even when the assignment searching for free space from the region of the size made of 2 k to or exceeds the size and equal, releasing Since it is sufficient to return to the vacant area group of the size, allocation and release of the file and the memory area and management of the area are easy.
特開平7-28693号公報JP 7-28893 A
 しかしながら、上記のバディシステムによれば、2のべき乗単位で領域を割り付けることから、例えば2.1GBのファイルを割り付けるとき、4GBの領域が必要となり、ファイル割付後のブロックには、データの書き込まれていない領域が生じるにも関わらず、従来のファイルシステムにおいてはその領域に対して更にファイルを追加することができず、領域を有効に使用することができなかった。
 また、例えば記憶装置全体の記憶容量が127GBであったとしても、記憶領域を要求する要求元に対して割り付ける物理的あるいは論理的な領域である区画について、最大でも64GBの区画として管理せざるを得なかった。
 すなわち、バディシステムによれば、2のべき乗単位で領域を割り付けることからファイル及びメモリ領域の割り付けと解放及び領域の管理が容易ではあるが、2のべき乗サイズの領域から2のべき乗サイズではない領域を取得した場合の残りの領域の管理、及び2のべき乗サイズではない領域から2のべき乗サイズの領域を取得した場合の残りの領域の管理がなされていないため、領域を有効活用できないという課題がある。
However, according to the above buddy system, since the area is allocated in units of powers of 2, for example, when a 2.1 GB file is allocated, a 4 GB area is required, and data is written to the block after the file allocation. In spite of the occurrence of an unoccupied area, a file cannot be added to the area in the conventional file system, and the area cannot be used effectively.
For example, even if the storage capacity of the entire storage device is 127 GB, a partition that is a physical or logical area allocated to a requester requesting a storage area must be managed as a 64 GB partition at the maximum. I didn't get it.
In other words, according to the buddy system, since the area is allocated in units of powers of 2, it is easy to allocate and release files and memory areas and manage the areas, but from areas of power-of-two sizes to areas that are not power-of-two sizes Since there is no management of the remaining area when acquiring the area, and management of the remaining area when acquiring the area of the power of 2 from the area that is not the power of 2 size, there is a problem that the area cannot be effectively used. is there.
 そこで本発明は、2のべき乗サイズの領域から2のべき乗サイズではない領域を取得した場合でも、2のべき乗サイズではない領域から2のべき乗サイズの領域を取得した場合でも、残りの領域を管理することが可能であり、また領域管理手段が領域にファイル及びメモリ領域を割り付けるに当たって、効率的な手法により、領域を有効活用することのできる技術を提供することを目的とする。 Therefore, the present invention manages the remaining areas even when an area that is not a power of 2 size is acquired from an area of a power of 2 size or an area that is a power of 2 size is acquired from an area that is not a power of 2 size. An object of the present invention is to provide a technique capable of effectively using an area by an efficient method when the area management means allocates a file and a memory area to the area.
 本発明の一つの態様によれば、区画のサイズを取得し、区画のサイズを互いに異なる2のべき乗の和と区画の割当単位のサイズの積で表したとき該和を構成する各2のべき乗のサイズの領域を主区域としてそのサイズの順に区画に連続的に割り付けることで区画を区分けし、主区域を2分の1ずつ順次分割したサイズの各サイズの領域である区域と主区域に対応して、各サイズの区域と主区域のそれぞれのファイル割り付け状態を示す割付情報を格納する多層区分割付表を生成し、多層区分割付表に格納された割付情報に基づいて区域のファイルへの割付を管理する。 According to one aspect of the present invention, when the size of a partition is acquired and the size of the partition is represented by the product of the sum of powers of two different from each other and the size of the allocation unit of the partition, each power of two constituting the sum The area of the size is divided into sections by sequentially assigning the area as the main area to the sections in the order of the size, and the main area is divided into one-by-two main areas corresponding to the area and the main area of each size size Then, generate a multi-layer partition allocation table that stores allocation information indicating the file allocation status of each size area and main area, and allocate the area to the file based on the allocation information stored in the multi-layer partition allocation table Manage.
また、本発明の別の態様によれば、区域のサイズを規定する2のべき乗のべき数を該区域の区分レベルとすると、多層区分割付表は、区域の割付情報を、区域の区分レベル順、同一区分レベルにおいては区域の区画内の配置順で格納し、割付情報の格納順にしたがって割付情報が該当する区域を識別するための識別番号である区分番号を割り振り、該区分番号を用いて区域の割付を管理する。 Further, according to another aspect of the present invention, when the number of powers of 2 that defines the size of the area is a division level of the area, the multi-layer division table shows the allocation information of the area in the order of the division level of the area. In the same division level, store in the order of arrangement within the division of the area, assign a division number that is an identification number for identifying the area to which the allocation information corresponds according to the storage order of the allocation information, and use the division number to Manage the allocation of
 また、本発明の別の態様によれば、割付要求されたファイルのサイズが区分レベルの異なる区域のサイズの和である場合、該区分レベルの最大のものより1つ大きい区分レベルの空区域であって割付要求サイズより大きいサイズの一次割付区域を探索し、一次割付区域を、区分レベルの順に区分レベルの異なる区域が連続して割り付けられた領域である二次割付区域と、残りの領域であって二次割付区域の区分レベルの異なる区域が割り付けられる区分レベルの順とは逆順で区分レベルの異なる区域が連続して割り付けられた領域である隣接多層区域とに分割し、二次割付区域のそれぞれの区域に対応する多層区分割付表の割付状態に使用中を設定し、隣接多層区域を構成する区域に対応する多層区分割付表の割付状態に空候補状態を設定する。 Further, according to another aspect of the present invention, when the size of the requested file is the sum of the sizes of the areas having different partition levels, the empty area of the partition level that is one greater than the largest of the partition levels is used. The primary allocation area that is larger than the allocation request size is searched for, and the primary allocation area is divided into the secondary allocation area, which is an area in which areas of different division levels are continuously assigned in the order of the division level, and the remaining areas. The secondary allocation area is divided into adjacent multi-layer areas, which are areas in which areas with different division levels are continuously assigned in the reverse order of the division level in which areas with different division levels of the secondary allocation area are assigned. Use is set for the allocation status of the multi-layer division allocation table corresponding to each of the areas, and the empty candidate status is set for the allocation status of the multi-layer division allocation table corresponding to the area constituting the adjacent multi-layer area That.
 本発明によれば、区画を2のべき乗サイズの組合せで管理するので任意のサイズの区画を効率的に無駄なく有効に管理することが可能であり、区画を区分した各サイズの区域で割付管理を行うことから、連続する領域に無駄なくファイルの割付がなされることとなるため、領域の有効活用を図ることができる。 According to the present invention, since a partition is managed by a combination of power-of-two sizes, it is possible to efficiently manage a partition of any size efficiently and without waste. As a result, the files are allocated to the consecutive areas without waste, so that the areas can be effectively used.
外部記憶装置における区画割付を説明する図である。It is a figure explaining the partition allocation in an external storage device. バディシステムの割付原理を説明する図である。It is a figure explaining the allocation principle of a buddy system. 本発明の一実施形態における区画管理の概要を説明する図である。It is a figure explaining the outline | summary of the division management in one Embodiment of this invention. 本発明の一実施形態におけるアロケーションシステムのソフトウェア及びハードウェア環境例を説明する図である。It is a figure explaining the software and hardware example of an allocation system in one Embodiment of this invention. 本発明の一実施形態におけるハードウェア構成例を説明する図である。It is a figure explaining the hardware structural example in one Embodiment of this invention. 本発明の一実施形態における区画サイズに対応した区画の初期化状態例を説明する図である。It is a figure explaining the example of the initialization state of the division corresponding to the division size in one Embodiment of this invention. 本発明の一実施形態における区画を初期化する前段の処理フロー例を説明する図である。It is a figure explaining the example of a process flow of the front | former stage which initializes the division in one Embodiment of this invention. 本発明の一実施形態における区画を初期化する後段の処理フロー例を説明する図である。It is a figure explaining the process flow example of the back | latter stage which initializes the division in one Embodiment of this invention. 本発明の一実施形態における多層区分割付表を区分レベル毎に初期化する処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which initializes the multilayer division | segmentation attachment table in one Embodiment of this invention for every division level. 区域の割付を行う処理全体の概略の処理フローを説明する図である。It is a figure explaining the outline processing flow of the whole process which allocates an area. 割付要求区分レベルの空区域を探索し、空区域の区分番号を取得する処理フロー例を説明する図である。It is a figure explaining the example of the processing flow which searches the empty area of an allocation request | requirement division | segmentation level, and acquires the division number of an empty area. 割付要求区分レベルのサイズを含む空区域を探索し、空区域の区分番号を取得する処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which searches the empty area containing the size of an allocation request | requirement division | segmentation level, and acquires the division number of an empty area. 割付要求区分レベルに空区域がある場合における区域探索を具体例により説明する図である。It is a figure explaining the area search when there exists an empty area in the allocation request | requirement division | segmentation level by a specific example. 割付要求区分レベルに空区域がない場合における区域探索を具体例により説明する図である。It is a figure explaining the area search in case there is no empty area in the allocation request | requirement division level by a specific example. 本発明の一実施形態における区分レベルの末尾番号を取得する処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which acquires the tail number of the division level in one Embodiment of this invention. 仮割付区域を多層区分し、一次割付区域を得る処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which divides a temporary allocation area into multiple layers and obtains a primary allocation area. 仮割付区域を多層区分し、一次割付区域を得る処理を具体例により説明する図である。It is a figure explaining the process which divides | segments a temporary allocation area into a multilayer and obtains a primary allocation area by a specific example. 割付要求区分レベルの空候補区域を探索し、空候補区域の区分番号を取得する処理フロー例を説明する図である。It is a figure explaining the example of the processing flow which searches the empty candidate area of an allocation request | requirement division | segmentation level, and acquires the division number of an empty candidate area. 割付要求区分レベルのサイズを含む空候補区域を探索し、空候補区域の区分番号を取得する処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which searches the empty candidate area containing the size of an allocation request | requirement division | segmentation level, and acquires the division number of an empty candidate area. 割付状態が空候補の仮割付区域を多層区域に区分し、一次割付区域を得る処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which divides the temporary allocation area whose allocation state is an empty candidate into a multilayer area, and obtains a primary allocation area. 一次割付区域を多層区分し、割付要求区分の二次割付区域を得る前段の処理フロー例を説明する図である。It is a figure explaining the example of the process flow of the front | former stage which divides a primary allocation area into multilayer and obtains the secondary allocation area of an allocation request | requirement classification. 一次割付区域を多層区分し、割付要求区分の二次割付区域を得る後段の処理フロー例を説明する図である。It is a figure explaining the example of a subsequent process flow which divides a primary allocation area into multiple layers and obtains the secondary allocation area of an allocation demand classification. 一次割付区域を多層区分し、割付要求区分の二次割付区域を得る処理を、具体例により説明する図である。It is a figure explaining the process which divides a primary allocation area into a multilayer and obtains the secondary allocation area of an allocation request | requirement classification by a specific example. 割付区域を解放し、空区域の連結を試みる処理全体の概略の処理フロー例を説明する図である。It is a figure explaining the example of a rough processing flow of the whole process which releases the allocation area and tries connection of an empty area. 区分番号により多層区分管理表を検索し、区分番号に対応する区分レベルを求める処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which searches a multilayer division management table with a division number, and calculates | requires the division level corresponding to a division number. 一次割付区域内に含まれる区域の解放と空区域の連結を試みる処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which tries the release of the area contained in a primary allocation area, and the connection of an empty area. 一次割付区域内に含まれる区域の解放と空区域の連結を試みる処理を、具体例により、説明する図である。It is a figure explaining the process which tries release of the area contained in a primary allocation area, and connection of an empty area by a specific example. 割付区域内の分割割付状況を求めて分割割付状況スタックにプッシュする処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which calculates | requires the division | segmentation allocation status in an allocation area, and pushes on a division | segmentation allocation status stack. 区分番号の指す区分対の解放を試みる処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which tries release of the division pair which a division number points out. 一次割付区域と、隣接する空区域とを連結して上位の区域の割付状態を空とすることを試みる処理フロー例を説明する図である。It is a figure explaining the example of a processing flow which tries to make the allocation state of a high-order area empty by connecting a primary allocation area and an adjacent empty area. 一次割付区域と、隣接する空区域とを連結して上位の区域の割付状態を空とすることを試みる処理を、具体例により、説明する図である。It is a figure explaining the process which tries to make the allocation state of a high-order area empty by connecting a primary allocation area and an adjacent empty area by a specific example. 区分番号の指す区分対の解放を試みる処理フローを説明する図である。It is a figure explaining the processing flow which tries release of the division pair which a division number points out. 本発明の一実施形態における区画管理装置の機能ブロック構成例を説明する図である。It is a figure explaining the functional block structural example of the division management apparatus in one Embodiment of this invention. 本発明の一実施形態における区域割付手段の機能ブロック構成例を説明する図である。It is a figure explaining the functional block structural example of the area allocation means in one Embodiment of this invention. 本発明の一実施形態における区域解放手段の機能ブロック構成例を説明する図である。It is a figure explaining the functional block structural example of the area release means in one Embodiment of this invention.
 以下、本発明の好適な実施の形態について、図面を参照して詳細に説明する。
 図2Aは、本発明の一実施形態における区画管理の概要を説明する図である。図2Aを参照して本発明の一実施形態における区画管理の概要を説明するとともに、本発明の区画管理に関する若干の用語の定義を行う。
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the drawings.
FIG. 2A is a diagram illustrating an outline of partition management according to an embodiment of the present invention. The outline of the partition management in one embodiment of the present invention will be described with reference to FIG. 2A, and some terms related to the partition management of the present invention will be defined.
最初に、あらためて区画の定義を行う。本発明において「区画」とは、図1Aを参照して説明したように、予め割り当てられた領域であり、最初に割り当てられる領域である。本発明においては、区画は取得済みであることを前提とする。区画は、本発明においては、記憶領域を要求する要求元に対して割り付けられた物理的あるいは論理的な領域であり、要求元及び割付を実行する主体にはファイルシステムであるとかディスクアロケータであるというような制限はない。また、本発明における区画は、外部記憶装置の記憶領域に限らず、例えば後に図2Cを参照して説明するデータ格納装置308に含まれる各種記憶装置の予め割り当てられた領域とすることができる。 First, define the partition again. In the present invention, the “section” is an area allocated in advance as described with reference to FIG. 1A and is an area allocated first. In the present invention, it is assumed that the section has been acquired. In the present invention, a partition is a physical or logical area allocated to a request source requesting a storage area, and a subject that executes the request source and allocation is a file system or a disk allocator. There is no such restriction. In addition, the partition in the present invention is not limited to the storage area of the external storage device, and can be, for example, a pre-allocated area of various storage devices included in the data storage device 308 described later with reference to FIG. 2C.
さらにあらためて、本発明でいうメモリ領域の定義を行う。メモリ領域は、区画の領域の割付を要求する要求元から要求され、区画管理装置により要求元に対して割り付けられる区画内の領域である。要求元がファイルシステムであれば、ファイルシステムに割り付けられたメモリ領域はファイルシステムによって、ファイルの格納領域として使われることになる。以下の説明においては、要求元としてファイルシステムを例にあげて説明するので、ファイルを割り付けるという表現や、ファイル及びメモリ領域の割付のような表現を用いる。 Furthermore, the memory area defined in the present invention is defined again. The memory area is an area in a partition that is requested by a request source that requests allocation of a partition area and is allocated to the request source by the partition management device. If the request source is a file system, the memory area allocated to the file system is used as a file storage area by the file system. In the following description, a file system will be described as an example of a request source, so expressions such as file allocation and file and memory area allocation are used.
「区域」とは、割り当てられた、あるいは割り付けられた領域である。区画は予め割り当てられた領域であるから、区域の1つであり、区域のうちの特定のものである。
区域を、2のべき乗と割当単位領域の積のサイズを有する複数の区域に分割することを「多層区分」という。また、多層区分された区域を「多層区域」という。なお、以下の説明においては、割当単位領域についての言及は省略し、領域のサイズについて、単に2のn乗のサイズ等の表記を用いる場合がある。また、表記の簡略化のため、例えば図1Aの例示の区画番号196aに格納された値3を区画番号196aと呼ぶように、記憶領域に格納されたあるいは設定された値をその記憶領域の名前で呼ぶことがある。
An “area” is an allocated or allocated area. Since a partition is a pre-allocated region, it is one of the zones and is a specific one of the zones.
Dividing the area into a plurality of areas having the size of the product of the power of 2 and the assigned unit area is called “multi-layer division”. A multi-layered area is referred to as a “multi-layer area”. In the following description, reference to the allocation unit area is omitted, and the notation of the area size may be simply a notation such as a size of 2n. For the sake of simplicity, for example, the value 3 stored in the storage area or the set value stored in the partition number 196a illustrated in FIG. 1A is called the partition number 196a. Sometimes called.
以下、区域についての用語とそれに対応する区画についての用語を対比しながら定義する。
「区分」とは、領域を割り当てる、あるいは領域を分割して割り当てることであり、「割付」ということもある。領域は、区域または区画である。特に、区画のサイズを互いに異なる2のべき乗の和で表したとき該和を構成する各2のべき乗のサイズの領域をそのサイズの順に区画に連続的に割り付けることで区画を区分けすることを「主区分」という。また、主区分により割り付けられた区域を「主区域」という。主区分は、本発明においては、区画に対する初期割付である。以下の説明では、主区域は領域の先頭からサイズの大きいものから順に割り付けられるものとしているが、それとは逆順に、サイズの小さいものから順に割り付けるものとしても本願発明を実施可能であることは、後の説明から当業者には明らかである。
Hereinafter, the terms relating to the areas and the terms relating to the corresponding sections will be defined and compared.
“Division” means that an area is assigned or an area is divided and assigned, and is sometimes called “assignment”. A region is an area or section. In particular, when the size of a partition is expressed by a sum of powers of two different from each other, partitioning the partition by sequentially allocating each region of the power of 2 that constitutes the sum in the order of the size. It is called “Main Category”. In addition, the area assigned by the main division is called “main area”. In the present invention, the main division is an initial allocation for a partition. In the following description, it is assumed that the main area is assigned in order from the largest size from the top of the area, but it is possible to implement the present invention even in the reverse order, in order from the smallest size. It will be apparent to those skilled in the art from the following description.
図2Aの例示では、区画690は全体のサイズが11であり、サイズが2=8の主区域698、サイズが2=2の主区域692、及びサイズが2=1の主区域691に区分されている。いいかえれば、主区域698、692、691が区画690に初期割付されている。
区分または主区分による区域または主区域の割付サイズである2のべき乗のべき数を「区分レベル」という。図2Aに示す主区域698、692、691のそれぞれの区分レベルは3,1,0である。
上記定義された用語により説明すると、本発明の原理である区画管理方法は、区画を、区画の割当単位領域を互いに異なる2のべき乗個割り当てた区域に連続的に区分し、区域を連続的に割り付けたものとして管理する。
In the illustration of FIG. 2A, the partition 690 has an overall size of 11, a main area 698 of size 2 3 = 8, a main area 692 of size 2 1 = 2 and a main area 691 of size 2 0 = 1. It is divided into. In other words, main areas 698, 692, 691 are initially assigned to section 690.
The number of powers of 2 that is the area or the allocation size of the main area by the section or the main section is referred to as “section level”. Each division level of the main areas 698, 692, 691 shown in FIG. 2A is 3,1,0.
Explaining in terms of the above defined terms, the partition management method, which is the principle of the present invention, divides a partition continuously into sections in which the allocation unit areas of the sections are assigned to different powers of two, and the sections are continuously Manage as assigned.
 図2Aには、さらに区画690の多層区分に対応するツリー構造体群790と、ツリー構造体群790のノードに対応する割付状態をビットマップに縮退した区域の割付状態を示すビットマップ600が記述されている。 FIG. 2A further describes a tree structure group 790 corresponding to the multilayer section of the partition 690, and a bitmap 600 indicating the allocation state of the area in which the allocation state corresponding to the node of the tree structure group 790 is reduced to a bitmap. Has been.
 ツリー構造体群790は、主区域698を割り付ける主区分に対応するノード680をルートノードとするツリー、主区域692を割り付ける主区分に対応するノード624をルートノードとするツリー、及び主区域691を割り付ける主区分に対応するノード6110をルートノードとするツリーから構成されている。すなわち、ルートノード680は、点線の矢印788で示すように、区分レベル3の主区域698全体を割り付ける主区分(以下、主区分788ということがある。)に対応し、ルートノード624は、点線の矢印782で示すように、区分レベル1の主区域692全体を割り付ける主区分(以下、主区分782ということがある。)に対応し、ルートノード6110は、点線の矢印781で示すように、区分レベル0の主区域691全体を割り付ける主区分(以下、主区分781ということがある。)に対応する。それぞれのツリーの構造は、図1Bに記載されたツリー構造体580の構造と2分木ツリーであるという点で類似したものである。 The tree structure group 790 includes a tree having a node 680 corresponding to the main section to which the main area 698 is allocated as a root node, a tree having a node 624 corresponding to the main section to which the main area 692 is allocated as a root node, and a main area 691. It is composed of a tree having a node 6110 corresponding to the main section to be assigned as a root node. That is, the root node 680 corresponds to a main section (hereinafter, also referred to as a main section 788) that assigns the entire main section 698 of the section level 3 as indicated by a dotted arrow 788, and the root node 624 is a dotted line. As shown by an arrow 782, the root node 6110 corresponds to a main section (hereinafter, also referred to as a main section 782) that allocates the entire main area 692 of the section level 1, This corresponds to a main division (hereinafter, also referred to as a main division 781) in which the entire main area 691 of the division level 0 is allocated. The structure of each tree is similar to that of the tree structure 580 described in FIG. 1B in that it is a binary tree.
ルートノード680内に記載された“8”は、対応する主区域698のサイズに相当する。また、括弧内の数字は、区画690を各区分レベルの区域毎に多層区分する個々の区分(区分ユニットということがある。)を識別する区分番号である。最大のサイズの主区域698に対応する主区分788の区分番号は0である。なお、以下においては、区分番号について、その区分番号で識別される区分により区分された区域の区分番号ということがある。すなわち、主区分788の区分番号という表現に変えて、主区域698の区分番号ということがある。また、ある区分番号の区分ユニットにより区分された区域を、その区分番号の区域ということがある。 “8” described in the root node 680 corresponds to the size of the corresponding main area 698. The numbers in parentheses are division numbers for identifying individual divisions (sometimes referred to as division units) for dividing the division 690 into multiple divisions for each division level. The section number of the main section 788 corresponding to the largest size main section 698 is 0. In the following, the division number may be referred to as a division number of an area divided by the division identified by the division number. That is, instead of the expression of the section number of the main section 788, it may be referred to as the section number of the main section 698. In addition, an area divided by a division unit having a certain division number may be referred to as an area having the division number.
 ルートノード680にリンク740で接続されたノード640と、ルートノード680にリンク741で接続されたノード641は、主区域698を2分割して区分レベル2、サイズが4の区域を割り付ける区分に対応する。それぞれの区分番号は1つ上位の区分レベル3のノードに対応する区分番号の末尾である0に続く1と2である。 The node 640 connected to the root node 680 via the link 740 and the node 641 connected to the root node 680 via the link 741 correspond to the division in which the main area 698 is divided into two and the area of division level 2 and size 4 is allocated. To do. Each partition number is 1 and 2 following 0 which is the end of the partition number corresponding to the node of partition level 3 that is one level higher.
 ノード640の下位には、リンク720で接続されたサイズ2のノード620と、リンク721で接続されたサイズ2のノード621が存在する。同様に、ノード641の下位には、リンク722で接続されたサイズ2のノード622と、リンク723で接続されたサイズ2のノード623が存在する。これら4つのノードは区分レベル1の区域の区分に対応する。また、これら4つのノードに対応する区分番号は、1つ上位の区分レベルである区分レベル2のノードに対応する区分番号の末尾の番号である2に続く3~6である。 Below the node 640 are a size 2 node 620 connected by a link 720 and a size 2 node 621 connected by a link 721. Similarly, a size 2 node 622 connected by a link 722 and a size 2 node 623 connected by a link 723 exist below the node 641. These four nodes correspond to the divisions of the division level 1 area. Also, the division numbers corresponding to these four nodes are 3 to 6 following 2 which is the last number of the division number corresponding to the node of the division level 2 which is the next higher division level.
 ノード620の下位には、リンク710で接続されたサイズ1のノード610と、リンク711で接続されたサイズ1のノード611が存在する。同様に、ノード621の下位には、リンク712で接続されたサイズ1のノード612と、リンク713で接続されたサイズ1のノード613が存在し、ノード622の下位には、リンク714で接続されたサイズ1のノード614と、リンク715で接続されたサイズ1のノード615が存在し、ノード623の下位には、リンク716で接続されたサイズ1のノード616と、リンク717で接続されたサイズ1のノード617が存在する。これら8つのノードは区分レベル0の区域の区分に対応する。また、これら8つのノードに対応する区分番号は、ルートノードをノード680とするツリーにおける1つ上位の区分レベルである区分レベル1のノードに対応する区分番号の末尾の番号に続く、主区分782に対応するツリーのルートノードであって区分レベルが3のノードに対応する区分番号の末尾の番号にさらに続く8~15である。 Below the node 620, a size 1 node 610 connected by a link 710 and a size 1 node 611 connected by a link 711 exist. Similarly, a size 1 node 612 connected by a link 712 and a size 1 node 613 connected by a link 713 exist below the node 621, and a node 622 connects by a link 714. A size 1 node 614 connected by a link 715 and a size 1 node 616 connected by a link 716 and a size connected by a link 717. There is one node 617. These eight nodes correspond to the division of the division level 0 area. The partition numbers corresponding to these eight nodes are the main partition 782 following the number at the end of the partition number corresponding to the node of the partition level 1 that is the partition level one higher in the tree having the root node as the node 680. 8 to 15 further following the number at the end of the partition number corresponding to the node of the tree corresponding to the root node of the partition level corresponding to 3.
 以下同様に、ルートノード624にリンク718で接続されたノード618と、ルートノード624にリンク719で接続されたノード619は主区域692を2分割して区分レベル0、サイズ1の区域を割り付ける区分に対応する。
ルートノード624の区分番号は、主区分788に対応するツリーの区分レベル1のノードに対応する区分番号の末尾6に続く7である。ノード618の区分番号は、主区分788に対応するツリーの区分レベル0のノードに対応する区分番号の末尾15に続く16であり、ノード618の区分番号はそれに続く17である。
また、サイズが1の主区域691を割り付ける主区分781に対応するツリーは、点線の矢印781で示すように、ルートノードであるノード6110のみで構成される。ノード6110の区分番号は、主区分782に対応するツリーの区分レベル0のノードに対応する区分番号の末尾17に続く18である。
Similarly, the node 618 connected to the root node 624 via the link 718 and the node 619 connected to the root node 624 via the link 719 divide the main area 692 into two parts and assign an area of division level 0 and size 1. Corresponding to
The partition number of the root node 624 is 7 following the end 6 of the partition number corresponding to the node at the partition level 1 of the tree corresponding to the main partition 788. The partition number of node 618 is 16 following the end 15 of the partition number corresponding to the node at partition level 0 of the tree corresponding to main partition 788, and the partition number of node 618 is 17 following it.
Further, the tree corresponding to the main section 781 to which the main area 691 of size 1 is assigned is configured only by the node 6110 that is the root node, as indicated by the dotted arrow 781. The partition number of the node 6110 is 18 following the end 17 of the partition number corresponding to the node at the partition level 0 of the tree corresponding to the main partition 782.
次に、本発明の一実施の形態による区分番号の性質について説明する。
まず、記憶管理の対象となる区画のサイズが与えられると、そのサイズに応じて主区分が行われ、さらに区分レベル毎に多層区分が行われる。図2Aの例では、サイズが11の区画690が与えられると、それに対応したツリー構造体群790を生成することができる。そして、ツリー構造体群の最上位の区分レベルのノードから下位のノードに向かって、同一区分レベル内では左側を若番として、図2Aに示すように一意に区分番号を付与することができる。
Next, the property of the division number according to the embodiment of the present invention will be described.
First, when the size of a partition subject to storage management is given, main division is performed according to the size, and multilayer division is performed for each division level. In the example of FIG. 2A, when a partition 690 having a size of 11 is given, a tree structure group 790 corresponding to the partition 690 can be generated. Then, from the node at the highest partition level of the tree structure group to the lower node, the left side is a young number within the same partition level, and a partition number can be uniquely assigned as shown in FIG. 2A.
そして、区分レベル毎の区分番号を管理することにより、区分番号が与えられると、その区分番号で識別される区分ユニットによって区分けされた区域のサイズである区分レベルを求めることができ、さらに、その区分レベルでの先頭の区分番号と当該区分番号との差に基づいて、前記区分ユニットによる割付対象となる区域の区画上の位置を求めることができる。 Then, by managing the division number for each division level, given the division number, the division level that is the size of the area divided by the division unit identified by the division number can be obtained. Based on the difference between the first division number at the division level and the division number, the position on the division of the area to be allocated by the division unit can be obtained.
 図2Aに示すビットマップ600は、点線の矢印で示すように、ツリー構造体群780の各ノードに対応する割付状態をビットマップに縮退したビット値を持つものである。図2Aの例示では、各ノードに2ビットの値が対応している。ビットマップ600のビット値については後に詳細に説明する。ここでは、図2Aの例示については、以下に簡単に説明する。 The bitmap 600 shown in FIG. 2A has a bit value obtained by reducing the allocation state corresponding to each node of the tree structure group 780 to a bitmap, as indicated by a dotted arrow. In the example of FIG. 2A, a 2-bit value corresponds to each node. The bit value of the bitmap 600 will be described in detail later. Here, the illustration of FIG. 2A will be briefly described below.
ビットマップ600のビット値は、各区分番号を有するノードに対応する区域の初期割付終了時の割付状態を表している。符号608で示す区分レベル3のビット位置であって、区分レベル3の区分番号609の値が0であるビット位置のビット値00は、区分番号0の区分による区域が空であるのを示すものである。符号604で示す区分レベル2のビット位置であって、区分番号1、2のビット値10は、該当する区域の割付状態が保留であることを示している。同様に、符号602で示す区分レベル1の区分番号3~6をビット位置とするビット値は、該当する区域の割付状態が保留であり、区分番号7をビット位置とするビット値は、該当する区域の割付状態が空であることを示している。また、符号601で示す区分レベル0の区分番号8~17をビット位置とするビット値は、該当する区域の割付状態が保留であり、区分番号18をビット位置とするビット値は、該当する区域の割付状態が空であることを示している。 The bit value of the bitmap 600 represents the allocation state at the end of the initial allocation of the area corresponding to the node having each division number. The bit position 00 of the division level 3 indicated by the reference numeral 608 and having the division level 3 division number 609 value of 0 indicates that the area of the division number 0 division is empty. It is. The bit position 10 of the division level 2 indicated by reference numeral 604 and having the division numbers 1 and 2 indicates that the allocation state of the corresponding area is pending. Similarly, the bit value having the division number 3 to 6 of the division level 1 indicated by the reference numeral 602 as the bit position is the reserved state of the corresponding area, and the bit value having the division number 7 as the bit position is applicable. Indicates that the allocation status of the area is empty. In addition, the bit values having the bit numbers of the division numbers 8 to 17 of the division level 0 indicated by the reference numeral 601 indicate that the allocation state of the corresponding area is pending, and the bit values having the bit number of the division number 18 are the corresponding area. Indicates that the allocation state of is empty.
 割付状態の空と保留の区別は、割付要求のサイズの空領域を割り付けるときの優先順位に関係する。つまり、実質的に空状態の領域であっても、割付状態が空のものから使用されるようにする。この詳細については、後に説明する。 The distinction between empty and pending in the allocation state is related to the priority when allocating an empty area of the allocation request size. That is, even if the area is substantially empty, the assigned state is used from the empty state. Details of this will be described later.
 図2Bは、本発明の一実施形態に係るアロケーションシステムのソフトウェア及びハードウェア環境例を説明する図である。アロケーションシステム100は初期化部101と多層区分管理部102から構成される。初期化及び多層区分管理については、後に詳細に説明する。 FIG. 2B is a diagram illustrating an example of software and hardware environment of the allocation system according to the embodiment of the present invention. The allocation system 100 includes an initialization unit 101 and a multi-layer division management unit 102. Initialization and multi-layer division management will be described in detail later.
 初期化部101は、例えばディスクアロケータあるいはファイルシステムの初期化部のような初期化プログラム201からの区画サイズを含む初期化要求を受け付け、データ格納装置308を構成する、例えば主記憶装置305、外部記憶装置306、通信装置を介してアクセスする遠方の記憶装置307等(以下、単に記憶装置ということがある。)に割り付けられている区画の多層区分管理情報の初期化を行う。 The initialization unit 101 receives an initialization request including a partition size from an initialization program 201 such as a disk allocator or an initialization unit of a file system, and configures a data storage device 308, for example, a main storage device 305, an external It initializes the multi-layer division management information of the partitions allocated to the storage device 306, the remote storage device 307 accessed via the communication device (hereinafter also simply referred to as storage device).
 多層区分管理部102は、ファイルシステム202からの割付要求サイズを含む区域の割付要求により、多層区分管理情報の書込を行うことで区画の区分、すなわち区域の分割割付を実行し、書き込んだ多層区分管理情報を読み出して割付区分番号を含む割付結果をファイルシステム202に返す。 The multi-layer division management unit 102 executes division division, that is, division division allocation by writing the multi-layer division management information in response to the area allocation request including the allocation request size from the file system 202, and the written multi-layer The division management information is read and an allocation result including the allocation category number is returned to the file system 202.
 ファイルシステム202は、アプリケーションプログラム/OSなどのファイルを利用するシステム200からのファイル操作要求を受け付け、そのファイル操作要求がファイルへの区域の割付を要するものであれば、上述のアロケーションシステム100の多層区分管理部102に割付要求サイズを含む割付要求を行って割付結果を受け取り、割付区分番号としてアロケーションシステム100の多層区分管理部から返された区分番号を指定してファイル操作システム203に対してファイルの操作要求を行う。ファイル操作システム203は指定された区分番号により多層区分管理部102から割り付けられた区域のアドレスを取得して記憶装置に格納されたファイルに対するファイル操作としてのデータの書込あるいはデータの読出を実行して操作結果をファイルシステム202に返す。ファイルシステム202はファイル操作システム203から返された操作結果をアプリケーションプログラム/OSなどのファイルを利用するシステム200にファイル操作応答として返す。 The file system 202 receives a file operation request from the system 200 that uses a file such as an application program / OS, and if the file operation request requires allocation of an area to the file, the file system 202 has a multilayer structure. An allocation request including the allocation request size is made to the category management unit 102, the allocation result is received, the category number returned from the multi-layer category management unit of the allocation system 100 is designated as the allocation category number, and the file is sent to the file operation system 203 Make an operation request. The file operation system 203 acquires the address of the area allocated from the multilayer partition management unit 102 by the specified partition number, and executes data writing or data reading as a file operation on the file stored in the storage device. The operation result is returned to the file system 202. The file system 202 returns the operation result returned from the file operation system 203 as a file operation response to the system 200 using a file such as an application program / OS.
 ファイルシステム202及びファイル操作システム203が既存のものであっても、本発明によるアロケーションシステム100とのインターフェースを調整することにより、本発明によるアロケーションシステム100が使用可能である。また、アプリケーションプログラム/OSなどのファイルを利用するシステム200はいうに及ばず、初期化プログラム201も同様に既存のものを適用可能である。したがって、これらのプログラム、システムについての説明は省略する。 Even if the file system 202 and the file operation system 203 are existing, the allocation system 100 according to the present invention can be used by adjusting the interface with the allocation system 100 according to the present invention. In addition to the system 200 that uses a file such as an application program / OS, the initialization program 201 can be applied as well. Therefore, descriptions of these programs and systems are omitted.
 図2Cは、本発明の一実施形態におけるハードウェア構成例を説明する図である。
 本発明の一実施形態による記憶装置の区画管理及びファイルへの区域の割付及び解放処理は中央処理装置302及びキャッシュメモリ303を少なくとも備えたデータ処理装置301によりデータ格納装置308を用いて実施される。データ格納装置308については、後に説明する区分レベルごとの区域を多層的に管理する多層区分管理表309と区分ごとの割付状態を保持する多層区分割付表310及び管理対象である区画311を含む。図2Cに示すように、データ格納装置308は、主記憶装置305または外部記憶装置306、あるいはそれらの組み合わせで実現することができ、あるいは通信装置307を介して接続された遠方に配置された装置を用いることも可能である。
FIG. 2C is a diagram illustrating an exemplary hardware configuration according to an embodiment of the present invention.
According to one embodiment of the present invention, partition management of a storage device and allocation and release processing of an area to a file are performed by a data processing device 301 including at least a central processing unit 302 and a cache memory 303 using a data storage device 308. . The data storage device 308 includes a multi-layered division management table 309 for managing a multi-layered division level, which will be described later, a multi-layered division table 310 for holding an allocation state for each division, and a partition 311 to be managed. As shown in FIG. 2C, the data storage device 308 can be realized by the main storage device 305 or the external storage device 306, or a combination thereof, or a device disposed at a remote location connected via the communication device 307. It is also possible to use.
 すなわち、主記憶装置305をデータ処理装置301内のものとすることもできるし、多層区分割付表310及び多層区分管理表309は主記憶装置305に持ち、区画311は外部記憶装置306に割り当てられるのが多くの場合と考えられるが、区画が、主記憶装置305に割り当てられる場合でも本発明が適用可能であることは、後の説明から明らかである。
 図2Cの例示では、主記憶装置305、外部記憶装置306及び通信装置307が一本のバス304によりデータ処理装置301に接続されているが、接続方法はこれに限るものではない。
また、特に図示されてはいないが、処理の途中で得られた各種の値を後の処理で用いるためにそれぞれの処理に応じた一時記憶領域が用いられることは当然である。そして、以下の説明においては、一時記憶領域に格納されるあるいは設定されるデータの名前でその一時記憶領域の名前とすることがあり、逆に、一時記憶領域の名前により、その一時記憶領域の格納されるあるいは設定されるデータの名前とすることがある。
That is, the main storage device 305 can be the one in the data processing device 301, the multi-layer partitioning table 310 and the multi-layer partition management table 309 are held in the main storage device 305, and the partition 311 is assigned to the external storage device 306. However, it will be apparent from the following description that the present invention is applicable even when a partition is assigned to the main storage device 305.
In the example of FIG. 2C, the main storage device 305, the external storage device 306, and the communication device 307 are connected to the data processing device 301 by one bus 304, but the connection method is not limited to this.
Although not particularly illustrated, it is natural that a temporary storage area corresponding to each process is used in order to use various values obtained during the process in a later process. In the following description, the name of the temporary storage area may be the name of the data stored or set in the temporary storage area. Conversely, the name of the temporary storage area May be the name of the data to be stored or set.
 次に、図3、図4A~図4Cを参照して、本発明の一実施形態における多層区分管理情報の初期化について説明する。なお、多層区分管理情報の初期化を区画の初期化と表記する場合もある。 Next, with reference to FIG. 3 and FIGS. 4A to 4C, initialization of multi-layer division management information in an embodiment of the present invention will be described. Note that initialization of the multi-layer division management information may be referred to as division initialization.
 図3は、区画サイズに対応した区画の初期化状態例を示す説明図である。
 先に図2Bの説明において述べたように、区画の初期化は、ファイルシステムに区画が割りつけられたのち、初期化プログラムからのその区画の区画サイズを含む初期化要求を受け付けることにより、アロケーションシステムの初期化部により行われる。図3に示す区画サイズ120には、そのファイルシステムに割り付けられ、区画311の初期化要求に含まれる区画サイズ“52”が2進数の形式で表示されており、52=2+2+2であるから、2ビット目、4ビット目及び5ビット目が“1”である。
FIG. 3 is an explanatory diagram illustrating an example of an initialization state of a partition corresponding to the partition size.
As described above with reference to FIG. 2B, partition initialization is performed by allocating a partition to the file system and then receiving an initialization request including the partition size of the partition from the initialization program. This is done by the system initialization unit. In the partition size 120 shown in FIG. 3, the partition size “52” allocated to the file system and included in the initialization request for the partition 311 is displayed in binary format, and 52 = 2 5 +2 4 +2 2 Therefore, the second bit, the fourth bit, and the fifth bit are “1”.
この初期化プログラムから受信された区画サイズに応じて区画構成主区分表130が作成される。区画構成主区分表130は、その添字0~7で示すように区分レベルに対応する1ビットからなるエントリから構成されており、図3の例示では、区分レベル0から最上位の区分レベル7に対応する8つのエントリを有している。矢印122,124及び125で示すように、区画サイズを2進数形式で表示したときのビット値に応じて、対応する区分レベルのエントリのビット値が設定されている。 The partition configuration main partition table 130 is created according to the partition size received from the initialization program. The partition configuration main partition table 130 is composed of 1-bit entries corresponding to the partition levels as indicated by the subscripts 0 to 7. In the example of FIG. 3, the partition level 0 is changed from the partition level 0 to the highest partition level 7. It has 8 corresponding entries. As indicated by arrows 122, 124, and 125, the bit value of the corresponding partition level entry is set according to the bit value when the partition size is displayed in binary format.
図3に示す区画311には、区画構成主区分表130からの矢印135、134及び132により対応関係が示されているように、区画構成主区分表130のビット値が“1”であるエントリに対応する区分レベルのサイズの主区域185、184及び182が初期割付されている。
なお、主区域に対応する区分レベルを主区分レベルということもある。すなわち, 区画構成主区分表130は、ビット値1で主区分レベルを表示するものと言える。
In the partition 311 shown in FIG. 3, as indicated by the arrows 135, 134 and 132 from the partition configuration main partition table 130, the entry whose bit value is “1” in the partition configuration main partition table 130 Main sections 185, 184, and 182 of the partition level size corresponding to are initially allocated.
In addition, the division level corresponding to the main area may be called the main division level. That is, it can be said that the partition configuration main partition table 130 displays the main partition level with the bit value 1.
多層区分管理表309は、図3に示すように、主区分番号管理表309a、先頭番号管理表309b、及び総区分数管理表309cを含む。主区分番号管理表309aと先頭番号管理表309bは、その添字0~7で示すように、区画構成主区分表130と同様に区分レベルに対応するエントリから構成されている。主区分番号管理表309aのエントリは主区分番号114で構成され、先頭番号管理表309bのエントリは、先頭番号116で構成される。各エントリの値は、区画構成主区分表130の値に基づいて、初期化処理において設定される。総区分数管理表309cには、初期化対象の区画のサイズに対応して区分された区分ユニットの総数である総区分数115が設定される。別の言い方をすれば、総区分数115には、区分レベル毎に各区分レベルのサイズに区分けされた区域数の総和が設定される。図2Aの例では、区分番号0~18に対応した19が設定される。図3に示す例では、区分番号0~100に対応した101が設定されている。 As shown in FIG. 3, the multi-layer division management table 309 includes a main division number management table 309a, a head number management table 309b, and a total division number management table 309c. As shown by the subscripts 0 to 7, the main partition number management table 309a and the head number management table 309b are configured by entries corresponding to the partition levels as in the partition configuration main partition table 130. An entry in the main division number management table 309a is composed of the main division number 114, and an entry in the top number management table 309b is composed of the top number 116. The value of each entry is set in the initialization process based on the value of the partition configuration main division table 130. The total number of partitions management table 309c is set with a total number of partitions 115 that is the total number of partition units that are partitioned in accordance with the size of the partition to be initialized. In other words, the total number of sections 115 divided into the size of each section level is set for each section level in the total section number 115. In the example of FIG. 2A, 19 corresponding to the division numbers 0 to 18 is set. In the example shown in FIG. 3, 101 corresponding to the division numbers 0 to 100 is set.
主区分番号114には、後に説明する多層区分割付表310が、ある区分レベルの主区分に対応するエントリを有するとき、その区分レベルのエントリにその主区分に対応する区分番号を格納し、ある区分レベルでは多層区分割付表310が主区分に対応するエントリを有さないとき、その区分レベルのエントリに無意の区分番号として“-1”を格納する。図3の例では、主区分番号114の各エントリの値は、上位の区分レベルから、-1,-1,0,3,-1,22,-1,-1である。 In the main division number 114, when the multi-layer division table 310 described later has an entry corresponding to a main division of a certain division level, the division number corresponding to the main division is stored in the entry of the division level. At the division level, when the multi-layer division table 310 does not have an entry corresponding to the main division, “−1” is stored as an unexpected division number in the entry at the division level. In the example of FIG. 3, the value of each entry of the main division number 114 is -1, -1, 0, 3, -1, 22, -1, -1, from the higher division level.
先頭番号116は、多層区分割付表310の各エントリに一意に対応付けられた区分番号のうち各区分レベルの区分割付表の先頭のエントリに対応付けられた区分番号であり、図3に例示された先頭番号116の各エントリの値は、上位の区分レベルから、-1,-1,0,1,4,10,23,49である。これらの値の設定については、後に図4A~図4Cを参照して詳細に説明する。 The head number 116 is a section number associated with the first entry of the section division table at each section level among the section numbers uniquely associated with each entry of the multi-layer section table 310, and is exemplified in FIG. Further, the value of each entry of the leading number 116 is -1, -1, 0, 1, 4, 10, 23, 49 from the higher division level. The setting of these values will be described in detail later with reference to FIGS. 4A to 4C.
多層区分割付表310は、区画311内の領域の割付状態を管理するためのものであり、図2Aに示す割付ビットマップ600と同様のものである。ただし、図3に示すように、多層区分割付表310には、区分番号171に加えてレベル内番号172が対応付けられている。多層区分割付表310は、初期化処理において、多層区分管理表309の値に基づいて生成され、初期設定される。 The multi-layer division table 310 is for managing the allocation state of the area in the partition 311 and is the same as the allocation bitmap 600 shown in FIG. 2A. However, as shown in FIG. 3, the in-level number 172 is associated with the multi-layer division table 310 in addition to the division number 171. The multilayer division table 310 is generated and initialized based on the value of the multilayer division management table 309 in the initialization process.
多層区分割付表310は、図の点線の矢印140~145に示すように、最下位の区分レベルから区画構成主区分表130のビット値が1である最上位の区分レベルまでの各区分レベルに対応した区分割付表160~165から構成されている。
各区分割付表のエントリは、そのエントリに該当する区分番号の区域の2ビットの割付状態170で構成されている。割付状態のビット値“00”、“01”、“10”、“11”は、それぞれ各区分番号の区域の「空」、「空候補」、「保留」、「使用中」の状態に対応する。これらの状態の意味は後に詳細に説明をするが、割付状態170に2ビットを用いることにより、「空候補」を識別することが可能となり、記憶領域を一層無駄なく利用することができる。
As shown by dotted arrows 140 to 145 in the figure, the multi-layered division table 310 is divided into the division levels from the lowest division level to the highest division level where the bit value of the division configuration main division table 130 is 1. It consists of the corresponding division table 160-165.
An entry in each partition allocation table is composed of a 2-bit allocation state 170 of the section of the partition number corresponding to the entry. The bit values “00”, “01”, “10”, “11” in the allocation state correspond to the “empty”, “empty candidate”, “hold”, and “in use” states of the areas of the respective division numbers. To do. Although the meaning of these states will be described in detail later, by using 2 bits for the allocation state 170, “empty candidates” can be identified, and the storage area can be used more efficiently.
また、区分割付表160~165の各エントリは、図3の矢印75、74、72に示すように主区分、すなわち主区域に対応するものと、1つ上位の区分レベルの区域を2つに分割する区分、すなわち1つ上位の区分レベルの区域を2つに分割した区域に対応するものとがある。 In addition, each entry in the division table 160 to 165 has two main divisions, that is, one corresponding to the main division, and two division levels one level higher, as indicated by arrows 75, 74 and 72 in FIG. There is a division to be divided, that is, a division corresponding to an area obtained by dividing an area of an upper division level into two.
多層区分割付表310の各エントリには、最上位の区分レベルの区分割付表165の先頭のエントリから最下位の区分レベルの区分割付表160の末尾のエントリまで0からの連続番号である区分番号171を対応付けることができる。また、区分割付表毎に、先頭のエントリから末尾のエントリまで、0から始まる連続番号であるレベル内番号172を対応付けることができる。先頭番号管理表309bの先頭番号116は、該当する区分レベルにおける区分番号の先頭番号である。 Each entry in the multi-layer partitioning table 310 includes a partition number that is a serial number from 0 from the top entry in the partitioning table 165 at the highest partition level to the last entry in the partitioning table 160 at the lowest partition level. 171 can be associated. Further, for each division table, an in-level number 172 that is a serial number starting from 0 can be associated from the first entry to the last entry. The start number 116 of the start number management table 309b is the start number of the partition number at the corresponding partition level.
先に図2Aを参照して説明したように、区画サイズ、すなわち区画構成主区分表が与えられると、多層区分割付表の構成は一意に決定し、区分番号で識別される区分ユニットにより区分けされる区域の区画内の位置とサイズも一意に決定される。
多層区分割付表310の初期状態においては、矢印75、74、72に示すように、主区域と対応するエントリの割付状態170には空を表示する“00”が、その他のエントリの割付状態には保留を表示する“10”が初期設定される。したがって、割付状態が空の区域についてみると、区画311には、主区域185、184、182が分割割付されており、多層区分割付表310で管理される区域のうちで空の区域を設定するという意味で、区画311は初期割付される。多層区分割付表310の初期設定については、後に図4A~図4Cを参照して詳細に説明する。
As described above with reference to FIG. 2A, when a partition size, that is, a partition configuration main partition table is given, the configuration of the multi-layer partition table is uniquely determined and is partitioned by the partition unit identified by the partition number. The location and size of the area to be determined is also uniquely determined.
In the initial state of the multi-layered division table 310, as indicated by arrows 75, 74, and 72, "00" indicating empty is displayed in the allocation status 170 of the entry corresponding to the main zone, and the allocation status of the other entries. Is initially set to “10” for displaying the hold. Therefore, in the case of an area where the allocation state is empty, the main area 185, 184, 182 is divided and assigned to the area 311, and an empty area is set among the areas managed in the multi-layered area division table 310. In this sense, the partition 311 is initially allocated. The initial setting of the multi-layer division table 310 will be described in detail later with reference to FIGS. 4A to 4C.
なお、上述の区分番号171とレベル内番号172の番号の付与方法は単なる例示であり、後述のファイルの割付管理が可能なものであれば、例えば先頭の番号を0ではなく1とする、番号の付与順を逆順にする等、種々変形が可能であることは、当業者にとって自明である。
以上説明したとおり、本発明によれば、ファイルシステムに割り当てられた区画311は、多層区分割付表310を用いて、同一の領域を区分レベルに応じた割付状態170により、多層的に管理される。
Note that the above-described method of assigning the division number 171 and the in-level number 172 is merely an example, and if the file allocation management described later is possible, for example, the first number is set to 1 instead of 0. It will be apparent to those skilled in the art that various modifications are possible, such as reversing the order of application.
As described above, according to the present invention, the partition 311 assigned to the file system is managed in a multi-layered manner by using the multi-partition partitioning table 310 and the allocation state 170 corresponding to the partition level for the same area. .
多層区分割付表310を用いた区域の割付は、割付要求のサイズに応じて、ある区分レベルの空区域あるいは異なる区分レベルの連続した空区域の区分番号を多層区分割付表の探索により取得し、その区分番号を使用中にすることにより行われる。空区域がない場合は、空候補の区域を探索する。
図2Bに示すように、ファイルの割付要求をしたファイルシステムには使用中とした区分番号が割付区分番号としてアロケーションシステムから返される。ファイル操作システムはこの区分番号を指定したファイル操作要求を受けると多層区分管理部からこの区分番号の区域のアドレス情報を受信する。多層区分管理部は区分番号により多層区分管理表309を探索し、区分番号に対応する区域の区分レベルとレベル内番号を取得し、それによりファイルに割り付けられた区域の区画内の位置とサイズを知ることができる。これらの処理については後に詳細に説明する。
According to the allocation of the area using the multi-layer partitioning table 310, according to the size of the allocation request, the division number of an empty area of a certain division level or a continuous empty area of a different division level is obtained by searching the multi-layer partitioning table, This is done by setting the division number in use. If there is no empty area, an empty candidate area is searched.
As shown in FIG. 2B, the file system that has requested the file allocation returns the segment number that is in use as the allocation segment number from the allocation system. When the file operation system receives a file operation request designating this partition number, the file operation system receives address information of the section of this partition number from the multi-layer partition management unit. The multi-layer division management unit searches the multi-layer division management table 309 by the division number, obtains the division level and the intra-level number of the area corresponding to the division number, and thereby determines the position and size in the division of the area assigned to the file. I can know. These processes will be described in detail later.
 次に、図4A、図4B及び図4Cを参照して区画を初期化する処理を説明する。ここで区画を初期化する処理は、具体的には例えば図3に示す多層区分管理表309と多層区分割付表310の値を初期設定する処理である。以下では、例として多層区分管理表309と多層区分割付表310を参照して説明する。 Next, a process for initializing a partition will be described with reference to FIGS. 4A, 4B, and 4C. Here, the processing for initializing the partitions is specifically processing for initializing the values of the multilayer partition management table 309 and the multilayer partition partitioning table 310 shown in FIG. 3, for example. In the following, description will be made with reference to the multi-layer division management table 309 and the multi-layer division table 310 as an example.
図4Aは、区画を初期化する前段の処理フロー例を説明する図である。
 図4Aに示すように、まず、ステップS401で、区画の初期化を要求するプログラムから受け取った区画サイズから、区画サイズを2進数形式で表示したときのビット値に応じて区分レベルのエントリのビット値が設定された区画構成主区分表を作成する。
FIG. 4A is a diagram illustrating an example of a processing flow in the previous stage for initializing a partition.
As shown in FIG. 4A, first, in step S401, from the partition size received from the program requesting partition initialization, the bit of the partition level entry according to the bit value when the partition size is displayed in binary format. Create a partition main partition table with values set.
 次にステップS402で、主区分レベルに区画構成主区分表の最上位の区分レベルを設定し、ステップS403で、総区分数管理表の総区分数に初期値として値0を設定して、ステップS404に進む。図3に示す例では、区画構成主区分表130が作成され、主区分レベルには7が設定される。上述のステップS402における、区画構成主区分表の最上位の区分レベルが設定される主区分レベルは、先に述べた図示しない一時的記憶領域の1つの例である。 Next, in step S402, the highest partition level of the partition configuration main partition table is set as the main partition level, and in step S403, the total number of sections in the total partition number management table is set to 0 as an initial value. The process proceeds to S404. In the example shown in FIG. 3, a partition configuration main partition table 130 is created, and 7 is set as the main partition level. The main partition level in which the highest partition level of the partition configuration main partition table in step S402 is set is an example of the temporary storage area (not shown) described above.
 ステップS404では、主区分レベルの指す区画構成主区分表のビット値を取り出し、ステップS405で、その取り出したビット値が有意、すなわち値1であるか判定する。
 上記取り出したビット値が1でなければステップS406に分岐し、主区分レベルの指す主区分番号管理表に値“-1”を設定し、次にステップS407で、主区分レベルの指す先頭番号管理表に値“-1”を設定し、ステップS408で、主区分レベルを1つ減らしてステップS404に戻る。
 上記ステップS404~ステップS408のループ処理を、ステップS405で初めて区画構成主区分表のビット値が有意であると判定されるまで繰り返す。図3に示す例では、主区分レベルが5に設定されるまでは区画構成主区分表のビット値は0であるから、このループ処理により、主区分番号管理表309aと先頭番号管理表309bの区分レベル7と区分レベル6にはともに値“-1”が設定される。
In step S404, the bit value of the partition configuration main partition table pointed to by the main partition level is extracted. In step S405, it is determined whether or not the extracted bit value is significant, that is, a value of 1.
If the extracted bit value is not 1, the process branches to step S406, the value “−1” is set in the main partition number management table pointed to by the main partition level, and then in step S407, the head number management pointed to by the main partition level is set. A value “−1” is set in the table, and the main division level is decreased by 1 in step S408, and the process returns to step S404.
The loop processing from step S404 to step S408 is repeated for the first time in step S405 until it is determined that the bit value of the partition configuration main division table is significant. In the example shown in FIG. 3, since the bit value of the partition configuration main partition table is 0 until the main partition level is set to 5, this loop process causes the main partition number management table 309a and the head number management table 309b to be The value “−1” is set for both the division level 7 and the division level 6.
 一方、上記取り出したビット値が1であれば、ステップS409に進み、先頭番号に値“0”を設定し、ステップS410で、区分数に値“1”を設定して図4Bに示すステップS411に進む。上述のステップS409の先頭番号及びステップS410の区分数も、先に述べた図示しない一時的記憶領域の例である。それぞれ、データの名前を一時的記憶領域の名前としている。 On the other hand, if the extracted bit value is 1, the process proceeds to step S409, the value “0” is set as the head number, the value “1” is set as the number of sections in step S410, and step S411 shown in FIG. Proceed to The head number in step S409 and the number of sections in step S410 are also examples of the temporary storage area (not shown) described above. In each case, the name of the data is the name of the temporary storage area.
 図4Bは、区画を初期化する後段の処理フロー例を説明する図である。
 ステップS411では、主区分番号に、先頭番号に区分数を加えて1を減じた値を設定する。ステップS411の最初の処理においては、区分数にはステップS410の処理により1が設定されており、それ以後の処理においては、後記ステップS423の処理によりその値が設定されている。
FIG. 4B is a diagram illustrating an example of a subsequent processing flow for initializing a partition.
In step S411, a value obtained by adding 1 to the main number and subtracting 1 is set to the main division number. In the first process of step S411, 1 is set to the number of sections by the process of step S410, and in the subsequent processes, the value is set by the process of step S423 described later.
 次にステップS412において、主区分レベルの指す主区分番号管理表に、主区分番号を設定し、ステップS413で、主区分レベルの指す先頭番号管理表に、先頭番号を設定する。図3の例示におけるステップS412及びステップS413の最初の処理では、主区分番号管理表309aと先頭番号管理表309bの区分レベル5にそれぞれ0が設定される。 Next, in step S412, the main division number is set in the main division number management table pointed to by the main division level, and in step S413, the head number is set in the head number management table pointed to by the main division level. In the first processing of step S412 and step S413 in the illustration of FIG. 3, 0 is set to the division level 5 of the main division number management table 309a and the head number management table 309b, respectively.
 次にステップS414に進み、主区分レベルの指す区分レベルの多層区分割付表の割付状態を初期化する。ステップS414の処理の詳細は、後に図4Cを参照して説明する。 Next, proceeding to step S414, the allocation state of the multi-level partitioning table at the partition level indicated by the main partition level is initialized. Details of the processing in step S414 will be described later with reference to FIG. 4C.
 次にステップS415において、総区分数管理表の総区分数に、ステップS414で得た区分数を加え、ステップS416に進む。
 ステップS416では、主区分レベルは最下位の区分レベルか判定し、最下位の区分レベルであれば処理を終了し、最下位の区分レベルでなければステップS417に分岐する。
 ステップS417では、主区分レベルを1つ減らし、ステップS418で先頭番号に区分数を加え、ステップS419で区分数を2倍にしてステップS420に進む。
In step S415, the number of sections obtained in step S414 is added to the total number of sections in the total section number management table, and the process proceeds to step S416.
In step S416, it is determined whether the main division level is the lowest division level. If it is the lowest division level, the process ends. If it is not the lowest division level, the process branches to step S417.
In step S417, the main division level is decreased by one, the number of divisions is added to the top number in step S418, the number of divisions is doubled in step S419, and the flow proceeds to step S420.
 ステップS420では、主区分レベルの指す区分レベルの区画構成主区分表のビット値を取り出し、ステップS421で、その取り出したビット値が有意、すなわち値1であるか判定する。ステップS420で取り出した主区分レベルの指す区画構成主区分表のビット値が有意でなければステップS422に分岐して主区分番号に値“-1”を設定してステップS412に戻り、有意であれば、ステップS423に分岐して、区分数に1を加えてステップS411に戻る。
 上記ステップS411~ステップS423のループ処理を、ステップS416で主区分レベルは最下位の区分レベルであると判定されるまで繰り返す。その際、主区分レベルの指す区分レベルの区画構成主区分表のビットが無為ビット、すなわちそのビット値が“0”であれば、上述のとおり、その区分レベルの主区分番号には値“-1”を設定する。
In step S420, the bit value of the partition configuration main partition table at the partition level indicated by the main partition level is extracted. In step S421, it is determined whether the extracted bit value is significant, that is, the value 1. If the bit value of the partition configuration main partition table pointed to by the main partition level extracted in step S420 is not significant, the process branches to step S422, sets the value “−1” in the main partition number, and returns to step S412. For example, it branches to step S423, adds 1 to the number of divisions, and returns to step S411.
The loop processing from step S411 to step S423 is repeated until it is determined in step S416 that the main division level is the lowest division level. At this time, if the bit of the partition configuration main partition table of the partition level pointed to by the main partition level is a bitless bit, that is, the bit value is “0”, the main partition number of the partition level has the value “−” as described above. 1 ”is set.
図3に示す例では、先頭番号管理表309bの区分レベル4には1が設定され、主区分番号管理表309aの区分レベル4には、ステップS411の2度目の処理において、先頭番号1と区分数3の和から1を減じた3が設定される。また、先頭番号管理表309bの区分レベル3には区分レベル4の先頭番号1に区分数3を加えた4が設定され、主区分番号管理表309aの区分レベル4には、ステップS422の処理において、-1が設定される。以下同様に、主区分番号管理表309aの区分レベル2、1、0には、それぞれ22、-1、-1が設定される。また、先頭番号管理表309bの区分レベル2、1、0には、それぞれ10、23、49が設定され、総区分数管理表309cには、101が設定される。 In the example shown in FIG. 3, 1 is set in the division level 4 of the head number management table 309b, and the division level 4 of the main division number management table 309a is set to the head number 1 and the division in the second processing in step S411. 3 is set by subtracting 1 from the sum of Equation 3. In addition, the division level 3 of the head number management table 309b is set to 4 which is obtained by adding the number of divisions 3 to the head number 1 of the division level 4, and the division level 4 of the main division number management table 309a is set in the process of step S422. −1 is set. In the same manner, 22, -1, and -1 are set in the division levels 2, 1, and 0 of the main division number management table 309a, respectively. Further, 10, 23, and 49 are set in the division levels 2, 1, and 0 of the head number management table 309b, respectively, and 101 is set in the total division number management table 309c.
図4Cは、本発明の一実施形態における、多層区分割付表を区分レベル毎に初期化する処理フロー例を説明する図である。図4Cに例示する処理フローにより、多層区分割付表を構成する最下位の区分レベルから区画構成主区分表のビット値が1である最上位の区分レベルまでの各区分レベルに対応した区分割付表を初期化する。図3の例では、区分割付表160~165それぞれの値を図示した値に設定する処理である。図4Bに示すステップS411~ステップS423のループ処理を実行する毎に、区分割付表165から区分割付表160までの区分割付表の初期化が行われ、多層区分割付表310の初期化が完了する。  FIG. 4C is a diagram illustrating an example of a processing flow for initializing the multi-layer partitioning table for each partition level in the embodiment of the present invention. By the processing flow illustrated in FIG. 4C, the partitioning table corresponding to each partition level from the lowest partition level constituting the multi-layer partitioning table to the highest partition level having a bit value of 1 in the partition configuration main partition table Is initialized. In the example of FIG. 3, this is a process of setting the values of the partitioning tables 160 to 165 to the values shown. Each time the loop processing from step S411 to step S423 shown in FIG. 4B is executed, the partitioning table from the partitioning table 165 to the partitioning table 160 is initialized, and the initialization of the multi-layer partitioning table 310 is completed. . *
図4Cに示すように、ステップS431で区分番号に先頭番号を設定し、ステップS432で末尾番号に先頭番号に区分数を加えて1を減じた値を設定する。ステップS431及びステップS432での先頭番号は、図4Aに示すステップS409あるいは図4Bに示すステップS418で設定されたものである。また、ステップS432での区分数は、図4Aに示すステップS410もしくは図4Bに示すステップS419あるいはステップS423で設定されたものである。 As shown in FIG. 4C, in step S431, the head number is set to the section number, and in step S432, a value obtained by adding the number of sections to the head number and subtracting 1 is set. The head numbers in step S431 and step S432 are set in step S409 shown in FIG. 4A or step S418 shown in FIG. 4B. Further, the number of sections in step S432 is set in step S410 shown in FIG. 4A or step S419 or step S423 shown in FIG. 4B.
ステップS431とステップS432の処理は、各区分レベルに対応した区分割付表の先頭の区分番号と末尾の区分番号をそれぞれ設定する処理である。
次にステップS434において、区分番号と末尾番号は等しいか判定する。区分番号と末尾番号が等しくなければ、ステップS435で、区分番号の指す多層区分割付表の割付状態に保留を設定し、ステップS436で、区分番号を1つ増やしてステップS434に戻り、区分番号と末尾番号は等しいかの判定を繰り返す。このステップS434~ステップS436のループ処理は、処理中の区分レベルに対応した区分割付表の先頭の区分番号から末尾番号の1つ前の区分番号まで、区分番号の指す区分割付表の割付状態に保留を設定する処理である。
The processing of step S431 and step S432 is processing for setting the first division number and the last division number of the division table attached to each division level.
Next, in step S434, it is determined whether the segment number and the end number are equal. If the section number and the end number are not equal, in step S435, the allocation state of the multi-layer partition table attached by the section number is set to hold, and in step S436, the section number is incremented by one and the process returns to step S434. Repeat the determination of whether the end numbers are equal. The loop processing from step S434 to step S436 is performed in the allocation state of the division table attached by the division number from the first division number of the division division attachment table corresponding to the division level being processed to the division number immediately before the end number. This is a process for setting a hold.
一方、ステップS434において、区分番号と末尾番号は等しいと判定されると、ステップS437に進み、主区分番号は値“-1”であるか判定する。ここでの主区分番号は、図4Bに示すステップS411あるいはステップS422で設定されたものである。 On the other hand, if it is determined in step S434 that the section number and the end number are equal, the process proceeds to step S437, where it is determined whether the main section number is the value “−1”. The main division number here is the one set in step S411 or step S422 shown in FIG. 4B.
ステップS437で、主区分番号は値“-1”であると判定されると、ステップS438で区分番号の指す多層区分割付表の割付状態に保留を設定して処理を終了し、ステップS437で、主区分番号は値“-1”ではないと判定されると、ステップS439で区分番号の指す多層区分割付表の割付状態に空を設定して処理を終了する。
このステップS438とステップS439の処理は、処理中の区分レベルに対応した区分割付表の末尾の区分番号の割付状態を設定する処理である。図3に例示するように、主区域に対応する区分ユニットの区分番号は、その主区域の区分レベルに対応する区分番号の末尾であり、その末尾の区分番号の区分割付表の割付状態は、区分番号0、3、22の割付状態に見られるように“00”、すなわち空である。そのほかの多層区分割付表の割付状態は、全て“10”、すなわち保留である。
If it is determined in step S437 that the main division number is the value “−1”, in step S438 the suspension is set in the allocation state of the multi-layer division table attached by the division number, and the process is terminated. In step S437, If it is determined that the main division number is not the value “−1”, the allocation state of the multi-layer division table attached to the division number is set to empty in step S439, and the process is terminated.
The processing in step S438 and step S439 is processing for setting the allocation state of the segment number at the end of the segmentation table corresponding to the segment level being processed. As illustrated in FIG. 3, the division number of the division unit corresponding to the main area is the end of the division number corresponding to the division level of the main area, and the allocation state of the division table of the division number at the end is As seen in the allocation states of the division numbers 0, 3, and 22, “00”, that is, empty. All other assignment states of the multi-layered division table are “10”, that is, hold.
 以上詳細に説明した区画の初期化において、区域の割付状態に「空」のほかに「保留」を導入したのは、連続した大きな空の区域の確保を容易にするためである。例えば図3の例で、ファイルシステムからサイズが16の区域の割付を要求された場合、空状態の区域である主区域の中から主区域184、すなわち区分番号3の区域を選択することができる。もし、保留という割付状態がないと、区分番号1、2の区域も空となり、すると、将来サイズが16より大きい区域の割付要求が発生する場合に連続する区域を割り付けられるように、区分番号1、2、3の中から区分番号3の区域を選択する手段が区域を有効に利用するために必要になる。しかしその手段は割付状態に「保留」を導入するよりも複雑になる。 The reason for introducing “hold” in addition to “empty” in the area allocation state in the section initialization described in detail above is to facilitate securing of large continuous empty areas. For example, in the example of FIG. 3, when the file system requests allocation of an area of size 16, the main area 184, that is, the area of the partition number 3 can be selected from the main areas that are empty. . If there is no allocation state of holding, the areas of the division numbers 1 and 2 are also empty, and if the allocation request for an area having a size larger than 16 is generated in the future, the division number 1 is assigned so that a continuous area can be assigned. A means for selecting the area of the division number 3 from 2, 3 is required to use the area effectively. However, that means is more complicated than introducing “hold” in the allocation state.
 なお、本実施の形態においては、「保留」という状態を導入し、それを2ビットの値“10”で表すが、上述の説明のとおり、区域の割付状態を保留に設定するのはその区域を割付の対象から除くためである。したがって、上述のステップS438において、区分番号の指す多層区分割付表の割付状態に、その区分番号の区域への割付を行わないことを示す空以外の状態を設定することもできる。 In this embodiment, a state of “pending” is introduced and represented by a 2-bit value “10”. As described above, the allocation state of a zone is set to “pending”. Is excluded from the allocation target. Therefore, in the above-described step S438, it is possible to set a non-empty state indicating that allocation to the area of the division number is not performed in the allocation state of the multi-layered division allocation table indicated by the division number.
 次に、図5~図11Cを参照して、本発明の一実施形態における多層区分管理情報を用いた区域の割付について説明する。先に図2Bの説明において述べたように、区域の割付は、区画の初期化の後、ファイルシステムからの割付要求サイズを含む割付要求を受け付けることにより、アロケーションシステムの多層区分管理部により行われる。 Next, with reference to FIGS. 5 to 11C, allocation of areas using the multi-layer division management information in one embodiment of the present invention will be described. As described above with reference to FIG. 2B, area allocation is performed by the multi-layer division management unit of the allocation system by accepting an allocation request including an allocation request size from the file system after partition initialization. .
 図5は、区域の割付を行う処理全体の概略の処理フロー例を説明する図である。
 まず、ステップS501で、割付要求サイズを設定し、ステップS502で、割付要求区分レベルとして、割付要求サイズを内包する最小の2のべき乗サイズのべき数を設定する。例えば、割付要求サイズが11(2進数表示で“01011”)であれば、割付要求区分レベルは、16(2進数で「10000」)=2のべき数である4が設定される。また割付要求サイズが2のべき乗である8であれば、そのべき数である3が設定される。
FIG. 5 is a diagram for explaining an example of a schematic processing flow of the entire processing for assigning areas.
First, in step S501, the allocation request size is set, and in step S502, the power of the minimum power-of-two size including the allocation request size is set as the allocation request classification level. For example, if the allocation request size is 11 (binary number “01011”), the allocation request classification level is set to 4, which is a power of 16 (binary number “10000”) = 2 4 . If the allocation request size is 8, which is a power of 2, then 3 which is the power is set.
 次にステップS503で、多層区分割付表を参照して、割付要求区分レベルの区域のうち、その区域の割付状態が「空」である空区域を探索し、空区域の区分番号を取得する。ステップS503の処理の詳細については、後に図6を参照して説明する。 Next, in step S503, referring to the multi-layered division table, an empty area in which the assigned state of the area is “empty” is searched from the areas of the allocation requesting division level, and the division number of the empty area is acquired. Details of the processing in step S503 will be described later with reference to FIG.
 ステップS504で、空状態の区域の区分番号を取得することができたかを判定し、取得できた場合はステップS507に進み、取得できなかった場合はステップS505に進む。
 ステップS505では、多層区分割付表を参照して割付要求区分レベルの区域のうち割付状態が「空候補」である空候補区域を探索し、空候補区域の区分番号を取得する。ステップS505の処理の詳細については、後に図9を参照して説明する。
 ステップS506で、空候補状態の区域を取得することができたか否かを判定し、取得できた場合はステップS507に移行し、取得できなかった場合は取得失敗として区域割付処理を終了する。
In step S504, it is determined whether or not the division number of the empty area has been acquired. If it can be acquired, the process proceeds to step S507, and if it cannot be acquired, the process proceeds to step S505.
In step S505, an empty candidate area whose allocation state is “empty candidate” is searched from the areas at the allocation request classification level with reference to the multi-layered division table, and a classification number of the empty candidate area is acquired. Details of the processing in step S505 will be described later with reference to FIG.
In step S506, it is determined whether or not an empty candidate state area can be acquired. If it can be acquired, the process proceeds to step S507. If it cannot be acquired, the area allocation process ends as an acquisition failure.
 ステップS507では、ステップS503の処理で取得した区分番号の区分レベルに対応する区域のサイズがステップS501で設定した割付要求サイズより大きいか判定する。割付要求サイズが2のべき乗と等しくない、すなわち2進数形式で表示したとき有意のビット位置が複数(この場合の割付要求をマルチビット要求といい、一方、割付要求が2のべき乗に等しいとき、シングルビット要求ということがある。)であれば、取得される区域のサイズは割付要求サイズより大きい。したがって、ステップS507の判定は、割付要求がマルチビット要求であるかシングルビット要求であるかを判定するものである。 In step S507, it is determined whether the size of the area corresponding to the classification level of the classification number acquired in step S503 is larger than the allocation request size set in step S501. The allocation request size is not equal to a power of 2, that is, when it is displayed in binary format, there are multiple significant bit positions (in this case, the allocation request is called a multi-bit request, while the allocation request is equal to a power of 2; If there is a single bit request), the size of the acquired area is larger than the allocation request size. Therefore, the determination in step S507 is to determine whether the allocation request is a multibit request or a single bit request.
 ステップS507での判定がシングルビット要求であればステップS509に進み、ステップS507での判定がマルチビット要求であればステップS508に分岐する。ステップS508では、取得した区分番号に対応する一次割付区域を多層区域に区分し、割付要求区分の二次割付区域を得てステップS509に進む。なお、二次割付で得られる領域は、複数の区域からなる多層区域であるが、以下ではその領域を二次割付区域という。
 ステップS508の処理の詳細については、後に図11A~図11Cを参照して説明する。また、一次割付及び二次割付についても後に詳細に説明する。
If the determination in step S507 is a single bit request, the process proceeds to step S509. If the determination in step S507 is a multibit request, the process branches to step S508. In step S508, the primary allocation area corresponding to the acquired classification number is divided into multilayer areas, the secondary allocation area of the allocation request classification is obtained, and the process proceeds to step S509. In addition, although the area | region obtained by secondary allocation is a multilayer area which consists of a several area, the area | region is called a secondary allocation area below.
Details of the processing in step S508 will be described later with reference to FIGS. 11A to 11C. The primary allocation and the secondary allocation will be described later in detail.
 ステップS509では、割付結果として、割付区分番号に一次割付された割付区域の区分番号を設定し、処理を終了する。ここで設定された割付区分番号が、図2Aに示すように、割付結果としてファイルシステムに返される。アロケーションシステムの多層区分管理部は、ファイルシステムに割り付けられた区画の先頭位置から、割付要求されてファイルに割り付けた領域の先頭位置までの相対アドレスを、そのファイルに対応する割付区分番号を用いて多層区分管理表から求めることができる。 In step S509, as the allocation result, the allocation area category number that is primarily allocated to the allocation category number is set, and the process ends. The allocation division number set here is returned to the file system as the allocation result, as shown in FIG. 2A. The multi-layer partition management unit of the allocation system uses the allocation section number corresponding to the file to calculate the relative address from the start position of the partition allocated to the file system to the start position of the area allocated to the file requested for allocation. It can be obtained from the multi-layer division management table.
 次に、図5のステップS503、ステップS505及びステップS508の処理の詳細を説明する。
 図6は、図5のステップS503の処理の詳細を説明するものであり、多層区分割付表より、割付要求区分レベルの空区域を探索し、空区域の区分番号を取得する処理フロー例を説明する図である。
Next, details of the processing in steps S503, S505, and S508 in FIG. 5 will be described.
FIG. 6 explains the details of the processing in step S503 of FIG. 5, and describes an example of a processing flow for searching for an empty area at the allocation requesting division level from the multi-layered division table and acquiring the division number of the empty area. It is a figure to do.
 図に示すように、ステップS601で、多層区分割付表より、割付要求区分レベルのサイズを含む空区域を探索し、空区域の区分番号を取得する。本発明の一実施形態の多層区分管理によれば、割付要求区分レベルの空区域を見つけだすことができない場合でも、割付区分レベルより大きい区分レベルの空区域が存在すればそれを見つけることができる。例えば図3に示す例において、割付要求区分レベルが3の場合、区分レベル3の区分割付表163に示すとおり、区分レベル3の区域には空はない。しかし、区分レベル2には区分番号3の空区域が存在し、この区分番号3を取得する。このように、割付区分レベルより大きい区分レベルの空区域を割り付けることを、仮割付ということがある。ステップS601の詳細については、後に図7A~図7Dを参照して説明する。 As shown in the figure, in step S601, an empty area including the size of the allocation requesting division level is searched from the multi-layer division allocation table, and an empty area division number is acquired. According to the multi-layer partition management according to an embodiment of the present invention, even when an empty area at the allocation required partition level cannot be found, if an empty area at a partition level higher than the allocation partition level exists, it can be found. For example, in the example shown in FIG. 3, when the allocation request division level is 3, as shown in the division division table 163 of the division level 3, there is no space in the division level 3 area. However, an empty area with a division number 3 exists in the division level 2, and this division number 3 is acquired. In this way, allocating an empty area at a division level larger than the allocation division level may be referred to as provisional allocation. Details of step S601 will be described later with reference to FIGS. 7A to 7D.
 次にステップS602で、ステップS601の処理において区分番号は取得できたか判定し、取得できていなければ取得失敗を返して処理を終了し、取得できていればステップS603に進む。
 ステップS603では、ステップS601の処理で取得した区分番号に係る区分レベル(取得した区分レベル)と割付要求区分レベルが等しいか判定する。この判定は、仮割付が行われたか否かの判定に相当する。取得した区分レベルと割付要求区分レベルが等しければ、取得成功を返して処理を終了し、取得した区分レベルと割付要求区分レベルが等しくない、すなわち仮割付が行われた場合はステップS604に分岐する。
Next, in step S602, it is determined whether or not the division number has been acquired in the process of step S601. If it has not been acquired, an acquisition failure is returned and the process ends. If it has been acquired, the process proceeds to step S603.
In step S603, it is determined whether the classification level (acquired classification level) related to the classification number acquired in the process of step S601 is equal to the allocation request classification level. This determination corresponds to determination of whether or not provisional allocation has been performed. If the acquired category level and the allocation request category level are equal, acquisition success is returned and the process is terminated. If the acquired category level and the allocation request category level are not equal, that is, if provisional allocation is performed, the process branches to step S604. .
 ステップS604では、仮割付された仮割付区域を多層区域に区分し、割付要求区分レベルの区分番号の一次割付区域を得る。すなわち、一次割付として割付要求区分レベルのサイズの区域を取得し、その区分番号を取得して、取得成功を返して処理を終了する。ステップS604の詳細は、後に図8A及び図8Bを参照して説明する。 In step S604, the temporarily allocated area that has been temporarily allocated is divided into multi-layer areas, and the primary allocation area of the division number of the allocation request classification level is obtained. That is, an area having the size of the allocation request classification level is acquired as the primary allocation, the classification number is acquired, acquisition success is returned, and the process is terminated. Details of step S604 will be described later with reference to FIGS. 8A and 8B.
 図7Aは、図6のステップS601の処理の詳細を説明するものであり、多層区分割付表より、割付要求区分レベルのサイズを含む空区域を探索し、空区域の区分番号を取得する処理フロー例を説明する図である。 FIG. 7A explains the details of the processing in step S601 in FIG. 6, and a processing flow for searching the empty area including the size of the allocation requesting division level from the multi-layer division table and obtaining the division number of the empty region It is a figure explaining an example.
 図に示すようにステップS701において、区分レベルに、割付要求区分レベルを設定する。ここで割付要求区分レベルの値は、図5のステップS502で設定されたものである。
 次に、ステップS702において、先頭番号管理表より、区分レベルの指す先頭番号を取り出す。そして、ステップS703aで、区分番号に、取り出した先頭番号を設定し、ステップS703bで、現在処理中である区分レベルの区分割付表の区分番号の末尾の番号を末尾番号に設定する。ステップS703bの処理の詳細は、後に図7Dを参照して説明する。
As shown in the figure, in step S701, the allocation request category level is set as the category level. Here, the value of the allocation request classification level is set in step S502 of FIG.
Next, in step S702, the head number indicated by the division level is extracted from the head number management table. In step S703a, the extracted head number is set as the section number, and in step S703b, the last number of the section number in the section level partition table currently being processed is set as the end number. Details of the processing in step S703b will be described later with reference to FIG. 7D.
 次にステップS704で、区分番号に設定された値の指す多層区分割付表の割付状態を読み出す。そして、ステップS705で、読み出した割付状態は空であるかを判定する。ステップS705の判定において、割付状態が空であると判定されると、ステップS710に進む。 Next, in step S704, the allocation state of the multi-layer partitioning table indicated by the value set in the segment number is read. In step S705, it is determined whether the read allocation state is empty. If it is determined in step S705 that the allocation state is empty, the process proceeds to step S710.
 一方、ステップS705の判定において、割付状態は空ではないと判定されると、ステップS706に分岐する。そして、ステップS706で、区分番号とステップS703bで設定した末尾番号とが等しいかを判定する。区分番号と末尾番号とが等しくない場合は、ステップS707に分岐し、区分番号を1加算してステップS704に戻る。以降は同一区分レベル内において区分番号を1ずつ加算してゆき、空状態の区域を検索していく。 On the other hand, if it is determined in step S705 that the allocation state is not empty, the process branches to step S706. In step S706, it is determined whether the division number is equal to the end number set in step S703b. If the section number is not equal to the end number, the process branches to step S707, and the section number is incremented by 1, and the process returns to step S704. Thereafter, the division number is incremented by 1 within the same division level to search for an empty area.
 ステップS706において、区分番号と末尾番号が等しいと判定されると、ステップS708に進み、区分レベルは最上位の区分レベルであるか否かを判定する。区分レベルが最上位の区分レベルである場合、取得失敗を返して処理を終了する。
 ステップS708において区分レベルが最上位の区分レベルでないと判定された場合(区分レベルが最上位の区分レベルよりも下位の区分レベルである場合)は、ステップS709に進み、区分レベルを1加算してステップS702に戻る。
If it is determined in step S706 that the segment number and the end number are equal, the process proceeds to step S708, and it is determined whether or not the segment level is the highest segment level. If the classification level is the highest classification level, an acquisition failure is returned and the process is terminated.
When it is determined in step S708 that the division level is not the highest division level (when the division level is a lower division level than the highest division level), the process proceeds to step S709, and 1 is added to the division level. The process returns to step S702.
 ステップS702に戻ると、上記の処理を繰り返し、1つずつ上位の区分レベルについての多層区分割付表の割付状態を探索していく。探索の結果空状態の区域が得られたときは、ステップS710に進む。 Returning to step S702, the above processing is repeated, and the allocation state of the multi-layer division table for the higher division level is searched one by one. If an empty area is obtained as a result of the search, the process proceeds to step S710.
 ステップS710では、区分番号に設定された値の指す多層区分割付表の割付状態を使用中に設定して処理を終了する。図7Aの処理結果としては、一時記憶領域である区分番号と区分レベルにそれぞれ設定された値と取得成功あるいは取得失敗を示すデータが検索結果として出力される。 In step S710, the allocation state of the multi-layer partitioning table indicated by the value set in the segment number is set to be in use, and the process ends. As the processing result in FIG. 7A, the value set for the partition number and the partition level, which are temporary storage areas, and data indicating acquisition success or acquisition failure are output as search results.
 図7B及び図7Cは、図3に示す多層区分管理表310を参照して図7Aに示す空区域の探索処理を具体例により説明する図である。
 図7Bに示す例は割付要求がマルチビット要求であって割付要求区分レベルで空区域が探索される例である。図に示すように、割付要求サイズ220の1ビット目(区分レベル1)と3ビット目(区分レベル3)にビット値1が設定されている。したがって、割付要求区分レベル234には、点線の矢印224で示すように、区分レベル3の上位の区分レベル4が設定されている。ここまでの設定は、図5のステップS501とステップS502の処理で行われる。
7B and 7C are diagrams for explaining the empty area search processing shown in FIG. 7A by a specific example with reference to the multi-layer division management table 310 shown in FIG.
The example shown in FIG. 7B is an example in which the allocation request is a multi-bit request and an empty area is searched at the allocation request classification level. As shown in the figure, the bit value 1 is set in the first bit (partition level 1) and the third bit (partition level 3) of the allocation request size 220. Therefore, the allocation request category level 234 is set with a category level 4 higher than the category level 3 as indicated by the dotted arrow 224. The setting up to this point is performed by the processing in steps S501 and S502 in FIG.
 次に図の実線の矢印で示す区分レベル4の割付要求240により、多層区分割付表310の、符号164aを付した割付前の区分レベル4の区分割付表の空探索244が行われる。図の例では区分番号171が1と2の割付状態が“11”で使用中であり、区分番号が3の割付状態が“00”で空である。したがって、図の実線の矢印で示すように空区域の取得274aが行われ、符号164bを付した割付後の区分レベル4の区分割付表に示すように、区分番号171が3の割付状態に
“11”が設定され、使用中であることが表示される。その結果、図の矢印274に対応を示すように、区画311には、区分レベルが4で区分番号は3の区域が一次割付区域280として割り付けられる。
 上述の一次割付区域280の割付は、図7Aに示すステップS704~ステップS707のループ処理とステップS710の処理により実行される。
Next, according to the partition level 4 allocation request 240 indicated by the solid line arrow in the figure, the empty search 244 of the partition level 4 partition allocation table before allocation of the multi-layer partition partition table 310 with the reference numeral 164a is performed. In the example shown in the figure, the assignment state of the division number 171 of 1 and 2 is “11”, and the assignment state of the division number 3 is “00” and is empty. Therefore, the empty area is acquired 274a as indicated by the solid line arrow in the figure, and the division number 171 is set to the allocation state of 3 as shown in the division level 4 division division table after the assignment with the reference numeral 164b. 11 "is set and it is displayed that it is in use. As a result, as indicated by the arrow 274 in the figure, the section 311 is assigned with the section level 4 and the section number 3 as the primary allocation section 280.
The above-described allocation of the primary allocation area 280 is executed by the loop processing in steps S704 to S707 and the processing in step S710 shown in FIG. 7A.
 次に図7Cに示す例により割付要求がシングルビット要求であって割付要求区分レベルでは空区域が探索できない場合を説明する。図7Cには割付要求サイズ220は記載していないが、点線の矢印で示す割付要求241aが割付要求区分レベル1のものであるから、割付要求は1ビット目のみが1のシングルビット要求である。 Next, a case where the allocation request is a single bit request and an empty area cannot be searched at the allocation request classification level will be described with reference to the example shown in FIG. 7C. Although the allocation request size 220 is not described in FIG. 7C, the allocation request 241a indicated by the dotted arrow is of the allocation request category level 1, and therefore the allocation request is a single bit request in which only the first bit is 1. .
 割付要求区分レベルでは空区域が探索できない場合は、図7Aに示すフローでは、ステップS706でステップS708に分岐し、ステップS709を経由してステップS702の戻るループ処理を、上位の区分レベルにおいて空区域を見つけるまで繰り返すことになる。 In the flow shown in FIG. 7A, if the empty area cannot be searched for at the allocation request division level, the process branches to step S708 in step S706, and the loop processing of step S702 via step S709 is performed at the upper division level. Will repeat until you find.
 この繰り返し処理に対応するのが、図7Cに示す、下位の区分レベル(図7Cにおいては区分レベル1)から順次上位の区分レベルの区分割付表を参照していき、探索した区分レベル内に空状態の区域がない場合に更に上位の区分レベルを探索していく処理である。区分レベル1から順に各区分レベルの区域について先頭番号から順に空状態を探索してゆく。 Corresponding to this repetitive processing, the partitioning table of the upper partition level is sequentially referred to from the lower partition level (partition level 1 in FIG. 7C) shown in FIG. 7C, and empty in the searched partition level. This is a process of searching for a higher division level when there is no state area. In order from the division level 1, the empty state is searched in order from the top number for each division level area.
 まず、図の点線の矢印241aで示す割付要求区分レベルである区分レベル1の空区域の探索が要求され、多層区分割付表310のうち、区分レベル1の区分割付表161の割付状態を区分番号の昇順に先頭番号である区分番号23から末尾番号である区分番号48まで空状態を探索(図7Cの矢印241b参照)してゆく。図に示す例においては、区分番号が末尾番号である48の区域まで探索しても空状態の区域がないので、図の点線の矢印242aで示す区分レベルを1加算した上位区分である区分レベル2の空区域の探索が要求される。そして、区分レベル2の区分割付表162の割付状態を区分番号の昇順に先頭番号である区分番号10から末尾番号である区分番号22まで空状態を探索(図7Cの矢印242b参照)してゆく。区分番号が末尾番号である22の区域まで探索しても空状態の区域がないので、区分レベルを1加算して上位区分である区分レベル3の空状態の探索が要求される(図7Cの矢印243a参照)。同様に区分レベル3の区分割付表163についても先頭番号である区分番号4の区域から末尾番号である区分番号9の区域までの割付状態を順次探索(図7Cの矢印243b参照)してゆくが、空区域が得られないため、区分レベルを1加算して上位区分である区分レベル4の空区域探索が要求される(図7Cの244a参照)。
 図7Cの例示では、符号164aを付した割付前の区分レベル4の区分割付表の空区域の探索(図7Cの244b参照)の結果、区分番号が2の区域が、割付状態が“00”の空区域として得られ、図7Cの矢印で示す空取得244cに対応を示すように、符号164bを付した割付後の区分レベル4の区分割付表の区分番号2の割付状態が、使用中を表示する“11”に変更される。すなわち、矢印244dで示すように、区分番号2の区域が仮割付され、仮割付区域280aとして得られる。
First, a search for an empty area of division level 1 that is the allocation requesting division level indicated by the dotted arrow 241a in the figure is requested, and among the multi-layer division table 310, the allocation state of the division level table 161 of the division level 1 is assigned to the division number. In the ascending order, the empty state is searched from the division number 23 which is the head number to the division number 48 which is the tail number (see arrow 241b in FIG. 7C). In the example shown in the figure, there is no empty area even when searching up to the 48 area whose division number is the end number, and therefore, the division level which is the upper division obtained by adding 1 to the division level indicated by the dotted arrow 242a in the figure. A search for two empty areas is required. Then, an empty state is searched for the allocation state in the partition level attached table 162 at the partition level 2 from the partition number 10 as the top number to the partition number 22 as the end number in the ascending order of the partition numbers (see the arrow 242b in FIG. 7C). . Since there is no empty area even if the search is performed up to the area having the end number of the section number 22, the search for the empty state of the section level 3 which is the upper section is requested by adding one to the section level (FIG. 7C). (See arrow 243a). Similarly, with respect to the division level table 163 at the division level 3, the allocation state from the division number 4 area which is the first number to the division number 9 area which is the last number is sequentially searched (see arrow 243b in FIG. 7C). Since an empty area cannot be obtained, an empty area search of an upper level division level 4 is requested by adding 1 to the division level (see 244a in FIG. 7C).
In the example of FIG. 7C, as a result of searching for an empty area (see 244b in FIG. 7C) of the division level 4 division division table before the assignment with the reference numeral 164a, the division number 2 is assigned to the allocation state “00”. As shown in FIG. 7C, the allocation state of the division number 2 in the division level table of the division level 4 after the allocation with the reference numeral 164b is in use. It is changed to “11” to be displayed. That is, as indicated by the arrow 244d, the area of division number 2 is provisionally allocated to obtain a provisionally allocated area 280a.
 なお、空区域の探索処理については、上記の区分番号を昇順に探索する方法に限定されるものではなく、任意の探索アルゴリズムを採用してもよい。
 次に、現在処理中である区分レベルの区分割付表の区分番号の末尾の番号を取得する処理を説明する。
In addition, about the search process of an empty area, it is not limited to the method of searching said division number in an ascending order, You may employ | adopt arbitrary search algorithms.
Next, a process of acquiring the last number of the division number of the division level attached table at the division level currently being processed will be described.
 図7Dは、本発明の一実施形態における、各区分レベルの末尾の区分番号を取得する処理フロー例を説明する図である。
 図7Dに示すように、ステップS721で、現在処理中の区分レベルは最下位の区分レベルか判定し、最下位の区分レベルでなければステップS722に進み、最下位の区分レベルであればステップS724に進む。
FIG. 7D is a diagram illustrating an example of a processing flow for acquiring the end partition number of each partition level in an embodiment of the present invention.
As shown in FIG. 7D, in step S721, it is determined whether the currently processed partition level is the lowest partition level. If it is not the lowest partition level, the process proceeds to step S722, and if it is the lowest partition level, step S724 is performed. Proceed to
 ステップS722では、先頭番号管理表より、区分レベルを1つ減らした値の指す先頭番号を取り出し、ステップS723で、その取り出した先頭番号より1つ減らした値を末尾番号に設定して処理を終了する。
 一方、ステップS724では、総区分数管理表より、総区分数を取り出し、ステップS725で、その取り出した総区分数より1つ減らした値を末尾番号に設定して処理を終了する。
 以上図7A~図7Dを参照して説明した処理により、一次割付領域あるいは仮割付領域が得られる。
In step S722, the head number indicated by the value obtained by subtracting the classification level by one is extracted from the head number management table, and in step S723, the value subtracted by one from the extracted head number is set as the tail number, and the process ends. To do.
On the other hand, in step S724, the total number of sections is extracted from the total number of sections management table, and in step S725, a value obtained by subtracting one from the extracted total number of sections is set as the end number, and the process is terminated.
Through the processing described above with reference to FIGS. 7A to 7D, the primary allocation area or the temporary allocation area is obtained.
 図8Aは、図6のステップS604の処理の詳細を説明するものであり、ステップS601の処理で得られた仮割付区域を多層区分し、割付要求区分レベルの区分番号の一次割付区域を得る処理フロー例を説明する図である。 FIG. 8A explains the details of the process of step S604 in FIG. 6, and the process of dividing the temporary allocation area obtained by the process of step S601 into multiple sections and obtaining the primary allocation area of the section number of the allocation request section level. It is a figure explaining the example of a flow.
 先ず、ステップS801で、先頭番号管理表より、図6のステップS601で取得した区分レベルの指す先頭番号を取り出す。図8Aの処理フローは仮割付が行われたことを前提としていることから、取得した区分レベルは割付要求区分より大きい。次にステップS803で、レベル内番号に、取得した区分番号からステップS801で取り出した先頭番号を減算して得られる値を設定する。次にステップS804において、区分レベルに、取得した区分レベルよりも1つ減じた値を設定してステップS805に進む。 First, in step S801, the head number indicated by the division level acquired in step S601 of FIG. 6 is extracted from the head number management table. Since the processing flow in FIG. 8A is based on the assumption that provisional allocation has been performed, the acquired classification level is larger than the allocation request classification. Next, in step S803, a value obtained by subtracting the head number extracted in step S801 from the acquired division number is set to the in-level number. In step S804, a value obtained by subtracting one from the acquired category level is set in the category level, and the process proceeds to step S805.
ステップS805では、先頭番号管理表より、区分レベルの指す先頭番号を取り出す。そして、ステップS807で、レベル内番号に、該レベル内番号に設定された値を2倍した値を設定する。この処理は、ある区域に対応する1つ下位の区分レベルにおける区域は、2つずつ存在していることに対応している。 In step S805, the head number indicated by the division level is extracted from the head number management table. In step S807, a value obtained by doubling the value set in the in-level number is set in the in-level number. This process corresponds to the fact that there are two areas at the lower level of the partition corresponding to a certain area.
 次にステップS808で、区分番号に、先頭番号にレベル内番号を加えた値を設定する。ステップS809では、対の区分番号に、区分番号に1を加算して得られる値を設定する。例えば、ある区分レベルにおけるレベル内番号が「10」である区域を2分割した1つ下位の区分レベルにおける区域のレベル内番号は「20」及び「21」となる。 Next, in step S808, a value obtained by adding the in-level number to the head number is set to the division number. In step S809, a value obtained by adding 1 to the section number is set to the pair section number. For example, the in-level numbers of the areas in the one sub-division level that is obtained by dividing the area in which the in-level number is “10” at a certain division level are “20” and “21”.
 次にステップS810で、区分番号の指す多層区分割付表の割付状態に、使用中を設定し、ステップS811で、対の区分番号が指す多層区分割付表の割付状態に、空を設定してステップS812に進む。 Next, in step S810, “in use” is set in the allocation state of the multi-layer partitioning table indicated by the section number, and in step S811, empty is set in the allocation state of the multi-layer partitioning table pointed to by the pair of partition numbers. The process proceeds to S812.
 ステップS812では、区分レベルは割付要求区分レベルよりも大きいかを判定し、大きければステップS813に分岐して区分レベルに設定された値を1つ減らしてステップS805に戻る。判定結果が大きくない、すなわち区分レベルは割付要求区分レベルと等しければ、処理を終了する。先に説明したように、取得した区分レベルは割付要求区分より大きい。そして区分レベルを1つずつ減らしながらステップS805からステップS813のループ処理を繰り返すことから、ステップS812で区分レベルが割付要求区分レベルよりも大きくないと判定されるのは、区分レベルが割付要求区分レベルと等しくなったときである。 In step S812, it is determined whether the partition level is higher than the allocation request partition level. If so, the process branches to step S813, and the value set in the partition level is decreased by one, and the process returns to step S805. If the determination result is not large, that is, if the classification level is equal to the allocation request classification level, the process is terminated. As explained above, the acquired classification level is larger than the allocation request classification. Then, since the loop processing from step S805 to step S813 is repeated while decreasing the partition level by one, it is determined in step S812 that the partition level is not larger than the allocation request partition level. Is equal to.
 以上の処理により、仮割付された区域を多層区分し、一次割付された区域が得られる。上記ステップS804の処理とステップS805~ステップS813のループ処理は、仮割付された区域からスタートして、区域を1つ下位の区分レベルの2つの区域の対に分割し、若番側の区域の割付状態に使用中を、老番側の区域の割付状態に空を設定するものである。 By the above processing, the temporarily assigned area is divided into multiple layers, and the primary assigned area is obtained. The process of step S804 and the loop process of steps S805 to S813 start from the provisionally assigned area, divide the area into two pairs of areas at the next lower division level, and In use in the assigned state, empty is set in the assigned state in the area on the old number side.
 本発明の一実施形態によれば、取得した仮割付区域の全体を使用中とすることなく、割付要求区分レベルの区域を仮割付区域の区分番号の若番側に一次割付し、残りの連続領域を空と設定するので、領域を効率的に利用することができる。なお、一次割付を区分番号の若番側とすることに限らず、老番側とすることも可能であることは当業者に明らかである。 According to one embodiment of the present invention, without assigning the entire acquired temporary allocation area in use, an area at the allocation request classification level is primarily allocated to the younger number side of the provisional allocation area classification number, and the remaining continuous Since the area is set as empty, the area can be used efficiently. It is obvious to those skilled in the art that the primary assignment is not limited to the younger number side of the division number, but can be the older number side.
 図8Bは、図3に示す多層区分管理表310を参照して、図8Aに示す仮割付区域を多層区分して一次割付区域を得る処理を、具体例により、説明する図である。
 図8Bに示す例は、図7Cに例示するものと同様に、割付要求がシングルビット要求のものであり、図7Cに示す仮割付区域280aから一次割付区域を取得するものである。
FIG. 8B is a diagram illustrating a process for obtaining the primary allocation area by dividing the provisional allocation area shown in FIG. 8A into a multilayer by referring to the multilayer division management table 310 shown in FIG. 3 by a specific example.
In the example shown in FIG. 8B, the allocation request is a single-bit request similar to that illustrated in FIG. 7C, and the primary allocation area is acquired from the temporary allocation area 280a shown in FIG. 7C.
 図8Bには、符号280aで一次割付前の割付状態である仮割付区域(区分番号2)が示されている。仮割付区域280aからの矢印241で示す、仮割付区域の区分レベル4から区分レベル1までの関係する各区域の区分を要求する多層区分要求により、符号164bを付した区分レベル4の区分割付表から処理が開始される。区分割付表164bには、図7Cに示すものと同じ割付状態が格納されている。 FIG. 8B shows a temporary allocation area (section number 2) which is an allocation state before the primary allocation by reference numeral 280a. A division level 4 division table attached with a reference numeral 164b according to a multi-layer division request that requires division of each related area from division level 4 to division level 1 of the temporary allocation area, indicated by an arrow 241 from the temporary allocation area 280a. The process starts from The division assignment table 164b stores the same assignment state as shown in FIG. 7C.
 割付状態が仮割付により使用中に設定された、区分レベル4の区分割付表164bの区分番号171の値が2でレベル内番号172の値が1のエントリからの矢印274aに示す区分要求により、区分レベル3の区分割付表163におけるレベル内番号2の区分ユニットの区分けによる区域(以下、「レベル内番号2の区域」のように表記する。)の割付状態に使用中“11”が設定され、レベル内番号2の区分ユニットと区分対293aを構成するレベル内番号3の区分ユニットの区分けによる区域(以下、「レベル内番号2の区域と区分対293aを構成するレベル内番号3の区域」のように表記する。)の割付状態に空“00”が設定される。この設定処理は、区分レベル3における図8AのステップS805~ステップS811の処理で実行される。先頭番号として4が取り出され、図8AのステップS801~ステップS803の初期処理によりレベル内番号には1が設定されていることから、ステップS807でレベル内番号にはそれを2倍した2が設定される。そして、区分番号として、先頭番号4にレベル内番号2を加えた6が求められる。また対の区分番号として7が得られる。 By the classification request indicated by the arrow 274a from the entry in which the allocation status is set to be in use by provisional allocation and the segment number 171 value of the segment level assignment table 164b is 2, and the value in the level number 172 is 1, “11” in use is set in the allocation state of the area by the division of the division unit with level number 2 in the division level 3 division table 163 (hereinafter referred to as “area with level number 2”). , An area based on the division of the division unit of level number 2 and the division unit of level number 3 constituting the division pair 293a (hereinafter referred to as "the area of level number 2 and the division of level number 3 constituting the division pair 293a") "00" is set in the allocation state. This setting process is executed in the processes of steps S805 to S811 in FIG. Since 4 is extracted as the head number and 1 is set to the in-level number by the initial processing in steps S801 to S803 in FIG. 8A, 2 is set to the in-level number in step S807. Is done. Then, 6 is obtained by adding the in-level number 2 to the head number 4 as the division number. Further, 7 is obtained as the pair division number.
 以下同様に、使用中の区分番号6のエントリに対応して矢印273aに示す区分要求により、区分レベル2の区分割付表162におけるレベル内番号4(区分番号14)の区域の割付状態に使用中“11”が設定され、レベル内番号4の区域と区分対292aを構成するレベル内番号5(区分番号15)の割付状態に空“00”が設定される。
 一方、区分番号7の割付状態は空に設定されたことから、矢印273bで対応を示すように、符号280bを付した一次割付後の仮割付区域に、空状態の区分番号7の区域283bが割り付けられる。
Similarly, in response to the classification request indicated by the arrow 273a corresponding to the entry of classification number 6 being used, the allocation status of the area of level number 4 (division number 14) in the division level allocation table 162 is being used. “11” is set, and an empty “00” is set in the allocation state of the intra-level number 4 and the intra-level number 5 (section number 15) constituting the segment pair 292a.
On the other hand, since the allocation state of the division number 7 is set to empty, as shown by the arrow 273b, the area 283b of the empty division number 7 is added to the temporary allocation area after the primary allocation indicated by the reference numeral 280b. Assigned.
 次に使用中の区分番号14のエントリに対応して矢印272aに示す区分要求により、区分レベル1の区分割付表161におけるレベル内番号8(区分番号31)の区域の割付状態に使用中“11”が設定され、レベル内番号8の区域と区分対291aを構成するレベル内番号9(区分番号32)の割付状態に空“00”が設定される。そして、区分番号15の割付状態は空に設定されたことから、矢印272bで対応を示すように、一次割付後の仮割付区域280bに、空状態の区分番号15の区域282bが割り付けられる。 Next, in response to a partition request indicated by an arrow 272a corresponding to the entry of the partition number 14 in use, the allocation state of the area of the level number 8 (section number 31) in the partition level allocation table 161 of the partition level 1 is in use “11 "Is set, and an empty" 00 "is set in the allocation state of the in-level number 9 (section number 32) that forms the section pair 291a with the section in the in-level number 8. Since the allocation state of the division number 15 is set to empty, the area 282b of the empty division number 15 is allocated to the temporary allocation area 280b after the primary allocation, as shown by the arrow 272b.
 多層区分要求は区分レベル1までであるから、矢印271aと矢印271bでそれぞれ対応を示すように、一次割付後の仮割付区域280bに、区分番号31の区域281aが使用中として一次割付され、区分番号32の区域281bが空として割り付けられる。 Since the multi-layer division request is up to division level 1, as indicated by the arrows 271a and 271b, the temporary allocation area 280b after the primary allocation is primarily allocated as the area 281a of the division number 31 is in use. Area 281b with number 32 is allocated as empty.
 上述の多層区分により、一次割付後の仮割付区域280bは、図に示すような使用中の一次割付領域281aと空である区域281b、282b、283bからなる、一次割付領域281aに隣接する隣接多層区域290bに分割される。 Due to the above-mentioned multilayer division, the temporary allocation area 280b after the primary allocation is an adjacent multilayer adjacent to the primary allocation area 281a, which is composed of a primary allocation area 281a in use and empty areas 281b, 282b, 283b as shown in the figure. Divided into areas 290b.
 図9は、図5のステップS505の処理の詳細を説明するものであり、多層区分割付表より、割付要求区分レベルの空候補区域を探索し、空候補区域の区分番号を取得する処理フロー例を説明する図である。空候補は、後に図11A~図11Cを参照して説明する、マルチビット要求における一次割付領域を分割して二次割付を行ったときの残りの隣接多層区域を構成する区域の割付状態として設定される。 FIG. 9 explains the details of the processing in step S505 of FIG. 5, and is an example of a processing flow for searching for empty candidate areas at the allocation requesting division level from the multi-layer division table and acquiring the division number of the empty candidate area. FIG. The empty candidates are set as the allocation state of the areas constituting the remaining adjacent multi-layer areas when the secondary allocation is performed by dividing the primary allocation area in the multi-bit request, which will be described later with reference to FIGS. 11A to 11C Is done.
 空候補区域の探索は空区域の探索と同様に行われ、空候補区域探索の図9に示すフローは、図6に示す空区域探索のフローに対応するものであり、図9のステップS901~ステップS904は、図6に示すステップS601~ステップS604において、空区域を空候補区域と読み替えたものであるので、説明を省略する。 The search for the empty candidate area is performed in the same manner as the search for the empty area, and the flow shown in FIG. 9 of the empty candidate area search corresponds to the flow of the empty area search shown in FIG. Since step S904 is obtained by replacing the empty area with the empty candidate area in steps S601 to S604 shown in FIG. 6, description thereof will be omitted.
また、図9のステップS901の処理の詳細を説明する図10Aは、多層区分割付表より、割付要求区分レベルのサイズ以上の空候補区域を探索し、空候補区域の区分番号を取得する処理フローを説明する図であり、図7Aに示す、多層区分割付表より、割付要求区分レベルのサイズ以上の空区域を探索し、空区域の区分番号を取得する処理フローを説明する図に対応する。図10AのステップS1001~ステップS1009は、図7Aのステップ705において割付状態は空か判定しているのに対して、ステップS1005で割付状態は空候補か判定しているところで異なるだけであるので、図10Aについての説明も省略する。 FIG. 10A illustrating the details of the processing in step S901 in FIG. 9 is a processing flow for searching for empty candidate areas that are larger than the allocation request classification level size from the multi-layered division table and acquiring the division number of the empty candidate area. 7A corresponds to the diagram illustrating a processing flow for searching for an empty area having a size equal to or larger than the allocation requesting division level from the multi-layer division allocation table shown in FIG. 7A and acquiring the division number of the empty area. Steps S1001 to S1009 in FIG. 10A are different from those in which it is determined in step 705 in FIG. 7A that the allocation state is empty, but only where the allocation state is determined to be an empty candidate in step S1005. A description of FIG. 10A is also omitted.
また同じく、図9のステップS904の処理の詳細を説明する図10Bは、ステップS901の処理で得られた仮割付区域を多層区分し、割付要求区分レベルの区分番号の一次割付区域を取得する処理フローを説明する図であり、図8Aに示す、図6のステップS601の処理で得られた仮割付区域を多層区分し、割付要求区分レベルの区分番号の一次割付区域を取得する処理フローを説明する図に対応する。図10BのステップS1021~ステップS1033は、図8Aのステップ811において、対の区分番号が指す多層区分割付表の割付状態に空を設定しているのに対して、ステップS1031で対の区分番号が指す多層区分割付表の割付状態に空候補を設定しているところで異なるだけであるので、図10Bについての説明も省略する。 Similarly, FIG. 10B for explaining the details of the process of step S904 in FIG. 9 is a process of dividing the temporary allocation area obtained by the process of step S901 into multiple sections and obtaining the primary allocation area of the section number of the allocation request section level. FIG. 8 is a diagram for explaining the flow, and illustrates the processing flow for obtaining the primary allocation area of the allocation request classification level by dividing the provisional allocation area obtained in the process of step S601 of FIG. Corresponds to the figure. Steps S1021 to S1033 in FIG. 10B show that the allocation state of the multi-layer partitioning table indicated by the pair partition number is set to empty in step 811 in FIG. 8A, whereas the pair partition number is set in step S1031. Since only the empty candidate is set in the allocation state of the multi-layered division table to be pointed, the description of FIG. 10B is also omitted.
 次に、図11A~図11Cを参照して、図5のステップS508の処理を詳細に説明する。
 図11Aは、取得した区分番号の一次割付区域を多層区域に区分し、割付要求区分の二次割付区域を得る前段の処理フローを説明する図である。
Next, the processing in step S508 in FIG. 5 will be described in detail with reference to FIGS. 11A to 11C.
FIG. 11A is a diagram for explaining the processing flow of the previous stage to obtain the secondary allocation area of the allocation request classification by dividing the primary allocation area of the acquired classification number into a multilayer area.
 まず、ステップS1101で、先頭番号管理表より、取得した一次割付区域の区分レベル(取得区分レベル)が指す先頭番号を取り出し、ステップS1103で、レベル内番号として、取得した一次割付区域の区分番号から先頭番号を減算した結果を2倍した値を設定する。 First, in step S1101, the leading number pointed to by the classification level (acquisition classification level) of the acquired primary allocation area is extracted from the leading number management table. A value obtained by doubling the result obtained by subtracting the head number is set.
 次にステップS1104で、一次割付区域を分割するために、割付要求サイズから、割付要求サイズを2進数表示したビット値からなる割付構成区分表を作成する。そして、ステップS1105で、分割区分レベルとして、取得区分レベルから1減算した値を設定する。 Next, in step S1104, in order to divide the primary allocation area, an allocation configuration classification table composed of bit values in which the allocation request size is represented in binary is created from the allocation request size. In step S1105, a value obtained by subtracting 1 from the acquired division level is set as the division division level.
次にステップS1106で、最小分割区分レベルとして、割付構成区分表のうちビット値が1であるビット位置で且つ下位0ビット目から見て最も下位のビット位置を設定し、図11BのステップS1107に進む。例えば割付構成区分表のビット値が“1010”であるときは、ビット位置1が最小分割区分レベルに設定される。 Next, in step S1106, as the minimum division division level, the bit position having a bit value of 1 in the allocation configuration division table and the lowest bit position when viewed from the lower 0 bit are set, and in step S1107 of FIG. move on. For example, when the bit value of the allocation configuration division table is “1010”, bit position 1 is set to the minimum division division level.
図11Bは、取得した区分番号の一次割付区域を多層区分に分割し、割付要求区分の二次割付区域を得る後段の処理フローを説明する図である。
 ステップS1107では、先頭番号管理表より、ステップS1105で設定した分割区分レベルの指す先頭番号を取り出す。
そしてステップS1109で、区分番号に、取り出した先頭番号にレベル内番号に設定された値を加えた値を設定し、ステップS1110で、対の区分番号に、区分番号に1を加えた値を設定する。
FIG. 11B is a diagram illustrating a subsequent process flow in which the primary allocation area of the acquired classification number is divided into multi-layered areas to obtain the secondary allocation area of the allocation request classification.
In step S1107, the head number indicated by the division level set in step S1105 is extracted from the head number management table.
In step S1109, a value obtained by adding the value set in the in-level number to the extracted top number is set in the division number. In step S1110, a value obtained by adding 1 to the division number is set in the paired division number. To do.
 次にステップS1111で、分割区分レベルの指す割付構成区分表からビット値を取り出し、ステップS1112で、取り出したビット値が1であるかを判定する。
 ステップS1112において、取り出したビット値が1でない(0である)と判定された場合は、ステップS1113に分岐し、取り出したビット値が1であると判定された場合は、ステップS1115に進む。
Next, in step S1111, a bit value is extracted from the allocation configuration classification table indicated by the division classification level, and in step S1112, it is determined whether the extracted bit value is 1.
If it is determined in step S1112 that the extracted bit value is not 1 (0), the process branches to step S1113. If it is determined that the extracted bit value is 1, the process proceeds to step S1115.
ステップS1113では、区分番号の指す多層区分割付表の割付状態に使用中を設定し、ステップS1114で、対の区分番号の指す多層区分割付表の割付状態に空候補を設定してステップS1119に進む。
 一方、ステップS1115では、分割区分レベルはステップS1106で設定した最小分割区分レベルであるかを判定する。分割区分レベルと最小分割区分レベルとが等しくない場合は、ステップS1116に分岐し、等しい場合はステップS1121に進む。
In step S1113, “used” is set in the allocation state of the multi-layer partitioning table indicated by the section number, and in step S1114, an empty candidate is set in the allocation state of the multi-layer partitioning table specified by the pair of partition numbers, and the process proceeds to step S1119. .
On the other hand, in step S1115, it is determined whether the division division level is the minimum division division level set in step S1106. If the division level is not equal to the minimum division level, the process branches to step S1116. If the division level is equal, the process proceeds to step S1121.
 ステップS1116では、区分番号の指す多層区分割付表の割付状態に使用中を設定し、ステップS1117で、対の区分番号の指す多層区分割付表の割付状態に使用中を設定する。次にステップS1118で、レベル内番号を1加算し、上記のステップS1119に進む。
ステップS1119では、レベル内番号を2倍にし、ステップS1120に進み、分割区分レベルを1つ減らしてステップS1107に戻る。
In step S1116, “used” is set in the allocation state of the multi-layer partitioning table indicated by the section number, and in step S1117, “used” is set in the allocation state of the multi-layer partitioning table indicated by the paired section number. In step S1118, the in-level number is incremented by 1, and the process proceeds to step S1119.
In step S1119, the in-level number is doubled, the process proceeds to step S1120, the division division level is decreased by 1, and the process returns to step S1107.
 ステップS1115において分割区分レベルが最小分割区分レベルと等しいと判定されてステップS1121に進むと、区分番号の指す多層区分割付表の割付状態に使用中を設定し、ステップS1122で、対の区分番号の指す多層区分割付表の割付状態に空候補を設定して処理を終了する。 When it is determined in step S1115 that the division division level is equal to the minimum division division level and the process proceeds to step S1121, “in use” is set in the allocation state of the multi-layer division attachment table indicated by the division number. In step S1122, the pair division number is set. An empty candidate is set in the allocation state of the multi-layered division table to be pointed, and the process is terminated.
 図11Cは、図3に示す多層区分割付表310を参照して、図11A及び図11Bに示す一次割付区域を多層区分し、割付要求区分の二次割付区域を得る処理を、具体例により説明する図である。図11Cに例示するものは、割付要求サイズ220に設定された値及び一次割付区域を区分番号3の一次割付区域280としていることから、図7Bに例示した一次割付に引き続き二次割付を行うものである。 FIG. 11C illustrates the process of obtaining the secondary allocation area of the allocation request classification by dividing the primary allocation area shown in FIG. 11A and FIG. 11B with reference to the multilayer allocation table 310 shown in FIG. It is a figure to do. In the example illustrated in FIG. 11C, since the value set in the allocation request size 220 and the primary allocation area are the primary allocation area 280 of the division number 3, secondary allocation is performed following the primary allocation illustrated in FIG. 7B. It is.
図7Bに示すものと同じく、割付要求サイズを2進数表示した割付要求サイズ220の1ビット目と3ビット目のビット値が1である。割付構成区分表230は、その下に0~5で示すように区分レベルに対応する1ビットからなるエントリから構成されており、図11Cの例示では、区分レベル0から最上位の区分レベル5に対応する6つのエントリを有している。図の点線の矢印223、221で対応を示すように、割付要求サイズを2進数形式で表示したときのビット値に応じて、対応する区分レベルのエントリのビット値が設定されている。ここまでの設定は、図5のステップS501と図11AのステップS1104の処理で行われる。 Similarly to the one shown in FIG. 7B, the bit values of the first and third bits of the allocation request size 220 that represents the allocation request size in binary notation are 1. The allocation configuration division table 230 is composed of 1-bit entries corresponding to the division level as indicated by 0 to 5 below it. In the example of FIG. 11C, the division level 0 is changed to the highest division level 5. It has 6 corresponding entries. As indicated by the dotted arrows 223 and 221 in the figure, the bit value of the corresponding partition level entry is set according to the bit value when the allocation request size is displayed in binary format. The setting up to this point is performed by the processing of step S501 in FIG. 5 and step S1104 in FIG. 11A.
 上述の割付構成区分表230のビット値に基づいて、二次割付が実行される。一次割付区域280からの矢印244で示す一次割付区域の最小分割区分レベルである区分レベル1までの多層区分要求により、符号164bを付した取得区分レベルである区分レベル4の区分割付表から多層区分が開始される。区分割付表164bには、図7Bに示すものと同じ割付状態が格納されている。 The secondary allocation is executed based on the bit values in the allocation configuration table 230 described above. In response to a multi-layer division request up to the division level 1 which is the minimum division division level of the primary allocation area indicated by the arrow 244 from the primary allocation area 280, the multi-layer division from the division division table of the division level 4 which is the acquisition division level denoted by reference numeral 164b. Is started. The division assignment table 164b stores the same assignment state as shown in FIG. 7B.
区分レベル4の区分番号3の区域の区分要求274cについては、点線の矢印233で対応を示すように割付構成区分表230の区分レベル3に対応するビット値が1であることから、図11BのステップS1116とステップS1117の処理により、区分レベル3の区域であって区分番号3の区域と同一の領域を占める1組の区域に対応する区分対293bである、区分レベル3の区分割付表163におけるレベル内番号4(区分番号8)とレベル内番号5(区分番号9)の双方の区分ユニットの割付状態に使用中を示す“11”を設定する。 11B, since the bit value corresponding to the division level 3 in the allocation configuration division table 230 is 1, as indicated by the dotted arrow 233, the division request 274c for the division number 3 of the division level 4 is shown. By the processing of step S1116 and step S1117, in the partition level attached table 163, which is the partition pair 293b corresponding to one set of regions that occupy the same region as the region of the partition number 3 in the partition level 3 region “11” indicating in-use is set in the allocation state of both the in-level number 4 (section number 8) and the in-level number 5 (section number 9).
図11BのステップS1117に続くステップS1118の処理によりレベル内番号が1つ増えることから、次には区分レベル3のレベル内番号5(区分番号9)の区域が区分要求273dの対象となる。点線の矢印232で対応を示すように割付構成区分表230の区分レベル2に対応するビット値が0であることから、図11BのステップS1113とステップS1114の処理により、区分レベル2の区域であって区分番号9の区域と同一の領域を占める1組の区域に対応する区分対292bである、区分レベル2の区分割付表162におけるレベル内番号10(区分番号20)の割付状態に使用中を示す“11”を設定し、レベル内番号11(区分番号21)の割付状態に空候補を示す“01”を設定する。 Since the intra-level number is increased by 1 in the process of step S1118 following step S1117 of FIG. 11B, the area of the intra-level number 5 (partition number 9) of the segment level 3 becomes the target of the segment request 273d. As indicated by the dotted arrow 232, the bit value corresponding to the division level 2 of the allocation configuration division table 230 is 0. Therefore, the processing of steps S1113 and S1114 in FIG. In the allocation state of the level number 10 (section number 20) in the section level division table 162, which is the section pair 292b corresponding to a set of sections occupying the same area as the section of section number 9, “11” is set, and “01” indicating an empty candidate is set in the allocation state of the in-level number 11 (section number 21).
次には区分レベル2のレベル内番号10(区分番号20)の区域が区分要求272cの対象となる。点線の矢印231で対応を示すように割付構成区分表230の区分レベル1に対応するビット値が1であり、かつ区分レベル1が最小分割区分レベルであることから、図11BのステップS1121とステップS1122の処理により、区分レベル1の区域であって区分番号20の区域と同一の領域を占める1組の区域に対応する区分対291bである、区分レベル1の区分割付表161におけるレベル内番号20(区分番号43)の割付状態に使用中を示す“11”を設定し、レベル内番号21(区分番号44)の割付状態に空候補を示す“01”を設定する。 Next, the section of the division level 2 with the level number 10 (section number 20) becomes the target of the section request 272c. As indicated by the dotted arrow 231, since the bit value corresponding to the division level 1 of the allocation configuration division table 230 is 1 and the division level 1 is the minimum division division level, the step S 1121 and the step of FIG. By the processing of S1122, the intra-level number 20 in the division level 1 division division table 161, which is the division pair 291b corresponding to a set of areas that occupy the same area as the division number 20 area, which is the division level 1 area. “11” indicating in use is set in the allocation state of (section number 43), and “01” indicating an empty candidate is set in the allocation state of in-level number 21 (section number 44).
以上で二次割付に伴う多層区分割付表310の更新が完了する。この多層区分割付表310の更新により、一次割付区域280は、二次割付後の一次割付区域280cに示すように多層区分される。矢印273cで対応を示すように、区分レベル3の区分番号8の区域283cが使用中として割り付けられ、それに連続して、矢印271cで対応を示すように区分レベル1の区分番号43の区域281cが使用中として割り付けられて多層区域として二次割付区域290cが割り付けられる。一方、矢印272dで対応を示すように、区分レベル2の区分番号21の区域282dが空候補として割り付けられ、それに連続して、矢印271dで対応を示すように区分レベル1の区分番号44の区域281dが空候補として割り付けられ、併せて隣接多層区域290dとして割り付けられる。二次割付区域290cでは、区域が区分レベルの降順で割り付けられ、隣接多層区域290dでは、区域が二次割付区域とは逆順である区分レベルの昇順で割り付けられる。 This completes the update of the multi-layer division table 310 associated with the secondary allocation. By updating the multi-layer division table 310, the primary allocation area 280 is divided into multiple layers as shown in the primary allocation area 280c after the secondary allocation. As shown by the arrow 273c, the section 283c of the section number 8 of the section level 3 is allocated as in use, and subsequently, the section 281c of the section number 43 of the section level 1 is allocated as shown by the arrow 271c. Allocated as in use and secondary allocated area 290c is allocated as a multilayer area. On the other hand, as shown by the arrow 272d, the section 282d of the section number 21 of the section level 2 is assigned as a blank candidate, and subsequently, the section of the section number 44 of the section level 1 as shown by the arrow 271d. 281d is assigned as an empty candidate, and is also assigned as an adjacent multilayer area 290d. In the secondary allocation area 290c, the areas are allocated in descending order of the partition level, and in the adjacent multi-layer area 290d, the areas are allocated in the ascending order of the partition level which is reverse to the secondary allocation area.
二次割付を行った場合でも、割付区分番号として一次割付で取得した区分番号がファイルシステムに返されるが、上記説明から明らかなとおり、一次割付で取得した区分番号(上記例では3)の区域の先頭位置と、二次割付を行った二次割付区域の先頭位置は同一であることから、ファイル操作システムからの区分番号を指定した割付領域のアドレス問い合わせに対応することができる。
 なお、上述の説明では、二次割付を区分番号の若番側から行っているが、先に仮割付後の一次割付について述べたように、区分番号の老番側から行うことができることは、当業者に明らかである。
Even when secondary allocation is performed, the classification number acquired in the primary allocation is returned to the file system as the allocation classification number. As is clear from the above description, the area of the classification number acquired in the primary allocation (3 in the above example) Since the start position of the second assignment area is the same as the start position of the second assignment area, it is possible to respond to the address inquiry of the assignment area specifying the section number from the file operation system.
In the above description, secondary allocation is performed from the younger number side of the division number, but as described above for primary allocation after provisional allocation, the fact that it can be performed from the old number side of the segment number is, It will be apparent to those skilled in the art.
次に、図12~図17Cを参照して、本発明の一実施形態における割付区域の解放について説明する。区域の割付と同様に、ファイルの削除などによる区域の解放処理もアロケーションシステムの多層区分管理部により行われる。 Next, with reference to FIGS. 12 to 17C, the release of the allocated area in the embodiment of the present invention will be described. Similar to the allocation of areas, the process of releasing areas by deleting files is also performed by the multi-layer division management unit of the allocation system.
 図12は、割付区域を解放し、空区域の連結を試みる処理全体の概略の処理フロー例を説明する図である。図12に示す割付区域の解放処理と空区域の連結により、解放した割付区域を含む区域の割付状態を設定し直して、その区域を再割り付けすることが可能となる。 FIG. 12 is a diagram for explaining an example of a schematic process flow of the entire process for releasing the allocated area and attempting to connect the empty areas. By allocating the allocated area and the free area shown in FIG. 12, it is possible to reset the allocation state of the area including the allocated allocation area and reallocate the area.
 図に示すように、ステップS1201において、区分番号に割付区域番号を設定する。この割付区域番号は、解放の対象となる区域がファイルに割り付けられたときにファイルシステムに返されたものであり、ファイルシステムからの割付区域の解放要求に含ませることができる。また、そのとき併せて割付要求サイズを含ませることもできる。 As shown in the figure, in step S1201, an allocation area number is set as the division number. This allocated area number is returned to the file system when the area to be released is allocated to the file, and can be included in the allocation area release request from the file system. In addition, the allocation request size can be included at that time.
次に、ステップS1202で、設定した区分番号により多層区分管理表を検索して、その区分番号に対応する区分レベルを求める。テップS1202の処理の詳細については、後に図13を参照して説明する。
 次にステップS1203に進み、ステップS1202の処理で区分レベルが求められたかを判定し、求められなかった場合は、処理を終了する。求められた場合は、ステップS1204に進む。
Next, in step S1202, the multi-layered division management table is searched with the set division number, and the division level corresponding to the division number is obtained. Details of the processing in step S1202 will be described later with reference to FIG.
Next, proceeding to step S1203, it is determined whether or not the classification level has been obtained in the process of step S1202, and if not, the process is terminated. If so, the process proceeds to step S1204.
 ステップS1204では、解放区分レベルに、ステップS1202の処理で求められた区分レベルを設定し、ステップS1205において、連結要求と名付ける一時的記憶領域に、空区域の連結を試みるフラグとしてありを初期設定する。 In step S1204, the partition level obtained in the process of step S1202 is set as the release partition level, and in step S1205, a temporary storage area named as a connection request is initially set as a flag for attempting to connect empty areas. .
 次に、ステップS1206において、区分番号の指す一次割付区域内に含まれる区域の解放と空区域の連結を試みる。元の割付要求がシングルビット要求であれば、ステップS1201で設定された区分番号の割付状態に空を設定すればステップS1206の処理は終了する。元の割付要求がマルチビット要求であれば、二次割付が行われており、二次割付領域の解放が行われるだけでなく、隣接多層区域の空候補区域と解放された区域とを連結して上位区分レベルの区域の割付状態を空とすることが試みられる。ステップS1206の処理の詳細は、後に図14A、図14Bを参照して説明する。 Next, in step S1206, an attempt is made to release an area included in the primary allocation area indicated by the division number and connect an empty area. If the original allocation request is a single bit request, the processing in step S1206 ends if the allocation state of the division number set in step S1201 is set to empty. If the original allocation request is a multi-bit request, secondary allocation has been performed and not only the secondary allocation area is released, but also the empty candidate area in the adjacent multi-layer area is linked to the released area. An attempt is made to empty the allocation status of the upper division level area. Details of the processing in step S1206 will be described later with reference to FIGS. 14A and 14B.
 次にステップS1207において、連結要求はありか判定する。ありでなければ処理を終了し、ありであれば、ステップS1208において、区分番号の指す一次割付区域と隣接する隣接区域とを連結して上位の区域の割付状態を空とすることが試みられる。後の説明から明らかになるが、連結要求がありでステップS1208に進むのは、ステップS1206の処理で、一次割付区域が解放された場合である。ステップS1208の処理の詳細は、後に図17A、図17B及び図17Cを参照して説明する。 Next, in step S1207, it is determined whether there is a connection request. If not, the process ends. If there is, an attempt is made in step S1208 to connect the primary allocation area indicated by the section number and the adjacent area adjacent to each other to make the allocation state of the upper area empty. As will be apparent from the following description, there is a connection request and the process proceeds to step S1208 when the primary allocation area is released in the process of step S1206. Details of the processing in step S1208 will be described later with reference to FIGS. 17A, 17B, and 17C.
 ステップS1208の処理が終了すると図12に示す処理は終了する。
 図13は、図12のステップS1202の処理の詳細を説明するものであり、区分番号により多層区分管理表を検索し、その区分番号に対応する区分レベルを求める処理フロー例を説明する図である。
When the process of step S1208 ends, the process shown in FIG. 12 ends.
FIG. 13 explains the details of the processing in step S1202 of FIG. 12, and is a diagram for explaining an example of a processing flow for searching a multi-layered division management table by division number and obtaining a division level corresponding to the division number. .
 先ず、ステップS1301で、総区分数管理表より、総区分数を取り出す。そしてステップS1302で、区分番号は有意かつ総区分数より小さいか判定する。ここで区分番号には、図12のステップS1201で割付区域の解放要求元から与えられた割付区分番号が設定されている。ステップS1302の処理は、この割付区分番号の値が有効な範囲内であるかをチェックするとともに、以下の処理に対して、区分番号に対応する区分レベルの区分ユニットの存在を保証するものである。 First, in step S1301, the total number of divisions is extracted from the total division number management table. In step S1302, it is determined whether the section number is significant and smaller than the total number of sections. Here, as the division number, the allocation division number given from the allocation area release request source in step S1201 of FIG. 12 is set. The processing in step S1302 checks whether the value of the assigned division number is within a valid range, and guarantees the existence of a division level division unit corresponding to the division number for the following processing. .
 ステップS1302の判定結果が否定的なものであれば、該当する区分レベルなしを返して処理を終了し、肯定的なものであればステップS1303に進む。
ステップS1303では、区分レベルに初期値として多層区分管理表の最上位の区分レベルを設定する。図3に示す例では、区分レベルに7が設定される。
If the determination result in step S1302 is negative, the corresponding classification level is not returned, and the process ends. If the determination result is affirmative, the process proceeds to step S1303.
In step S1303, the highest partition level of the multi-layer partition management table is set as the initial value for the partition level. In the example shown in FIG. 3, 7 is set as the division level.
 次に、ステップS1304で、先頭番号管理表より、区分レベルの指す先頭番号を取り出し、ステップS1305で、取り出した先頭番号は有意であるかを判定する。先頭番号が有意でない場合はステップS1306に進み、区分レベルを1つ減らしてステップS1304に戻る。上述のステップS1304~ステップS1306のループ処理は、最上位の区分レベルから実際に割り当てられた区域の区分レベルの1つ上位の区分レベルまでの区分レベルの判定処理をスキップするものである。 Next, in step S1304, the start number indicated by the division level is extracted from the start number management table, and in step S1305, it is determined whether the extracted start number is significant. If the head number is not significant, the process proceeds to step S1306, the division level is decreased by 1, and the process returns to step S1304. The loop processing from step S1304 to step S1306 described above skips the division level determination processing from the highest division level to the division level one level higher than the division level of the actually allocated area.
一方、取り出した先頭番号が有意である場合はステップS1307に進み、区分レベルは最下位の区分レベルか判定する。区分レベルが最下位の区分レベルであれば、区分レベルありとして最下位の区分レベル0の情報を返して処理を終了する。区分レベルが最下位の区分レベルでなければ、ステップS1308に進み、先頭番号管理表より、区分レベルを1つ減らした値の指す先頭番号を、次の先頭番号として取り出し、ステップS1309で、区分番号は次の先頭番号より小さいかを判定する。区分番号は次の先頭番号より小さいと判定された場合は、区分レベルありとして区分レベルを返して処理を終了する。ステップS1309で、区分番号は次の先頭番号より小さくはないと判定された場合は、ステップS1310に進み、区分レベルを1つ減らしてステップS1307に戻る。 On the other hand, if the extracted leading number is significant, the process advances to step S1307 to determine whether the division level is the lowest division level. If the division level is the lowest division level, the information of the lowest division level 0 is returned as the division level is present, and the process is terminated. If the partition level is not the lowest partition level, the process proceeds to step S1308, and the start number pointed to by the value obtained by subtracting the partition level from the start number management table is extracted as the next start number. In step S1309, the partition number Determines whether it is less than the next head number. If it is determined that the division number is smaller than the next head number, the division level is returned as the division level is present, and the process is terminated. If it is determined in step S1309 that the segment number is not smaller than the next head number, the process proceeds to step S1310, the segment level is decreased by 1, and the process returns to step S1307.
 上記のステップS1307~ステップS1310のループ処理を区分レベルを1つずつ減らしながら繰り返し、区分レベルが最下位の区分レベルになる前に、ある区分レベルのステップS1309の判定において、区分番号が初めて次の区分レベルの先頭番号より小さくなったときの区分レベルが、区分番号の指す区分ユニットに係る区分レベルである。区分番号が次の区分レベルの先頭番号より小さくなる前に、区分レベルが最下位の区分レベルになると、最下位の区分レベル、すなわち区分レベル0が該当する区分レベルとなる。 The above loop processing from step S1307 to step S1310 is repeated while decreasing the partition level by one, and before the partition level becomes the lowest partition level, in the determination of step S1309 of a certain partition level, The partition level when it becomes smaller than the head number of the partition level is the partition level related to the partition unit indicated by the partition number. If the partition level becomes the lowest partition level before the partition number becomes smaller than the head number of the next partition level, the lowest partition level, that is, the partition level 0 becomes the corresponding partition level.
 次に図14A、図14Bを参照して、図12のステップS1206の処理の詳細を説明する。
 図14Aは、区分番号の指す一次割付区域内に含まれる区域の解放と空区域の連結を試みる処理フロー例を説明する図である。
Next, details of the processing in step S1206 in FIG. 12 will be described with reference to FIGS. 14A and 14B.
FIG. 14A is a diagram for explaining an example of a processing flow for attempting to release an area included in the primary allocation area indicated by the division number and connect an empty area.
 まずステップS1401において、割付要求サイズより、割付構成区分表を作成する。割付要求サイズは、先に述べたように区域の解放要求をしたファイルシステムの解放要求に含まれるものとすることができる。割付構成区分表は、図11Aに示すステップS1104の処理と同様に作成する。図11Aに示すものはマルチビット要求の割付要求についてのものであるが、シングルビット要求の場合ではビット値が1のビット位置が1か所の割付構成区分表が構成されることは明らかである。 First, in step S1401, an allocation configuration division table is created from the allocation request size. The allocation request size can be included in the release request of the file system that requested the area release as described above. The allocation configuration division table is created in the same manner as the processing in step S1104 shown in FIG. 11A. Although FIG. 11A shows an allocation request for a multi-bit request, it is clear that an allocation configuration table with a bit value of 1 is formed in the case of a single bit request. .
 次にステップS1402において、最小区分レベルに、割付構成区分表の下位0ビット目から見た最初のビット1が立つビット位置を設定する。
 ステップS1405では、割付構成区分表により、割付区域内の分割割付状況を求めて分割割付状況スタックにプッシュし、ステップS1407に進む。ここで、分割割付状況とは、割付区域を分割割付した区域の区分レベル、区分番号、解放表示である。区分レベルの指す割付構成区分表のビット値が1のときに、解放表示はありとされ、ビット値が0のとき、なしとされる。ステップS1405の処理の詳細については、後に図15を参照して説明する。
Next, in step S1402, the bit position where the first bit 1 viewed from the low-order 0th bit of the allocation configuration section table is set at the minimum section level.
In step S1405, the division allocation status in the allocation area is obtained from the allocation configuration classification table and pushed onto the division allocation status stack, and the process proceeds to step S1407. Here, the division allocation status is a division level, a division number, and a release display of an area where the allocation area is divided and assigned. When the bit value of the allocation configuration division table indicated by the division level is 1, the release indication is given, and when the bit value is 0, the release indication is given. Details of the processing in step S1405 will be described later with reference to FIG.
 ステップS1407においては、分割割付状況スタックをポップして、区分レベル、区分番号、解放表示を読み出す。
 次にステップS1409において、該読み出した区分レベルは解放区分レベルであるか判定し、区分レベルが解放区分レベルであればステップS1416に分岐し、解放区分レベルでなければステップS1411に進む。なお、元の割付要求がシングルビット要求であれば、最初のステップS1409の判定処理でステップS1416に分岐することになる。
In step S1407, the division allocation status stack is popped, and the division level, division number, and release display are read out.
In step S1409, it is determined whether the read partition level is the release partition level. If the partition level is the release partition level, the process branches to step S1416. If the partition level is not the release partition level, the process proceeds to step S1411. If the original allocation request is a single bit request, the process branches to step S1416 in the determination process of the first step S1409.
 ステップS1411では、ステップS1407で読み出した解放表示はありを示しているか判定する。解放表示がありであればステップS1413に進み、解放表示がありでなければステップS1412に進む。
 ステップS1412では、連結要求はありか判定する。ありであればステップS1413に進み、ありでなければステップS1407に戻る。
In step S1411, it is determined whether the release display read in step S1407 indicates “Yes”. If there is a release display, the process proceeds to step S1413. If there is no release display, the process proceeds to step S1412.
In step S1412, it is determined whether there is a connection request. If there is, the process proceeds to step S1413. If not, the process returns to step S1407.
 ステップS1413では、区分番号の指す区分対の解放を試み、ステップS1407に戻る。ステップS1413の処理の詳細は、後に図16を参照して説明する。
 上述のステップ1409の判定で区分レベルは解放区分レベルと等しいと判定されて分岐するステップS1416以降の処理は、解放区分レベルの区域の解放処理である。
In step S1413, an attempt is made to release the segment pair indicated by the segment number, and the process returns to step S1407. Details of the processing in step S1413 will be described later with reference to FIG.
The processing after step S1416 in which it is determined that the partition level is equal to the release partition level in the determination of step 1409 described above is a release processing of the area of the release partition level.
 ステップS1416では、連結要求はありか判定し、ありでなければ処理を終了し、ありであれば、ステップS1417において、区分番号の指す多層区分割付表の割付状態を空として処理を終了する。すなわち、マルチビット要求の場合でも、連結要求がありであれば、二次割付区域と隣接多層区域からなる一次割付区域についての割付状態は、ステップS1417の処理により空に設定される。 In step S1416, it is determined whether there is a connection request. If there is no connection request, the process is terminated. That is, even in the case of a multi-bit request, if there is a connection request, the allocation state for the primary allocation area composed of the secondary allocation area and the adjacent multi-layer area is set to be empty by the process of step S1417.
 図14Bは、図3に示す多層区分割付表310を参照して、図14A及び後記図16に示す一次割付区域内に含まれる区域の解放と空区域の連結を試みる処理を、具体例により、説明する図である。
 図14Bに示す例は、図11Cに例示するものと同様なマルチビット要求で二次割付された二次割付区域を解放し、隣接区域と連結して上位区分レベルの区域の割付状態に空を設定するものである。したがって、割付要求サイズ220と割付構成区分表230に設定された値は図11Cに示すものと同じである。
図14Bに示す二次割付後の一次割付区域280cは、二次割付区域を解放し連結する前の割付状態のものであり、図11Cに示す二次割付後の一次割付区域280cの空候補であった区分番号21の区域282dが使用中となっている。区分番号44の区域281dの割付状態は空候補のままである。
FIG. 14B refers to the multi-layer partition allocation table 310 shown in FIG. 3 and, according to a specific example, a process of attempting to release an area included in the primary allocation area shown in FIG. 14A and FIG. It is a figure explaining.
The example shown in FIG. 14B releases the secondary allocation area secondary allocated by the multi-bit request similar to that illustrated in FIG. 11C, and concatenates with the adjacent area to empty the allocation status of the upper division level area. It is to set. Therefore, the values set in the allocation request size 220 and the allocation configuration classification table 230 are the same as those shown in FIG. 11C.
The primary allocation area 280c after the secondary allocation shown in FIG. 14B is the allocation state before the secondary allocation area is released and connected, and is an empty candidate for the primary allocation area 280c after the secondary allocation shown in FIG. 11C. The area 282d of the section number 21 that is present is in use. The allocation state of the area 281d of the division number 44 remains an empty candidate.
 解放と連結の処理は、割付構成区分表230のビット値を参照しながら、最小区分レベルである区分レベル1から上位の区分レベルへと順次行われていく。
 まず、最小区分レベルである区分レベル1においては、割付構成区分表230の対応するビット値は1(点線の矢印231aで対応を示す)である。すなわち、解放表示はありなので、図14AのステップS1413、すなわち図16に示す処理が実行される。区分レベル1の解放要求の矢印251aが示すように、区域281cの解放が保障されていることと、符号161cを付した解放前の区分レベル1の区分割付表の、区分番号171の値が43でレベル内番号172の値が20の区域と対をなす区分番号44の区域の割付状態が空候補であることから、後に説明する図16のステップS1605での判定が肯定的なものとなり、区分番号43の区域と区分番号44の区域からなる区分レベル1の区分対291cの上位の区分レベルの区域の割付状態に空を設定する連結要求(矢印241cに示す)がありとされ、符号161dを付した解放後の区分レベル1の区分割付表に示すように、区分番号43及び対の区分番号44の割付状態には保留が設定される。上位区分レベルの区域の空が設定されるとき、その区域に包含される下位の区分レベルの区域の割付状態に保留を設定することは、図3に示す多層区分割付表310の初期設定の場合と同様である。
The release and concatenation processes are sequentially performed from the partition level 1 that is the minimum partition level to the higher partition level while referring to the bit values in the allocation configuration partition table 230.
First, in the division level 1 which is the minimum division level, the corresponding bit value of the allocation configuration division table 230 is 1 (corresponding is indicated by a dotted arrow 231a). That is, since there is a release display, step S1413 in FIG. 14A, that is, the process shown in FIG. 16 is executed. As indicated by the partition level 1 release request arrow 251a, the release of the zone 281c is guaranteed, and the value of the partition number 171 in the partition level 1 partitioning table before the release indicated by the reference numeral 161c is 43. Since the assignment state of the area of the division number 44 that is paired with the area of the level number 172 of 20 is an empty candidate, the determination in step S1605 in FIG. It is assumed that there is a connection request (indicated by an arrow 241c) for setting the allocation state of the division level 1 division pair 291c consisting of the division of the division number 43 and the division number 44 division to be empty, indicated by an arrow 241c. As shown in the division level attached table of division level 1 after release, the allocation state of the division number 43 and the paired division number 44 is set to hold. In the case of the initial setting of the multi-layered division table 310 shown in FIG. 3, when the sky of the upper division level area is set, setting the hold to the allocation state of the lower division level area included in the area It is the same.
 区分レベル2においては、割付構成区分表230の対応するビット値は0(点線の矢印232aで対応を示す)であり、連結要求241cがありなので矢印241dに示すように上位の区分の区域である、符号162cを付した解放前の区分レベル2の区分割付表の区分番号20の区域の解放要求がされる。区分番号20の区域と区分対292cを構成する区分番号21の区域は使用中なので、図16のステップS1605での判定が否定的なものとなり、矢印242cで示すように、区分番号20の区域のみ解放され、区分対292cの割付状態は、符号162dを付した解放後の区分レベル2の区分割付表に示すように空と使用中になる。また、連結要求はなしとなる。したがって、点線の矢印242dに示すように区分対292cの上位の区域であり、符号163cを付した解放前の区分レベル3の区分割付表に示すように割付状態が使用中の区分番号9の区域は解放されない。 In the division level 2, the corresponding bit value of the allocation configuration division table 230 is 0 (indicating the correspondence by the dotted arrow 232a), and since there is a connection request 241c, it is the upper division area as shown by the arrow 241d. , A request for releasing the area of the division number 20 in the division level attached table of the division level 2 before the release with the reference numeral 162c is made. Since the area of the division number 20 and the area of the division number 21 constituting the division pair 292c are in use, the determination in step S1605 of FIG. 16 is negative, and only the area of the division number 20 is shown as indicated by the arrow 242c. The allocation state of the partition pair 292c becomes empty and in use, as shown in the partition level 2 partition allocation table after release with reference numeral 162d. Also, there is no connection request. Therefore, it is the area above the division pair 292c as indicated by the dotted arrow 242d, and the area of the division number 9 in which the allocation state is in use as indicated in the division level 3 divisional table before release, which is denoted by reference numeral 163c. Will not be released.
 次に区分レベル3においては、割付構成区分表230の対応するビット値は1(点線の矢印233aで対応を示す)であり、区分レベル3の解放要求の矢印253aが示すように、区域283cが解放される。しかし、先に述べたように、割付状態が使用中の区分番号9の区域は解放されず使用中である。したがって、矢印243cで示すように、区分番号9の区域と区分対293cを構成する区分番号8の区域のみ解放され、区分対293cの割付状態は、符号163dを付した解放後の区分レベル3の区分割付表に示すように空と使用中になる。また、連結要求はなしとなるので、点線の矢印244dに示すように区分対293cの上位の区域であり、符号164を付した解放前の区分レベル4の区分割付表に示すように割付状態が使用中の区分番号3の区域は解放されず、割付状態は使用中のままである。 Next, at the division level 3, the corresponding bit value of the allocation configuration division table 230 is 1 (indicated by the dotted arrow 233a), and the area 283c is indicated by the release level arrow 253a of the division level 3 as shown. To be released. However, as described above, the area of division number 9 whose allocation state is in use is not released and is in use. Therefore, as indicated by the arrow 243c, only the area of the division number 9 and the area of the division number 8 constituting the division pair 293c are released, and the allocation state of the division pair 293c is the level of the division level 3 after the release with the reference numeral 163d. It becomes empty and in use as shown in the Warranty Schedule. In addition, since there is no connection request, it is an upper area of the division pair 293c as shown by the dotted arrow 244d, and the allocation status is used as shown in the division division table of division level 4 before release with reference numeral 164. The area of partition number 3 in the inside is not released, and the allocation state remains in use.
 以上の区域の解放と連結の処理により、二次割付区域を解放した後の割付状態の一次割付区域280dは、矢印273e、272e及び点線の矢印272fで多層区分割付表310の割付状態との対応を示すように、区分番号が8で空の区域283cと区分番号が20で空の区域282c、及び区分番号が21で使用中の区域282dに区分される。 The primary allocation area 280d after the secondary allocation area is released by the above-described release and connection processing corresponds to the allocation state of the multi-layer division allocation table 310 by arrows 273e and 272e and dotted arrow 272f. As shown, the section number 8 is an empty area 283c, the section number 20 is an empty area 282c, and the section number 21 is an in-use area 282d.
 図15は、図14AのステップS1405の処理の詳細を説明するものであり、割付構成区分表により、割付区域内の分割割付状況を求めて分割割付状況スタックにプッシュする処理フロー例を説明する図である。 FIG. 15 is a diagram for explaining the details of the processing in step S1405 in FIG. 14A. FIG. 15 is a diagram for explaining an example of a processing flow for obtaining the split allocation status in the allocation area and pushing it to the split allocation status stack using the allocation configuration classification table. It is.
 まず、ステップS1501で、区分レベルに、図12に示すステップS1204で設定した解放区分レベルを設定し、次にステップS1501aにおいて、先頭番号管理表より、区分レベルの指す先頭番号を取り出し、ステップS1501bで、レベル内番号に、区分番号から該読み出した管理情報の先頭番号を減じた値を設定してステップS1502に進む。 First, in step S1501, the release partition level set in step S1204 shown in FIG. 12 is set as the partition level. Next, in step S1501a, the leading number indicated by the partition level is extracted from the leading number management table, and in step S1501b. Then, a value obtained by subtracting the head number of the read management information from the division number is set in the in-level number, and the process proceeds to step S1502.
 ステップS1502では、割付構成区分表より区分レベルの指すビット値を解放表示として取り出す。ビット値が1であれば解放表示ありとし、ビット値が0であれば解放表示なしとする。
 そして、ステップS1502aにおいて、割付区域内の分割割付状況として、区分レベル、区分番号、解放表示を分割割付状況スタックにプッシュする。
In step S1502, the bit value pointed to by the division level is extracted from the allocation configuration division table as a release display. If the bit value is 1, the display is released, and if the bit value is 0, the release is not displayed.
In step S1502a, the division level, the division number, and the release display are pushed onto the division allocation status stack as the division allocation status in the allocation area.
 次にステップS1504に進み、区分レベルは最小区分レベルに等しいか判定する。区分レベルが最小区分レベルよりも大きいと判定されると、ステップS1504aに分岐して解放表示はありか判定し、解放表示がありでなければステップS1506に進み、解放表示がありであれば、ステップS1505で、レベル内番号に1を加えてステップS1506に進む。
ステップS1506では、レベル内番号を2倍にし、ステップS1507で区分レベルを1つ減らす。さらに、ステップS1507aで、先頭番号管理表より、区分レベルの指す先頭番号を取り出し、ステップS1507bで、区分番号に、先頭番号にレベル内番号を加えた値を設定してステップS1502に戻る。
In step S1504, it is determined whether the partition level is equal to the minimum partition level. If it is determined that the segment level is higher than the minimum segment level, the process branches to step S1504a to determine whether there is a release display. If there is no release display, the process proceeds to step S1506. In step S1505, 1 is added to the in-level number, and the flow advances to step S1506.
In step S1506, the in-level number is doubled, and in step S1507, the division level is decreased by one. In step S1507a, the head number indicated by the section level is extracted from the head number management table. In step S1507b, a value obtained by adding the in-level number to the head number is set in the section number, and the process returns to step S1502.
 上述のステップS1502~ステップS1507bのループ処理を、ステップS1504において区分レベルが最小区分レベルと等しいと判定されるまで繰り返す。ステップS1504において区分レベルが最小区分レベルと等しいと判定されると、処理を終了する。 The above-described loop processing from step S1502 to step S1507b is repeated until it is determined in step S1504 that the division level is equal to the minimum division level. If it is determined in step S1504 that the segment level is equal to the minimum segment level, the process ends.
 図14Bの例示では、区分番号に3、区分レベルに4、レベル内番号には2が初期設定されており、割付構成区分表の区分レベル4の指すビット値は0であるから、最初に分割割付状況スタックにプッシュされる区分レベル、区分番号、解放表示は、それぞれ4、3、0(解放表示なし)である。 In the example of FIG. 14B, the division number is 3, the division level is 4, and the intra-level number is 2 and the bit value indicated by the division level 4 in the allocation configuration division table is 0. The partition level, the partition number, and the release display pushed to the allocation status stack are 4, 3, and 0 (no release display), respectively.
区分レベル4の処理では、解放表示はなしなので、レベル内番号は2×2=4に更新される。区分レベルは3に更新されて、区分番号は、区分レベル3の指す先頭番号管理表の先頭番号“4”とレベル内番号“4”の和である“8”に更新される。また、割付構成区分表の区分レベル3の指すビット値は1である。したがって、分割割付状況スタックには、区分レベル、区分番号、解放表示として、それぞれ、3、8、1(解放表示あり)がプッシュされる。 In the processing of the division level 4, since the release display is not performed, the in-level number is updated to 2 × 2 = 4. The division level is updated to 3, and the division number is updated to “8” which is the sum of the start number “4” in the start number management table indicated by the division level 3 and the in-level number “4”. The bit value indicated by the division level 3 in the allocation configuration division table is 1. Therefore, 3, 8, and 1 (with release indication) are pushed as the division level, the division number, and the release indication on the division allocation status stack, respectively.
区分レベル3の処理では、解放表示はありなのでレベル内番号は(4+1)×2=10に更新される。区分レベルは2に更新されて、区分番号は、区分レベル2の指す先頭番号管理表の先頭番号“10”とレベル内番号“10”の和である“20”に更新される。また、割付構成区分表の区分レベル2の指すビット値は0である。したがって、分割割付状況スタックには、区分レベル、区分番号、解放表示として、それぞれ、2、20、0(解放表示なし)がプッシュされる。 In the processing of the division level 3, since there is a release display, the in-level number is updated to (4 + 1) × 2 = 10. The division level is updated to 2, and the division number is updated to “20” which is the sum of the start number “10” of the start number management table indicated by the division level 2 and the in-level number “10”. In addition, the bit value indicated by the division level 2 in the allocation configuration division table is 0. Therefore, 2, 20, and 0 (no release indication) are pushed as the division level, the division number, and the release indication on the division allocation status stack, respectively.
区分レベル2の処理では、解放表示はなしなのでレベル内番号は10×2=20に更新される。区分レベルは最小区分レベルである1に更新されて、区分番号は、区分レベル1の指す先頭番号管理表の先頭番号“23”とレベル内番号“20”の和である“43”に更新される。また、割付構成区分表の区分レベル1の指すビット値は1である。したがって、分割割付状況スタックには、区分レベル、区分番号、解放表示として、それぞれ、1、43、1(解放表示あり)がプッシュされる。 In the processing of the division level 2, there is no release display, so the in-level number is updated to 10 × 2 = 20. The division level is updated to 1 which is the minimum division level, and the division number is updated to “43” which is the sum of the start number “23” of the start number management table indicated by the division level 1 and the in-level number “20”. The In addition, the bit value indicated by the division level 1 in the allocation configuration division table is 1. Therefore, 1, 43 and 1 (with release indication) are pushed as the division level, the division number, and the release indication, respectively, on the split allocation status stack.
図14Bに示す例は、マルチビット要求で割り付けられた領域を解放するものである。シングルビット要求で割り付けられた領域を解放するのであれば、解放区分レベルと最小区分レベルは等しく、分割割付状況スタックにプッシュされる区分レベル、区分番号、解放表示は1組だけであり、解放表示はありである。 In the example shown in FIG. 14B, the area allocated by the multi-bit request is released. If the area allocated by a single bit request is to be released, the release partition level and the minimum partition level are the same, and only one set of partition level, partition number, and release display is pushed to the partition allocation status stack, and the release display There is.
 上述の分割割付状況スタックにプッシュされた分割割付状況としての区分レベル、区分番号、解放表示と、図12のステップS1205で「あり」に初期設定され、後記図16に示す処理により更新される連結要求により、図14Bに例示する割付区域の解放が行われる。 The division level, division number, and release display as the division allocation status pushed to the above-described division allocation status stack, and the connection that is initially set to “Yes” in step S1205 of FIG. 12 and updated by the process shown in FIG. According to the request, the allocation area illustrated in FIG. 14B is released.
 図16は、図14AのステップS1413の処理の詳細を説明するものであり、区分番号の指す区分対の解放を試みる処理フロー例を説明する図である。図14Aに示す処理フローのとおり、図16に示す処理ステップは、分割割付状況スタックを順次ポップすることにより、最小区分レベルから解放区分レベルの1つ下位の区分レベルまでの区分レベル毎に実行される。 FIG. 16 is a diagram for explaining details of the processing in step S1413 in FIG. 14A, and is a diagram for explaining an example of a processing flow for attempting to release a pair of segments indicated by a segment number. As shown in the processing flow of FIG. 14A, the processing steps shown in FIG. 16 are executed for each partition level from the minimum partition level to the partition level one level lower than the release partition level by sequentially popping the split allocation status stack. The
 図に示すとおり、まずステップS1602で、対の区分番号に、区分番号に値1を加算した値を設定してステップS1604に進み、対の区分番号の指す多層区分割付表の割付状態を読み出し、ステップS1605で、読み出した割付状態が空または空候補であるか判定する。読み出した割付状態が空または空候補であれば、ステップS1606に進み、読み出した割付状態が空でも空候補でもなければ、ステップS1609に分岐する。 As shown in the figure, first, in step S1602, a value obtained by adding the value 1 to the partition number is set in the pair partition number, and the process proceeds to step S1604, where the allocation state of the multi-layer partition table attached by the pair partition number is read, In step S1605, it is determined whether the read allocation state is empty or empty candidate. If the read assignment state is empty or empty candidate, the process proceeds to step S1606. If the read assignment state is neither empty nor empty candidate, the process branches to step S1609.
ステップS1606では、区分番号の指す多層区分割付表の割付状態に保留を設定し、ステップS1607で、対の区分番号の指す多層区分割付表の割付状態に保留を設定する。次にステップS1608で連結要求にありを設定して処理を終了する。これらのステップS1606~S1608の処理は、図14Bの例示では、矢印241cで示す連結要求ありの処理に対応する。 In step S1606, a hold is set in the allocation state of the multi-layer partition table attached by the category number, and in step S1607, a hold is set in the allocation state of the multi-layer partition table attached by the pair category number. In step S1608, the presence of the connection request is set, and the process ends. The processes in steps S1606 to S1608 correspond to the process with a connection request indicated by the arrow 241c in the example of FIG. 14B.
一方、ステップS1609に分岐した場合は、区分番号の指す多層区分割付表の割付状態に空を設定し、ステップS1610で、連結要求になしを設定して処理を終了する。この処理は、図14Bの例示では、矢印242c、243cで示す自区域のみ解放の処理に対応する。 On the other hand, when branching to step S1609, empty is set in the allocation state of the multi-layer partitioning table indicated by the partition number, and in step S1610, nothing is set in the connection request, and the process ends. In the example of FIG. 14B, this process corresponds to the process of releasing only the own area indicated by the arrows 242c and 243c.
次に図17A、図17B及び図17Cを参照して、図12のステップS1208の処理の詳細を説明する。
図17Aは、一次割付区域と、隣接する空区域とを連結して上位の区域の割付状態を空とすることを試みる処理フロー例を説明する図である。
Next, details of the processing in step S1208 in FIG. 12 will be described with reference to FIGS. 17A, 17B, and 17C.
FIG. 17A is a diagram illustrating an example of a processing flow in which the primary allocation area and an adjacent empty area are connected to try to make the allocation state of the upper area empty.
 図に示すように、ステップS1701で、区分レベルに解放区分レベルを設定し、ステップS1702に進む。
 ステップS1702では、先頭番号管理表より、区分レベルの指す先頭番号を取り出し、ステップS1703aにおいて、区分番号に、取り出した先頭番号にレベル内番号を加えた値を設定してステップS1703bに進む。ステップS1703aの最初の処理、すなわち解放区分レベルでの処理では、レベル内番号は、図14Aに示すステップS1405の処理の詳細を示す図15の処理フローのステップS1501bにより設定されている。
As shown in the figure, in step S1701, the release partition level is set as the partition level, and the flow advances to step S1702.
In step S1702, the start number indicated by the division level is extracted from the start number management table. In step S1703a, the value obtained by adding the in-level number to the extracted start number is set in step S1703a, and the process proceeds to step S1703b. In the first process of step S1703a, that is, the process at the release section level, the in-level number is set by step S1501b of the process flow of FIG. 15 showing details of the process of step S1405 shown in FIG. 14A.
 ステップS1703bでは、主区分番号管理表より、区分レベルの指す主区分番号を取り出し、ステップS1705に進む。
 ステップS1705では、区分番号と主区分番号が等しいか判定する。等しければステップS1710に分岐し、等しくなければステップS1706に進む。
 ステップS1706では、区分番号の指す区分対の解放を試みる。ステップS1706の処理の詳細は、後に図17Cを参照して説明する。
In step S1703b, the main division number indicated by the division level is extracted from the main division number management table, and the process proceeds to step S1705.
In step S1705, it is determined whether the division number is equal to the main division number. If equal, the process branches to step S1710, and if not equal, the process proceeds to step S1706.
In step S1706, an attempt is made to release the pair of segments indicated by the segment number. Details of the processing in step S1706 will be described later with reference to FIG. 17C.
 次にステップS1707に進み、連結要求はありか判定する。連結要求がありでなければ、図16のステップS1605において、対の区分番号の割付状態は空でも空候補でもないと判定されたことを意味するから、区域の連結処理を終了し、連結要求がありであれば、ステップS1708以降の処理に分岐して上位の区分レベルの区域の連結処理を試みる。
 ステップS1708では、区分レベルを1つ上位のものとし、ステップS1709に進んで、レベル内番号に、レベル内番号を値2で割った商を設定してステップS1702に戻る。
In step S1707, it is determined whether there is a connection request. If there is no connection request, it means that it is determined in step S1605 in FIG. 16 that the assignment state of the paired segment number is neither empty nor empty candidate. If there is, the process branches to the processing of step S1708 and the subsequent steps, and the connection processing of the upper division level area is attempted.
In step S1708, the division level is set one level higher, the process proceeds to step S1709, the quotient obtained by dividing the in-level number by the value 2 is set in the in-level number, and the process returns to step S1702.
 ステップS1705で、区分番号と主区分番号が等しいと判定された場合に分岐するステップS1710では、区分番号の指す多層区分割付表の割付状態を空に設定して処理を終了する。区分番号と主区分番号が等しい場合は、図3の例示から明らかなようにその区分番号と対をなす区分番号の区域は存在しないことから、ステップS1710では、区分番号の指す多層区分割付表の割付状態を空に設定して処理を終了する。 In step S1710, which branches when it is determined in step S1705 that the division number and the main division number are equal, the allocation state of the multi-layer division table attached by the division number is set to be empty, and the process ends. When the section number is equal to the main section number, there is no section of the section number that is paired with the section number as is clear from the illustration of FIG. The allocation state is set to empty and the process ends.
 図17Bは、図3に示す多層区分割付表310を参照して、図17A及び後記図17Cに示す一次割付区域と、隣接する空区域とを連結して上位の区域の割付状態を空とすることを試みる処理を、具体例により、説明する図である。なお、以下の説明では、一次割付区域と、隣接する空区域とを連結して上位の区域の割付状態を空とすることを、単に、連結ということがある。 FIG. 17B refers to the multi-layer division table 310 shown in FIG. 3 and connects the primary allocation area shown in FIG. 17A and FIG. 17C and the adjacent empty area to make the allocation state of the upper area empty. It is a figure explaining the process which tries this by a specific example. In the following description, connecting the primary allocation area and the adjacent empty area to make the allocation state of the upper area empty may be simply referred to as connection.
図17Bに示す例は、図8Bに例示するものと同様なシングルビット要求で一次割付された区域が解放されたので隣接区域と連結して上位区分レベルの区域の割付状態に空を設定するものである。
図17Bには、解放された一次割付区域を連結する前の割付状態の多層区域として、図8Bに示す一次割付後の仮割付区域280bの使用中であった区分番号31の区域が解放され、空であった区分番号7の区域283bが使用中となっている多層区域280eが例示されている。区分番号32の区域281bと区分番号15の区域282bの割付状態は空のままである。
In the example shown in FIG. 17B, since the area allocated primarily by the single bit request similar to that illustrated in FIG. 8B is released, the allocation state of the upper division level area is set empty by concatenating with the adjacent area. It is.
In FIG. 17B, the area of the division number 31 that was in use of the temporary allocation area 280b after the primary allocation shown in FIG. 8B is released as the multilayer area in the allocated state before the released primary allocation area is connected, A multi-layered area 280e is illustrated in which the area 283b of the division number 7 that was empty is in use. The allocation state of the area 281b with the division number 32 and the area 282b with the division number 15 remains empty.
連結処理は、解放区分レベルである区分レベル1から、連結処理がそれ以上不可能になる上位の区分レベルへと順次行われていく。すなわち、解放された区分番号31の区域281aに順次隣接した区域であって使用中でない区域を連結していく。 The concatenation process is sequentially performed from the segment level 1 that is the release segment level to the higher segment level where the concatenation process is no longer possible. That is, the areas that are adjacent to the area 281a of the section number 31 that has been released and that are not in use are connected.
まず、図12に示すステップS1207の判定が肯定的であったことから、解放された区域281aに対して、矢印240eに示す連結要求が行われ、解放区分レベルである区分レベル1の処理が行われる。符号161eを付した区分レベル1の区分割付表の、区分番号171の値が31でレベル内番号172の値が8の区域と対をなす区分番号32の区域の割付状態が空であることから、区分番号31の区域と区分番号32の区域からなる区分対291dの上位の区分レベルの区域の割付状態に空を設定する連結要求(矢印241eに示す)がありとされ、符号161fを付した区分レベル1の区分割付表に示すように、区分番号31及び対の区分番号32の割付状態には保留が設定される。図14Bの説明においても述べたように、上位区分レベルの区域の空が設定されるとき、その区域に包含される下位の区分レベルの区域の割付状態に保留を設定することは、図3に示す多層区分割付表310の初期設定の場合と同様である。 First, since the determination in step S1207 shown in FIG. 12 is affirmative, a connection request indicated by an arrow 240e is made to the released area 281a, and the processing of the division level 1 that is the release division level is performed. Is called. In the division level 1 division table attached with the reference numeral 161e, the assignment state of the division number 32 area that is paired with the division number 171 value 31 and the in-level number 172 value 8 is empty. , There is a connection request (indicated by arrow 241e) for setting the allocation state of the division level area higher than the division pair 291d consisting of the division number 31 area and the division number 32 area, and is denoted by reference numeral 161f. As shown in the division level attached table of division level 1, the allocation state of division number 31 and paired division number 32 is set to hold. As described in the description of FIG. 14B, when the upper section level area is set to be empty, setting the holding state to the allocation state of the lower section level area included in the area is shown in FIG. This is the same as the case of the initial setting of the multi-layer division table 310 shown.
区分レベル2においては、連結要求がありなので矢印241fに示すように上位の区分の区域である、符号162eを付した連結前の区分レベル2の区分割付表の区分番号14の区域の解放要求がされる。区分番号14の区域と区分対292dを構成する区分番号15の区域は空なので、矢印242eで示すように連結要求がありとされ、符号162fを付した連結後の区分レベル2の区分割付表に示すように、区分番号14及び対の区分番号15の割付状態には保留が設定される。 In division level 2, since there is a connection request, a release request for the area of division number 14 in the division level table of division level 2 before connection, which is the upper division area as indicated by arrow 241f, and is attached with reference numeral 162e. Is done. Since the area of the division number 14 and the area of the division number 15 constituting the division pair 292d are empty, there is a connection request as shown by the arrow 242e. As shown, the allocation is set to the allocation state of the segment number 14 and the pair segment number 15.
次に区分レベル3においては、連結要求がありなので矢印242fに示すように上位の区分の区域である、符号163eを付した連結前の区分レベル2の区分割付表の区分番号6の区域の解放要求がされる。区分番号6の区域と区分対293dを構成する区分番号7の区域は使用中なので、矢印243eで示すように区分番号6の区域の割付状態のみが空に設定され、区分対293dの割付状態は、符号163fを付した連結後の区分レベル3の区分割付表に示す空と使用中となる。
そして、連結要求はなしであるので、点線の矢印243fで示すように、上位の区域であり、区分レベル4の区分割付表164に示すように割付状態が使用中である区分番号2の区域は解放されずに割付状態は使用中のままである。
Next, at division level 3, since there is a connection request, as shown by the arrow 242f, the area of the upper division, that is, the area of division number 6 in the division level attachment table of division level 2 before connection, which is denoted by reference numeral 163e, is released. A request is made. Since the area of the division number 6 and the area of the division number 7 constituting the division pair 293d are in use, only the allocation state of the area of the division number 6 is set to empty as shown by the arrow 243e, and the allocation state of the division pair 293d is , Empty and in use as shown in the division level attached table of division level 3 after concatenation with reference numeral 163f.
Since there is no connection request, the area of the division number 2 that is an upper area as shown by the dotted arrow 243f and the allocation state is in use as shown in the division division table 164 of the division level 4 is released. Instead, the assigned state remains in use.
 以上の区域の解放と連結の処理により、一次割付区域を隣接する空区域と連結した後の割付状態の多層区域280fは、矢印273e及び点線の矢印272fで多層区分割付表310の割付状態との対応を示すように、区分番号が6で空の区域283e及び区分番号が7で使用中の区域283fに区分される。 The multi-layer area 280f in the allocated state after the primary allocation area is connected to the adjacent empty area by the above processing of releasing and connecting the area is changed to the allocation state of the multi-layer division table 310 by the arrow 273e and the dotted arrow 272f. As shown in the correspondence, the section number is 6 and the area is empty 283e, and the section number is 7 and the area is used 283f.
 図17Cは、図17AのステップS1706の処理の詳細を説明するものであり、区分番号の指す区分対の解放を試みる処理フロー例を説明する図である。ここで、区分番号の指す区分対とは、区分番号で識別される区分ユニットの属する区分対という意味であり、後ほど説明するように、その区分番号は若番の方とは限らない。別の言い方をすれば、その区分番号に対応するレベル内番号が偶数とは限らない。
図17Aに示す処理フローのとおり、図17Cに示す処理ステップは解放区分レベルから上位の区分レベルの方向に区分レベル毎に実行され、空領域を連結して上位の区分レベルの領域の解放が試みられる。
FIG. 17C explains the details of the processing in step S1706 of FIG. 17A and is a diagram for explaining an example of a processing flow for attempting to release the segment pair indicated by the segment number. Here, the category pair indicated by the category number means the category pair to which the category unit identified by the category number belongs, and as will be described later, the category number is not necessarily the younger number. In other words, the in-level number corresponding to the division number is not always an even number.
As shown in the processing flow of FIG. 17A, the processing step shown in FIG. 17C is executed for each partition level in the direction from the release partition level to the higher partition level, and attempts to release the upper partition level region by concatenating empty regions. It is done.
 図に示すとおり、まずステップS1711で、レベル内番号は偶数かを判定する。図17Cに示す処理フローは、図16に示すものと類似するものであるが、先に述べたように、図17A、つまり図12のステップS1208の処理においては、レベル内番号が偶数とは限らない。それは、解放され、空状態となった一次割付区域に対応するレベル内番号は、偶数の場合もあれば、奇数の場合もあるからである。図17Bに示す例では8が設定されているが、図17Bに示す使用中の割付区分番号が7の区域283fが空となったときには、そのレベル内番号は3であり、奇数である。 As shown in the figure, first, in step S1711, it is determined whether the in-level number is an even number. The process flow shown in FIG. 17C is similar to that shown in FIG. 16, but as described above, in the process of FIG. 17A, that is, step S1208 of FIG. 12, the in-level number is not always an even number. Absent. This is because the in-level number corresponding to the primary allocation area that has been released and becomes empty may be an even number or an odd number. In the example shown in FIG. 17B, 8 is set, but when the area 283f with the assigned allocation division number 7 shown in FIG. 17B becomes empty, the in-level number is 3, which is an odd number.
レベル内番号が偶数である場合はステップS1712で、対の区分番号に、区分番号に値1を加算した値を設定してステップS1714に進み、奇数である場合はステップS1713で、対の区分番号に、区分番号から1を減じた値を設定してステップS1714に進む。 If the in-level number is an even number, in step S1712, the value obtained by adding the value 1 to the division number is set in the pair division number, and the process proceeds to step S1714. If the number in the level is an odd number, the pair division number is entered in step S1713. In step S1714, a value obtained by subtracting 1 from the division number is set.
ステップS1714では、対の区分番号の指す多層区分割付表の割付状態を読み出し、ステップS1715で、読み出した割付状態が空または空候補であるか判定する。読み出した割付状態が空または空候補であれば、ステップS1716に進み、読み出した割付状態が空でも空候補でもなければ、ステップS1719に分岐する。 In step S1714, the allocation state of the multi-layer partition allocation table indicated by the paired segment number is read out, and in step S1715, it is determined whether the read allocation state is empty or empty candidate. If the read assignment state is empty or empty candidate, the process proceeds to step S1716. If the read assignment state is neither empty nor empty candidate, the process branches to step S1719.
ステップS1716では、区分番号の指す多層区分割付表の割付状態を保留に設定し、ステップS1717で、対の区分番号の指す多層区分割付表の割付状態に保留を設定する。次にステップS1718で区分対の連結要求をありに設定して処理を終了する。これらのステップS1716~S1718の処理は、図17Bの例示では、矢印241e、242eで示す連結要求の処理に対応する。 In step S1716, the allocation state of the multi-layer partitioning table indicated by the division number is set to hold, and in step S1717, holding is set as the allocation state of the multi-layer partitioning table indicated by the pair of division numbers. In step S1718, the group pair connection request is set to “Yes”, and the process ends. The processes in steps S1716 to S1718 correspond to the connection request processes indicated by arrows 241e and 242e in the illustration of FIG. 17B.
一方、ステップS1719に分岐した場合は、区分番号の指す多層区分割付表の割付状態を空に設定し、ステップS1720で、連結要求になしを設定して処理を終了する。こちらの処理は、図17Bの例示では、矢印243eで示す自区域のみ解放の処理に対応する。 On the other hand, if the process branches to step S1719, the allocation state of the multi-layer partitioning table indicated by the partition number is set to be empty, and in step S1720, none is set in the connection request, and the process ends. This process corresponds to the process of releasing only the own area indicated by the arrow 243e in the example of FIG. 17B.
 なお、本発明の区画管理方法を例えば図2Cに例示するデータ処理装置301のようなコンピュータに実行させるプログラムにより、本発明に係る区画管理装置をコンピュータ上に構築可能なことは明らかである。
 そこで、本発明の区画管理装置に関する、機能ブロック構成例について以下に説明する。
It is obvious that the partition management device according to the present invention can be constructed on a computer by a program that causes a computer such as the data processing device 301 illustrated in FIG. 2C to execute the partition management method of the present invention.
A functional block configuration example relating to the partition management apparatus of the present invention will be described below.
 図18Aは、本発明の一実施形態における区画管理装置の機能ブロック構成例を説明する図である。
 図に示すように、区画管理装置800は、大きく分けて、初期化部810と多層区分管理部840から構成される。初期化部810と多層区分管理部840は、図2Bに例示するアロケーションシステム(初期化部)101とアロケーションシステム(多層区分管理部)102に相当する。
FIG. 18A is a diagram illustrating a functional block configuration example of a partition management device according to an embodiment of the present invention.
As shown in the figure, the partition management device 800 is roughly composed of an initialization unit 810 and a multilayer section management unit 840. The initialization unit 810 and the multilayer partition management unit 840 correspond to the allocation system (initialization unit) 101 and the allocation system (multilayer partition management unit) 102 illustrated in FIG. 2B.
 初期化部810は、区画のサイズを取得する区画サイズ取得手段820と多層区分割付表生成手段830を含む。多層区分割付表生成手段830は、区画のサイズを互いに異なる2のべき乗の和と区画の割当単位のサイズの積で表したとき、該和を構成する各2のべき乗と区画の割当単位のサイズとの積のサイズの主区域により、そのサイズの大きさ順に区画を分割することで該区画を区分けし、各主区域を2分の1ずつ分割して順次区画の割当単位のサイズまで各サイズの区域に区分けし、主区域を含む各区域に対応して該各区域のそれぞれの割付状態を示す割付情報を格納する多層区分割付表を生成し、初期化する。この多層区分割付表生成手段830の機能は、図4A~図4Cを参照して説明した処理フロー例により実現可能である。 The initialization unit 810 includes a section size acquisition unit 820 that acquires a section size, and a multi-layer partitioning table generation unit 830. The multi-layer partitioning table generation means 830 represents the size of each partition as the product of the sum of powers of two different from each other and the size of the allocation unit of the partition, and the size of each of the powers of 2 constituting the sum and the allocation unit of the partition The main area of the product size is divided into sections in the order of the size, and the sections are divided, and each main area is divided by half, and each size is sequentially divided into the allocation unit size. A multi-layer division table that stores allocation information indicating the allocation status of each area corresponding to each area including the main area is generated and initialized. The function of the multi-layer partitioning table generation unit 830 can be realized by the processing flow example described with reference to FIGS. 4A to 4C.
 多層区分管理部840は、ファイルまたはメモリ領域の空区域への割付を行う区域割付手段850とファイルまたはメモリ領域の割付から割付区域を解放する区域解放手段860を含む。 The multi-layer division management unit 840 includes an area allocation unit 850 that allocates a file or a memory area to an empty area, and an area release unit 860 that releases the allocation area from the allocation of the file or memory area.
 図18Bは、本発明の一実施形態における区域割付手段の機能ブロック構成例を説明する図である。図に示すように、区域割付手段850は、割付要求を受け付ける割付要求受付手段851、空区域探索手段852、二次割付手段853、割付区分番号出力手段を含み、空区域探索手段852は、仮割付手段857を含む。 FIG. 18B is a diagram illustrating an example of a functional block configuration of the area allocating unit according to the embodiment of the present invention. As shown in the figure, the area allocation unit 850 includes an allocation request reception unit 851 that receives an allocation request, an empty area search unit 852, a secondary allocation unit 853, and an allocation category number output unit. Allocating means 857 is included.
 区域割付手段850の機能は、図5を参照して説明した処理フロー例により実現可能である。
空区域探索手段852は、割付要求に含まれるサイズである割付要求サイズが、互いに異なる2のべき乗の和と区画の割当単位のサイズの積で表され、区分レベルの異なる区域のサイズの和である場合、その区分レベルの最大のものより1つ大きい区分レベルの空区域であって割付要求サイズより大きいサイズの一次割付区域を探索し、割付要求に含まれるサイズである割付要求サイズが2のべき乗と前記区画の割当単位のサイズの積で表される場合、その割付要求サイズの空区域を一次割付区域として探索する。空区域探索手段852の機能は、図6、図9に例示する処理フローに対応する。
The function of the area allocating unit 850 can be realized by the processing flow example described with reference to FIG.
In the empty area search means 852, the allocation request size, which is the size included in the allocation request, is represented by the product of the sum of powers of two different from each other and the size of the allocation unit of the partition, and is the sum of the sizes of the areas of different partition levels. In some cases, a search is made for a primary allocation area that is an empty area of a partition level that is one larger than the maximum of the partition level and is larger than the allocation request size, and the allocation request size that is the size included in the allocation request is 2 When it is represented by the product of the power and the size of the allocation unit of the section, an empty area of the allocation request size is searched as a primary allocation area. The function of the empty area searching means 852 corresponds to the processing flow illustrated in FIGS.
空区域探索手段852のうち仮割付手段857は、一次割付区域の区分レベルで空区域を探索できなかった場合に、多層区分割付表の上位の区分レベルの区域に対応する割付状態を参照して上位の区分レベルの空区域を探索して該区域を仮割付区域として前記多層区分割付表の割付状態を使用中とするとともに、仮割付区域を一次割付区域と残りの領域であって区分レベルの小さいものから順に区分レベルの異なる区域が連続して割り付けられた領域である隣接多層区域とに分割し、一次割付区域内の区域に対応する多層区分割付表の割付状態に使用中を設定し、隣接多層区域を構成する区域に対応する多層区分割付表の割付状態に空状態を設定する。仮割付手段857の機能は、図7Aと図8A、図10Aと図10Bに例示する処理フローに対応する。 The temporary allocation means 857 of the empty area search means 852 refers to the allocation status corresponding to the upper division level area of the multi-layer division division table when the empty area cannot be searched at the division level of the primary allocation area. An empty area at a higher division level is searched, and the allocation state of the multi-layer division allocation table is set to be in use with the area as a temporary allocation area, and the temporary allocation area is defined as the primary allocation area and the remaining areas at the division level. Divide the areas with different division levels in order from the smallest one into adjacent multi-layer areas that are continuously assigned, set the assignment status of the multi-layer division table corresponding to the areas in the primary allocation area to be in use, An empty state is set in the allocation state of the multi-layered division table corresponding to the area constituting the adjacent multi-layered area. The function of the temporary allocation unit 857 corresponds to the processing flow illustrated in FIGS. 7A and 8A, and FIGS. 10A and 10B.
二次割付手段853は、一次割付区域のサイズが割付要求サイズより大きい場合、一次割付区域を、区分レベルの大きいものから順に区分レベルの異なる区域が連続して割り付けられた領域である二次割付区域と、残りの領域であって区分レベルの小さいものから順に区分レベルの異なる区域が連続して割り付けられた領域である隣接多層区域とに分割し、二次割付区域のそれぞれの区域に対応する多層区分割付表の割付状態に使用中を設定し、隣接多層区域を構成する区域に対応する前記多層区分割付表の割付状態に空候補状態を設定する。二次割付手段853の機能は、図11A、図11Bに例示する処理フローに対応する。 When the size of the primary allocation area is larger than the required allocation size, the secondary allocation means 853 is a secondary allocation in which the primary allocation area is an area in which areas having different division levels are sequentially assigned in descending order of the division level. Divide into areas and adjacent multi-layer areas where areas with different division levels are assigned sequentially from the remaining areas, starting with the lowest division level, and correspond to each of the secondary allocation areas In-use is set in the allocation state of the multi-layer partitioning table, and an empty candidate state is set in the allocation state of the multi-layer partitioning table corresponding to the area constituting the adjacent multi-layer area. The function of the secondary allocation unit 853 corresponds to the processing flow illustrated in FIGS. 11A and 11B.
 図18Cは、本発明の一実施形態における区域解放手段の機能ブロック構成例を説明する図である。図に示すように、区域解放手段860は、解放要求を受け付ける解放要求受付手段851、一次割付区域内の区域の解放を試みる一次割付区域内解放手段862、一次割付区域の区分レベルより大きい区分レベルの区域の解放を試みる上位区域解放手段863を含む。 FIG. 18C is a diagram illustrating an example of a functional block configuration of the area releasing unit according to the embodiment of the present invention. As shown in the figure, the area release means 860 includes a release request reception means 851 that receives a release request, a primary allocation area release means 862 that attempts to release an area in the primary allocation area, and a partition level that is higher than the partition level of the primary allocation area. Higher-level area release means 863 that attempts to release the area.
 区域解放手段860の機能は図12に例示する処理フロー例に対応する。
一次割付区域内解放手段862は、解放要求に含まれるサイズである解放要求サイズが、区分レベルの異なる区域の和である場合、隣接多層区域内の最小の区域の区分番号を求めてその区分番号の指す多層区分割付表から割付状態を読み出し、読み出した割付状態が空または空候補の状態であれば、二次割付区域内の最小の区域と隣接多層区域内の最小の区域に対応する多層区分割付表の割付状態に保留を設定するとともに1つ上位の区分レベルの区域の解放を試み、隣接多層区域内の最小の区域の割付状態が使用中であれば、二次割付区域内の最小の区域の割付状態を空の状態とする。一次割付区域内解放手段862の機能は、図14Aに例示する処理フローに対応する。
The function of the area releasing means 860 corresponds to the processing flow example illustrated in FIG.
When the release request size, which is the size included in the release request, is the sum of the areas having different partition levels, the primary allocation area release means 862 obtains the partition number of the smallest area in the adjacent multi-layer area and determines its partition number. If the allocation state is read from the multi-layer division allocation table pointed to by and the read allocation state is empty or empty candidate state, the multi-layer division corresponding to the minimum area in the secondary allocation area and the minimum area in the adjacent multi-layer area Attempts to release the area at the next higher partition level by setting the allocation state in the contingency table, and if the allocation status of the smallest area in the adjacent multi-layer area is in use, the lowest in the secondary allocation area The area assignment state is set to empty. The function of the primary allocation area release means 862 corresponds to the processing flow illustrated in FIG. 14A.
 上位区域解放手段863は、一次割付区域が解放され、その区分番号の指す多層区分割付表の割付状態が空の状態になったとき、一次割付区域と同一の区分レベルであって、1つ上位の区分レベルの区域を2つに分割したときの一方の区域を一次割付区域としたときの他方の区域の割付状態を多層区分割付表より読み出し、他方の区域の割付状態が空または空候補の状態であれば、前記一方の区域と他方の区域に対応する多層区分割付表の割付状態に保留を設定するとともに上位の区分レベルの区域の解放を試み、他方の区域の割付状態が使用中であれば、一方の区域の割付状態を空の状態とする。上位区域解放手段863の機能は、図17Aに例示する処理フローに対応する。 The upper area release means 863 has the same division level as the primary allocation area when the primary allocation area is released and the allocation state of the multi-layered division allocation table indicated by the division number is empty, and is one level higher. Read the allocation status of the other area from the multi-level allocation table when one area is divided into two areas as the primary allocation area, and the allocation status of the other area is empty or empty candidate If so, it sets a hold in the allocation state of the multi-layer partitioning table corresponding to the one area and the other area, tries to release the area of the higher division level, and the allocation state of the other area is in use If there is, the allocation state of one area is made empty. The function of the upper zone release means 863 corresponds to the processing flow illustrated in FIG. 17A.
以上本発明を実施するための形態について詳細に説明したが、本発明の実施形態は上記に限ることなく種々の変形が可能であることは当業者に明らかである。以上説明したように、本発明によれば、記憶容量によらず記憶装置を有効にかつ効率的に管理することができる。また、各区分レベルの区域を多層区分割付表及び多層区分管理表を用いて多層的に管理することにより、連続する領域にファイル割付を行うことが可能となる。 Although the embodiment for carrying out the present invention has been described in detail above, it is obvious to those skilled in the art that the embodiment of the present invention is not limited to the above and can be variously modified. As described above, according to the present invention, it is possible to effectively and efficiently manage the storage device regardless of the storage capacity. In addition, it is possible to perform file allocation to continuous areas by managing each division level area in a multi-layer manner using a multi-layer division table and a multi-layer division management table.
 100  アロケーションシステム
 114  主区分番号
 115  区分数
 116  先頭番号
 120  区画サイズ
 130  区画構成主区分表
 170  割付状態
 171  区分番号
 172  レベル内番号
 200  アプリケーションプログラム/OS
 201  初期化プログラム
 202  ファイルシステム
 203  ファイル操作システム
 220  割付要求サイズ
 230  割付構成区分表
 301  データ処理装置
 302  中央処理装置
 303  キャッシュメモリ
 304  バス
 305  主記憶装置
 306  外部記憶装置
 307  通信装置
 308  データ格納装置
 309  多層区分管理表
 309a 主区分番号管理表
 309b 先頭番号管理表
 310  多層区分割付表
 311  区画
 600  割付ビットマップ
 690  区画
 790  ツリー構造体群
 800  区画管理装置
 810  初期化部
 820  区画サイズ取得手段
 830  多層区分割付表生成手段
 840  多層区分管理部
 850  区域割付手段
 851  割付要求受付手段
 852  空区域探索手段
 853  二次割付手段
 854  割付区分番号出力手段
 857  仮割付手段
 860  区域解放手段
 861  解放要求受付手段
 862  一次割付区域内解放手段
 863  上位区域解放手段
100 Allocation system 114 Main section number 115 Number of sections 116 First number 120 Section size 130 Section configuration main section table 170 Allocation state 171 Section number 172 Level number 200 Application program / OS
DESCRIPTION OF SYMBOLS 201 Initialization program 202 File system 203 File operation system 220 Allocation request size 230 Allocation configuration division table 301 Data processing unit 302 Central processing unit 303 Cache memory 304 Bus 305 Main storage unit 306 External storage unit 307 Communication unit 308 Data storage unit 309 Multi-layer Division management table 309a Main division number management table 309b First number management table 310 Multi-layer division partitioning table 311 Partition 600 Allocation bitmap 690 Partition 790 Tree structure group 800 Partition management device 810 Initialization unit 820 Partition size acquisition means 830 Multi-layer partition partitioning table Generation means 840 Multi-layer division management unit 850 Area assignment means 851 Assignment request reception means 852 Empty area search means 853 Secondary assignment means 854 Assignment division number output means 8 57 Temporary allocation means 860 Area release means 861 Release request reception means 862 Primary allocation area release means 863 Higher area release means

Claims (16)

  1. 記憶装置の区画管理装置において、
     区画のサイズを取得する区画サイズ取得手段と、
    該区画のサイズを互いに異なる2のべき乗の和と前記区画の割当単位のサイズの積で表したとき、該和を構成する各2のべき乗と前記区画の割当単位のサイズとの積のサイズの主区域により、そのサイズの順に前記区画を分割することで該区画を区分けし、前記各主区域を2分の1ずつ分割して順次前記区画の割当単位のサイズまで各サイズの区域に区分けし、前記主区域を含む各区域に対応して該各区域のそれぞれの割付状態を示す割付情報を格納する多層区分割付表を生成し、初期化する多層区分割付表生成手段と、
    を含む初期化部と、
     前記多層区分割付表に格納された前記割付情報に基づいて前記各区域の割付を管理する多層区分管理部と、
     を備えることを特徴とする区画管理装置。
    In the partition management device of the storage device,
    A section size acquisition means for acquiring a section size;
    When the size of the partition is expressed by the product of the sum of powers of two different from each other and the size of the allocation unit of the partition, the size of the product of each power of 2 constituting the sum and the size of the allocation unit of the partition The main area is divided by dividing the sections in the order of their sizes, and each main area is divided by half and sequentially divided into areas of each size up to the size of the allocation unit of the section. A multi-layer partitioning table generating means for generating and initializing a multi-layered partitioning table for storing allocation information indicating the allocation status of each of the areas corresponding to each of the areas including the main area;
    An initialization unit including
    A multi-layer division management unit that manages the allocation of each area based on the allocation information stored in the multi-layer division table.
    A partition management device comprising:
  2. 請求項1記載の区画管理装置において、
    前記区域のサイズを規定する2のべき乗のべき数を該区域の区分レベルとすると、
     前記多層区分割付表は、前記区域の割付情報を、前記区域の区分レベル順、同一区分レベルにおいては前記区域の前記区画内の配置順で格納し、
     前記多層区分管理部は、前記割付情報の格納順にしたがって前記割付情報が該当する区域を識別するための識別番号である区分番号を割り振り、該区分番号を用いて前記区域の割付を管理する、
     ことを特徴とする区画管理装置。
    The partition management device according to claim 1,
    When the power of 2 that defines the size of the area is a division level of the area,
    In the multi-layer division table, the allocation information of the areas is stored in the order of the division levels of the areas, in the same division level, in the arrangement order of the areas in the divisions,
    The multi-layer division management unit allocates a division number that is an identification number for identifying an area to which the allocation information corresponds according to a storage order of the allocation information, and manages the allocation of the area using the division number.
    A partition management device.
  3.  請求項2記載の区画管理装置において、
     前記多層区分割付表生成手段は、前記主区域の割付情報の初期値として空きであることを示す空き状態を設定し、前記主区域を分割して得られる区域の割付情報の初期値として該区域への割付を行わないことを示す空以外の状態を設定する
     ことを特徴とする区画管理装置。
    The partition management device according to claim 2,
    The multi-layer division division table generating means sets an empty state indicating that it is empty as an initial value of the allocation information of the main area, and sets the area as an initial value of allocation information of the area obtained by dividing the main area A partition management device that sets a non-empty state indicating that no assignment is made.
  4. 請求項3記載の区画管理装置において、
     前記多層区分管理部は、
    サイズを含むファイルあるいはメモリ領域の割付要求を受け付ける割付要求受付手段と、
     前記多層区分管理表を参照して、前記割付要求に含まれるサイズである割付要求サイズが、互いに異なる2のべき乗の和と前記区画の割当単位のサイズの積で表され、前記区分レベルの異なる区域のサイズの和である場合、該区分レベルの最大のものより1つ大きい区分レベルの空区域であって前記割付要求サイズより大きいサイズの一次割付区域を探索し、該一次割付区域に対応する区分番号を求めて割付区分番号とし、前記割付要求に含まれるサイズである割付要求サイズが2のべき乗と前記区画の割当単位のサイズの積で表される場合、該割付要求サイズの空区域を一次割付区域として探索し、該一次割付区域に対応する区分番号を求めて割付区分番号とする空区域探索手段と、
     前記一次割付区域のサイズが前記割付要求サイズより大きい場合、該一次割付区域を、前記区分レベルの順に区分レベルの異なる区域が連続して割り付けられた領域である二次割付区域と、残りの領域であって前記二次割付区域の区分レベルの異なる区域が割り付けられる区分レベルの順とは逆順で区分レベルの異なる区域が連続して割り付けられた領域である隣接多層区域とに分割し、前記二次割付区域のそれぞれの区域に対応する区分番号を求めて該区分番号の対応する前記多層区分割付表の割付状態に使用中を設定し、前記隣接多層区域を構成する区域に対応する区分番号を求めて該区分番号の対応する前記多層区分割付表の割付状態に空候補状態を設定する二次割付手段と、
    前記割付区分番号を前記ファイルあるいはメモリ領域の割付要求の割り付け結果の1つとして出力する割付区分番号出力手段と、
    を備え、
    前記二次割付区域内の最小の区域と隣接多層区域内の最小の区域の区分レベルは等しく、前記多層区分割付表において前記区分レベルより1つ上位の区分レベルの区域を2分割したものであることを特徴とする区画管理装置。
    The partition management device according to claim 3, wherein
    The multi-layer division management unit
    An allocation request receiving means for receiving an allocation request for a file or memory area including a size;
    With reference to the multi-layer partition management table, the allocation request size, which is the size included in the allocation request, is represented by the product of the sum of different powers of 2 and the size of the allocation unit of the partition, and the partition level is different If it is the sum of the sizes of the areas, a search is made for a primary allocation area that is an empty area of a partition level that is one larger than the maximum of the partition level and is larger than the allocation request size, and corresponds to the primary allocation area If the allocation request number, which is the size included in the allocation request, is represented by the product of a power of 2 and the size of the allocation unit of the partition, an empty area of the allocation request size is obtained. An empty area search means for searching as a primary allocation area, finding a division number corresponding to the primary allocation area and making it an allocation division number;
    When the size of the primary allocation area is larger than the allocation request size, the primary allocation area is divided into a secondary allocation area that is an area in which areas of different partition levels are sequentially allocated in the order of the partition level, and the remaining area. The second allocation area is divided into adjacent multi-layer areas, which are areas in which areas having different division levels are sequentially assigned in the reverse order of the division level in which the areas having different division levels are assigned. The division number corresponding to each area of the next allocation area is obtained, the in-use state is set in the allocation state of the multilayer division allocation table corresponding to the division number, and the division number corresponding to the area constituting the adjacent multilayer area is set. Secondary allocation means for setting an empty candidate state to the allocation state of the multilayer partition allocation table corresponding to the classification number
    An allocation category number output means for outputting the allocation category number as one of the allocation results of the allocation request for the file or memory area;
    With
    The division level of the smallest area in the secondary allocation area and the smallest area in the adjacent multi-layer area are equal, and the division level area one level higher than the division level in the multi-layer division allocation table is divided into two. A partition management device.
  5. 請求項4記載の区画管理装置において、
    前記空区域探索手段は、前記一次割付区域の区分レベルで空区域を探索できなかった場合に、前記多層区分割付表の上位の区分レベルの区域に対応する割付状態を参照して上位の区分レベルの空区域を探索して該区域の区分番号を求め、該区分番号の区域である仮割付区域を、前記一次割付区域と残りの領域であって前記区分レベルの順に区分レベルの異なる区域が連続して割り付けられた領域である隣接多層区域とに分割し、前記一次割付区域内の区域に対応する区分番号を求めて該区分番号の対応する前記多層区分割付表の割付状態に使用中を設定し、前記隣接多層区域を構成する区域に対応する区分番号を求めて該区分番号の対応する前記多層区分割付表の割付状態に空状態を設定する仮割付手段を含むことを特徴とする区画管理装置。
    The partition management device according to claim 4, wherein
    The vacant area searching means refers to an allocation state corresponding to an area of a higher division level in the multi-layer division division table when an empty area cannot be searched at the division level of the primary allocation area. An empty area is searched for, and a division number of the area is obtained, and the temporary allocation area that is the area of the division number is continuously arranged from the primary allocation area and the remaining areas in the order of the division level. Is divided into adjacent multi-layer areas that are allocated areas, and a division number corresponding to the area in the primary allocation area is obtained, and the in-use state is set in the multi-layer division allocation table corresponding to the division number And a partition management means for determining a partition number corresponding to the section constituting the adjacent multilayer section, and setting a temporary allocation means for setting an empty state in the allocation state of the multilayer partition allocation table corresponding to the section number apparatus
  6.  請求項5記載の区画管理装置において、
     前記空区域探索手段は、割付要求されたファイルあるいはメモリ領域を割付可能な空状態の区域を探索できなかった場合、前記多層区分割付表から空候補状態の区域を探索することを特徴とする区画管理装置。
    The partition management device according to claim 5, wherein
    The empty area searching means searches for an empty candidate state area from the multi-layer area partitioning table when an empty area in which the file or memory area requested for allocation cannot be searched. Management device.
  7. 請求項6記載の区画管理装置において、
     前記多層区分管理部は、
    サイズ及び割付区分番号を含むファイルあるいはメモリ領域の解放要求を受け付ける解放要求受付手段と、
     前記解放要求に含まれるサイズである解放要求サイズが、前記区分レベルの異なる区域の和である場合、前記隣接多層区域内の最小の区域の区分番号を求めて該区分番号の指す前記多層区分割付表から割付状態を読み出し、該読み出した割付状態が空または空候補の状態であれば、前記二次割付区域内の最小の区域と隣接多層区域内の最小の区域に対応する前記多層区分割付表の割付状態に空または空候補以外の状態を設定するとともに前記1つ上位の区分レベルの区域の解放を試み、前記隣接多層区域内の最小の区域の割付状態が使用中であれば、前記二次割付区域内の最小の区域の割付状態を空の状態とする一次割付区域内解放手段と
    前記一次割付区域が解放され、その区分番号の指す前記多層区分割付表の割付状態が空の状態になったとき、該一次割付区域と同一の区分レベルであって、1つ上位の区分レベルの区域を2つに分割したときの一方の区域を前記一次割付区域としたときの他方の区域の割付状態を前記多層区分割付表より読み出し、該他方の区域の割付状態が空または空候補の状態であれば、前記一方の区域と他方の区域に対応する前記多層区分割付表の割付状態に空または空候補以外の状態を設定するとともに前記上位の区分レベルの区域の解放を試み、前記他方の区域の割付状態が使用中であれば、前記一方の区域の割付状態を空の状態とする上位区域解放手段と、
    を備えることを特徴とする区画管理装置。
    The partition management device according to claim 6, wherein
    The multi-layer division management unit
    A release request receiving means for receiving a release request for a file or memory area including a size and an allocation classification number;
    When the release request size, which is the size included in the release request, is the sum of the different areas of the division level, the division number of the smallest area in the adjacent multilayer area is obtained and the multilayer division indicated by the division number is obtained. If the allocation state is read from the attached table, and the read allocation state is empty or empty candidate state, the multilayer partition allocation table corresponding to the minimum area in the secondary allocation area and the minimum area in the adjacent multilayer area If the allocation state is set to a state other than empty or an empty candidate, and an attempt is made to release the area of the next higher partition level, and if the allocation state of the smallest area in the adjacent multi-layer area is in use, the second The primary allocation area release means that sets the allocation status of the smallest area in the next allocation area to an empty state and the primary allocation area are released, and the allocation status of the multi-layer division allocation table pointed to by the division number becomes empty became The allocation state of the other area when the first allocation area is the same division level as the primary allocation area, and one area when the one higher division level area is divided into two. If it is read from the multi-layer partitioning table and the allocation state of the other area is empty or empty candidate, the empty or empty candidate is assigned to the allocation state of the multi-layer partitioning table corresponding to the one area and the other area A higher-level area release means that attempts to release the higher-level division level area and sets the allocation status of the one area to an empty state if the allocation status of the other area is in use. When,
    A partition management device comprising:
  8. 記憶装置の区画管理方法において、
     区画のサイズを取得する区画サイズ取得ステップと、
    該区画のサイズを互いに異なる2のべき乗の和と前記区画の割当単位のサイズの積で表したとき、該和を構成する各2のべき乗と前記区画の割当単位のサイズとの積のサイズの主区域により、そのサイズの順に前記区画を分割することで該区画を区分けする主区分ステップと、
    前記各主区域を2分の1ずつ分割して順次前記区画の割当単位のサイズまで各サイズの区域に区分けし、前記主区域を含む各区域に対応して該各区域のそれぞれの割付状態を示す割付情報を格納する多層区分割付表を生成する多層区分割付表生成ステップと、
     前記多層区分割付表に格納された前記割付情報に基づいて前記各区域の割付を管理する多層区分管理ステップと、
     を実行することを特徴とする区画管理方法。
    In the storage device partition management method,
    A section size acquisition step for acquiring a section size;
    When the size of the partition is expressed by the product of the sum of powers of two different from each other and the size of the allocation unit of the partition, the size of the product of each power of 2 constituting the sum and the size of the allocation unit of the partition A main partitioning step of partitioning the partition by dividing the partition in order of size by a main region;
    Each main area is divided by half and sequentially divided into areas of each size up to the size of the allocation unit of the partition, and each allocation state of each area is assigned to each area including the main area. A multi-layer partitioning table generating step for generating a multi-layer partitioning table that stores allocation information to be indicated;
    A multi-layer division management step for managing the allocation of each area based on the allocation information stored in the multi-layer division table.
    And a partition management method.
  9.  請求項8記載の区画管理方法において、
    前記区域のサイズを規定する2のべき乗のべき数を該区域の区分レベルとすると、
     前記多層区分割付表は、前記区域の割付情報を、前記区域の区分レベル順、同一区分レベルにおいては前記区域の前記区画内の配置順で格納するものであり、
     前記多層区分管理ステップは、前記割付情報の格納順にしたがって前記割付情報が該当する区域を識別するための識別番号である区分番号を割り振り、該区分番号を用いて前記区域の割付を管理する、
     ことを特徴とする区画管理方法。
    The partition management method according to claim 8, wherein
    When the power of 2 that defines the size of the area is a division level of the area,
    The multi-layered division table stores the allocation information of the areas in the order of division levels of the areas, in the same division level, in the arrangement order of the areas in the divisions,
    The multi-layer division management step allocates a division number that is an identification number for identifying an area to which the assignment information corresponds according to a storage order of the assignment information, and manages the assignment of the area using the division number.
    A partition management method characterized by the above.
  10.  請求項9記載の区画管理方法において、
     前記多層区分割付表生成ステップは、主区域の割付情報の初期値として空きであることを示す空き状態を設定し、前記主区域を分割して得られる区域の割付情報の初期値として該区域への割付を行わないことを示す空以外の状態を設定する、
     ことを特徴とする区画管理方法。
    The partition management method according to claim 9, wherein
    In the multi-layer division division table generation step, an empty state indicating that the main area is empty is set as an initial value of the allocation information of the main area, and the initial value of the allocation information of the area obtained by dividing the main area is set to the area Set a non-empty state to indicate that no assignments will be made,
    A partition management method characterized by the above.
  11.  請求項10記載の区画管理方法において、
     前記多層区分管理ステップは、
    サイズを含むファイルあるいはメモリ領域の割付要求を受け付ける割付要求受付ステップと、
     前記多層区分管理表を参照して、前記割付要求に含まれるサイズである割付要求サイズが、互いに異なる2のべき乗の和と前記区画の割当単位のサイズの積で表され、前記区分レベルの異なる区域のサイズの和である場合、該区分レベルの最大のものより1つ大きい区分レベルの空区域であって前記割付要求サイズより大きいサイズの一次割付区域を探索し、該一次割付区域に対応する区分番号を求めて割付区分番号とし、前記割付要求に含まれるサイズである割付要求サイズが2のべき乗と前記区画の割当単位のサイズの積で表される場合、該割付要求サイズの空区域を一次割付区域として探索し、該一次割付区域に対応する区分番号を求めて割付区分番号とする空区域探索ステップと、
     前記一次割付区域のサイズが前記割付要求サイズより大きい場合、該一次割付区域を、前記区分レベルの順に区分レベルの異なる区域が連続して割り付けられた領域である二次割付区域と、残りの領域であって前記二次割付区域の区分レベルの異なる区域が割り付けられる区分レベルの順とは逆順で区分レベルの異なる区域が連続して割り付けられた領域である隣接多層区域とに分割し、前記二次割付区域のそれぞれの区域に対応する区分番号を求めて該区分番号の対応する前記多層区分割付表の割付状態に使用中を設定し、前記隣接多層区域を構成する区域に対応する区分番号を求めて該区分番号の対応する前記多層区分割付表の割付状態に空候補状態を設定する二次割付ステップと、
    前記割付区分番号を前記ファイルあるいはメモリ領域の割付要求の割り付け結果の1つとして出力する割付区分番号出力ステップと、
    を備え、
    前記二次割付区域内の最小の区域と隣接多層区域内の最小の区域の区分レベルは等しく、前記多層区分割付表において前記区分レベルより1つ上位の区分レベルの区域を2分割したものであることを特徴とする区画管理方法。
    The partition management method according to claim 10, wherein
    The multilayer section management step includes:
    An allocation request reception step for receiving an allocation request for a file or memory area including a size;
    With reference to the multi-layer partition management table, the allocation request size, which is the size included in the allocation request, is represented by the product of the sum of different powers of 2 and the size of the allocation unit of the partition, and the partition level is different If it is the sum of the sizes of the areas, a search is made for a primary allocation area that is an empty area of a partition level that is one larger than the maximum of the partition level and is larger than the allocation request size, and corresponds to the primary allocation area If the allocation request number, which is the size included in the allocation request, is represented by the product of a power of 2 and the size of the allocation unit of the partition, an empty area of the allocation request size is obtained. An empty area search step for searching as a primary allocation area, obtaining a division number corresponding to the primary allocation area, and setting it as an allocation division number;
    When the size of the primary allocation area is larger than the allocation request size, the primary allocation area is divided into a secondary allocation area that is an area in which areas of different partition levels are sequentially allocated in the order of the partition level, and the remaining area. The second allocation area is divided into adjacent multi-layer areas, which are areas in which areas having different division levels are sequentially assigned in the reverse order of the division level in which the areas having different division levels are assigned. The division number corresponding to each area of the next allocation area is obtained, the in-use state is set in the allocation state of the multilayer division allocation table corresponding to the division number, and the division number corresponding to the area constituting the adjacent multilayer area is set. A secondary allocation step for obtaining an empty candidate state in the allocation state of the multilayer partition allocation table corresponding to the segment number,
    An allocation segment number output step for outputting the allocation segment number as one of the allocation results of the allocation request for the file or memory area;
    With
    The division level of the smallest area in the secondary allocation area and the smallest area in the adjacent multi-layer area are equal, and the division level area one level higher than the division level in the multi-layer division allocation table is divided into two. A partition management method characterized by the above.
  12.  請求項11記載の区画管理方法において、
    前記空区域探索ステップは、前記一次割付区域の区分レベルで空区域を探索できなかった場合に、前記多層区分割付表の上位の区分レベルの区域に対応する割付状態を参照して上位の区分レベルの空区域を探索して該区域の区分番号を求め、該区分番号の区域である仮割付区域を、前記一次割付区域と残りの領域であって前記区分レベルの順に区分レベルの異なる区域が連続して割り付けられた領域である隣接多層区域とに分割し、前記一次割付区域内の区域に対応する区分番号を求めて該区分番号の対応する前記多層区分割付表の割付状態に使用中を設定し、前記隣接多層区域を構成する区域に対応する区分番号を求めて該区分番号の対応する前記多層区分割付表の割付状態に空状態を設定する仮割付ステップを含むことを特徴とする区画管理方法。
    The partition management method according to claim 11,
    In the empty area searching step, when an empty area cannot be searched at the division level of the primary allocation area, the higher division level is referred to by referring to the allocation state corresponding to the upper division level area of the multi-layer division allocation table. An empty area is searched for, and a division number of the area is obtained, and the temporary allocation area that is the area of the division number is continuously arranged from the primary allocation area and the remaining areas in the order of the division level. Is divided into adjacent multi-layer areas that are allocated areas, and a division number corresponding to the area in the primary allocation area is obtained, and the in-use state is set in the multi-layer division allocation table corresponding to the division number And a provisional assignment step of obtaining a partition number corresponding to the section constituting the adjacent multilayer section and setting an empty state in the layout state of the multilayer partition allocation table corresponding to the section number. Management method.
  13.  請求項12記載の区画管理方法において、
     前記空区域探索ステップは、割付要求されたファイルあるいはメモリ領域を割付可能な空状態の区域を探索できなかった場合、前記多層区分割付表から空候補状態の区域を探索することを特徴とする区画管理方法。
    The partition management method according to claim 12, wherein
    The empty area searching step searches for an empty candidate state area from the multi-layer area partitioning table when an empty area in which a file or a memory area requested to be allocated cannot be searched. Management method.
  14. 請求項13記載の区画管理方法において、
     前記多層区分管理ステップは、
    サイズ及び割付区分番号を含むファイルあるいはメモリ領域の解放要求を受け付ける解放要求受付ステップと、
     前記解放要求に含まれるサイズである解放要求サイズが、前記区分レベルの異なる区域の和である場合、前記隣接多層区域内の最小の区域の区分番号を求めて該区分番号の指す前記多層区分割付表から割付状態を読み出し、該読み出した割付状態が空または空候補の状態であれば、前記二次割付区域内の最小の区域と隣接多層区域内の最小の区域に対応する前記多層区分割付表の割付状態に空または空候補以外の状態を設定するとともに前記1つ上位の区分レベルの区域の解放を試み、前記隣接多層区域内の最小の区域の割付状態が使用中であれば、前記二次割付区域内の最小の区域の割付状態を空の状態とする一次割付区域内解放ステップと
    前記一次割付区域が解放され、その区分番号の指す前記多層区分割付表の割付状態が空の状態になったとき、該一次割付区域と同一の区分レベルであって、1つ上位の区分レベルの区域を2つに分割したときの一方の区域を前記一次割付区域としたときの他方の区域の割付状態を前記多層区分割付表より読み出し、該他方の区域の割付状態が空または空候補の状態であれば、前記一方の区域と他方の区域に対応する前記多層区分割付表の割付状態に空または空候補以外の状態を設定するとともに前記上位の区分レベルの区域の解放を試み、前記他方の区域の割付状態が使用中であれば、前記一方の区域の割付状態を空の状態とする上位区域解放ステップと、
    を含むことを特徴とする区画管理方法。
    The partition management method according to claim 13,
    The multilayer section management step includes:
    A release request receiving step for receiving a release request for a file or memory area including a size and an allocation classification number;
    When the release request size, which is the size included in the release request, is the sum of the different areas of the division level, the division number of the smallest area in the adjacent multilayer area is obtained and the multilayer division indicated by the division number is obtained. If the allocation state is read from the attached table, and the read allocation state is empty or empty candidate state, the multilayer partition allocation table corresponding to the minimum area in the secondary allocation area and the minimum area in the adjacent multilayer area If the allocation state is set to a state other than empty or an empty candidate, and an attempt is made to release the area of the next higher partition level, and if the allocation state of the smallest area in the adjacent multi-layer area is in use, the second The primary allocation area release step that sets the allocation status of the smallest area in the next allocation area to an empty state and the primary allocation area are released, and the allocation status of the multi-layer division allocation table pointed to by the division number becomes empty Na The allocation state of the other area when the first allocation area is the same division level as the primary allocation area, and one area when the area of the upper division level is divided into two Is read from the multi-layer partitioning table, and if the allocation state of the other area is empty or empty, the allocation state of the multi-layer partitioning table corresponding to the one area and the other area is empty or empty. Set a state other than the candidate, try to release the upper division level area, and if the other area allocation state is in use, release the upper area to make the allocation state of the one area empty Steps,
    A partition management method comprising:
  15.  請求項8から14記載のいずれか1項に記載の方法をコンピュータに実行させることを特徴とするプログラム。 A program for causing a computer to execute the method according to any one of claims 8 to 14.
  16.  請求項8から14記載のいずれか1項に記載の方法をコンピュータに実行させるプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。 A computer-readable recording medium having recorded thereon a program that causes a computer to execute the method according to any one of claims 8 to 14.
PCT/JP2010/003456 2009-06-11 2010-05-21 Partition management device, partition management method, and program WO2010143364A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/323,407 US9619151B2 (en) 2009-06-11 2011-12-12 Region management apparatus, region management method, and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009140531A JP4846001B2 (en) 2009-06-11 2009-06-11 Partition management apparatus, partition management method and program
JP2009-140531 2009-06-11

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/000729 Continuation WO2011099284A1 (en) 2009-06-11 2011-02-09 Partition management device, partition management method, and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/323,407 Continuation US9619151B2 (en) 2009-06-11 2011-12-12 Region management apparatus, region management method, and program

Publications (1)

Publication Number Publication Date
WO2010143364A1 true WO2010143364A1 (en) 2010-12-16

Family

ID=43308627

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/003456 WO2010143364A1 (en) 2009-06-11 2010-05-21 Partition management device, partition management method, and program

Country Status (2)

Country Link
JP (1) JP4846001B2 (en)
WO (1) WO2010143364A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61253530A (en) * 1985-05-07 1986-11-11 Hitachi Ltd Control system for idle area of external memory
JPH0271342A (en) * 1988-09-07 1990-03-09 Oki Electric Ind Co Ltd Memory controller
JPH0296213A (en) * 1988-10-03 1990-04-09 Nec Corp Secondary memory control method using hierarchical bit map
JPH0392941A (en) * 1989-09-06 1991-04-18 Hitachi Ltd Area management system
JPH0546447A (en) * 1991-08-08 1993-02-26 Hitachi Ltd Idle area retrieving method
JPH0728693A (en) * 1993-06-30 1995-01-31 Microsoft Corp Variant buddy system for controlling disk space

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61253530A (en) * 1985-05-07 1986-11-11 Hitachi Ltd Control system for idle area of external memory
JPH0271342A (en) * 1988-09-07 1990-03-09 Oki Electric Ind Co Ltd Memory controller
JPH0296213A (en) * 1988-10-03 1990-04-09 Nec Corp Secondary memory control method using hierarchical bit map
JPH0392941A (en) * 1989-09-06 1991-04-18 Hitachi Ltd Area management system
JPH0546447A (en) * 1991-08-08 1993-02-26 Hitachi Ltd Idle area retrieving method
JPH0728693A (en) * 1993-06-30 1995-01-31 Microsoft Corp Variant buddy system for controlling disk space

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TAKU YASUI, HAJIMETE MANABU LINUX KERNEL, NIKKEI LINUX, vol. 6, no. 1, 8 January 2004 (2004-01-08), pages 123 - 130 *

Also Published As

Publication number Publication date
JP2010287066A (en) 2010-12-24
JP4846001B2 (en) 2011-12-28

Similar Documents

Publication Publication Date Title
JP4215606B2 (en) Disk array device, storage capacity expansion method and program
JP3371044B2 (en) Area allocation method and disk array access method for disk array
JP5303066B2 (en) Method and storage device for limiting total capacity of virtual volume associated with pool
WO2010086900A1 (en) Storage system and storage control method that compress and store data elements
WO1998050867A1 (en) System and method for performing joins and self-joins in a database system
JPH083798B2 (en) Memory allocation method
CN112306389A (en) Storage system and node management method
CN110383251B (en) Storage system, computer-readable recording medium, and method for controlling system
EP3623954A1 (en) Data access method and related apparatus and system
JPH06202936A (en) Computer main storage area management system and method thereof
JPH03129443A (en) Method and device for transferring file
JP5373860B2 (en) Partition management apparatus, partition management method and program
JP4761590B2 (en) Storage area management method, storage area allocation method, and program
WO2016106757A1 (en) Method for managing storage data, storage manager and storage system
JP5274626B2 (en) Partition management apparatus, partition management method and program
WO2014057515A1 (en) Storage apparatus comprising snapshot function, and storage control method
JP4846001B2 (en) Partition management apparatus, partition management method and program
KR100907477B1 (en) Apparatus and method for managing index of data stored in flash memory
US9552292B2 (en) Apparatus and method for allocating virtual memory addresses to continuous physical addresses
JP2019086918A (en) Information generation device, information processing device, control method, program, and data structure
KR101874748B1 (en) Hybrid storage and method for storing data in hybrid storage
JP6191401B2 (en) Parallel computer system, control device, control method for parallel computer system, and control program for control device
JP4096071B2 (en) Graphic data management method and graphic data management apparatus
JP2002189834A (en) Geographical alternative point deciding system, method, and storage medium recording geographical alternative point deciding program
KR101656619B1 (en) RBI-based Subgraph Listing Method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10785896

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10785896

Country of ref document: EP

Kind code of ref document: A1