The present invention relates to a virtual storage system for a computer, and more particularly to management of system common areas and job private areas in a plurality of virtual address spaces.
Virtual storage is provided by an address translator which translates a virtual address of a virtual address space into a real address corresponding to a physical position in a real storage device. The address translator has an address translation table which is looked up by a virtual address A read-out entry indicates a reference point of a real address corresponding to the virtual address used for look-up.
In a two-level paging system for virtual storage which has been widely used, the virtual address space is divided into areas of a constant size called segments, and each area segment is divided into areas of a constant size called pages. The real address space is also divided into pages, and the real storage is allocated to the virtual address space page by page. Typically, one page has 4K bytes and one segment has 64K bytes (16 pages). In correspondence to the division of the virtual address space, the address translation table comprises a segment table and page tables. A segment number in a virtual address specifies one entry of the segment table, and the specified entry specifies a page table for the corresponding segment. A page number in the virtual address specifies one entry of the specified page table, and the specified entry imparts an address of a real page allocated to the virtual page corresponding to the specified entry.
A plurality of virtual address spaces may be formed for one real storage device, and one virtual address space may be allocated to each job. In this case, a segment table is prepared for each virtual address space, and each segment table has its own page tables as a basic rule. In such a case, the virtual address space is divided into job private areas and system common areas The job private area is exclusively used for a job and the content thereof is independent of that for other virtual address spaces. Accordingly, allocation of real storage to this area is free. On the other hand, the system common area is for information common to a plurality of virtual address spaces (for example, an area for accommodating common data and common programs such as OS, interjob communication and others). Accordingly, the same virtual address in the areas of the virtual address spaces must be translated into the same real address.
In the past, a boundary between the system common area and the job private area has corresponded to a segment boundary, because the segment tables of the virtual address spaces are set to specify the same page tables for the system common area. Such common use of the page table is due to the above requirement that the same virtual address in the system common area must be converted into the same real address. This requirement means that the content of the page table for the system common area must always be the same for all virtual address spaces. The common use of the page table is adopted because of the above requirement. Under such a mechanism, it is difficult to use a portion of one segment as the system common area and another portion as the job private area, because every real page corresponding to the page in the segment which includes the system common area is shared by all virtual address spaces or all jobs through the common page table. As a result, even if there is a page in the segment of the system common area at the boundary, which page is not used in the system common area, it cannot be used as the job private area, and so an idle area may be created.
FIG. 2 diagramatically shows a process of address translation for the system common area by the shared page table. Let us assume that there are three virtual address spaces, and entries SGTEl-1, SGTE2-1 and SGTE3-1 of segment tables SGTl-1, SGT2-1 and SGT3-1 of the respective virtual address spaces correspond to the segment including the system common area and designate the same page table PGT-1. Each entry of the page table PGT-1 indicates whether a corresponding virtual page has been allocated and whether a real page for the virtual page is allocated, and when the real page is allocated, indicates the real page RPG-1. The status usually dynamically changes, and the content of the page table PGT-1 is updated accordingly. A hatched area in the PGT-1 shown in FIG. 2 is a portion corresponding to the page which is actually used as the system common area, and other area is a portion corresponding to the idle pages.
In the prior art virtual storage, since the segment size is relatively small, the number of idle pages is limited and no serious problem occurs. However, as the virtual address space is expanded and the segment size is increased, the number of idle pages may become very large. For example, when the segment size is 64K bytes (16 pages), the number of idle pages can be as many as 15. However, in a 2G-byte virtual address space having 2048 segments of 1M-byte (256 pages) size, the number of idle pages can reach 255 in the worst case. This is significant waste. When jobs prepared on the premise of a virtual address space of the conventional size are executed with a large virtual address space, the job private area is very much limited.
USPTO Backgrounds
USPTO Backgrounds