The instant disclosure relates generally to database systems. More specifically, this disclosure relates to a database system that includes a data expanse viewer and a view instruction.
Database management systems traditionally provide for the management of data in a particular database and the management of access to that data by many different user programs. The user programs are often written in a high level language, such as C, C++, Java, or some other analogous language. The user program typically performs a call of the database management system when a database operation is to be performed.
Conventional database management systems have numerous drawbacks. For example, conventional systems require the caching of data in the database management system, which requires the database management system to manage data control using locks and test & set operations on the underlying data file. Beyond the cache control requirement, conventional database management systems are required to address various portions of database files to access data managed by the database, and often times the addressable range of the database management system is smaller than the maximum size of database files. Thus, the requirement that the database management system address data from database files becomes a hindrance to conventional database management systems because it limits the size of the database files that can be managed, or at the very least limits a user application to addressing only data that is located in a particular range of addresses. As database file sizes continue to increase, the issues associated with conventional database management systems will only become more problematic.
The accessing of database files may be improved with systems and methods that provide data expanse views of memory-mapped files on certain operating systems, including SAIL-based operating systems. According to one embodiment, a method includes receiving, from a database management system, a view instruction, using a single band descriptor able to describe 2**60 words of space, defined as a data expanse; creating, by an operating system, the data expanse in response to the view instruction; and allowing an activity to access a subset of the data expanse with a postern; wherein fast access to data whose size exceeds the available virtual address space is available.
According to another embodiment, a computer program product may include a non-transitory computer-readable medium comprising instructions which, when executed by a processor of a computing system, cause the processor to perform the following actions: receiving, from a database management system, a view instruction, using a single band descriptor able to describe 2**60 words of space, defined as a data expanse; creating, by an operating system, the data expanse in response to the view instruction; and allowing an activity to access a subset of the data expanse with a postern; wherein fast access to data whose size exceeds the available virtual address space is available.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter that form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the concepts and specific embodiments disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims. The novel features that are believed to be characteristic of the invention, both as to its organization and method of operation, together with further objects and advantages will be better understood from the following description when considered in connection with the accompanying figures. It is to be expressly understood, however, that each of the figures is provided for the purpose of illustration and description only and is not intended as a definition of the limits of the present invention.
For a more complete understanding of the disclosed systems and methods, reference is now made to the following descriptions taken in conjunction with the accompanying drawings:
In the embodiment shown in
An interface 108, such as SAIL 108, may provide an interface between the emulated operating system 106 executing on a server and an operating environment, such as Linux, thereby providing the underlying operating system on which an operating environment executes. In some embodiments, SAIL 108 may include the emulated operating system 106 and the layer in which the operating environment executes, such as Linux. In some embodiments, SAIL 108 may be responsible for loading and initializing instruction processor emulators in the computer system 100. According to another embodiment, SAIL 108 may also acquire and initialize the initial memory area used by an operating environment and pass a pointer to the initial memory area to instruction processor emulators during a computer system startup.
The SAIL 108 may also interface with SAIL disk subsystem 118, which may physically store memory-mapped data expanse files 116a-n, to provide access to one or more memory-mapped data expanse files 116a-n to the emulated operating system 106, the database management system 104, and the plurality of user applications 102a-n. For example, in some embodiments, one or more database files 142 retrieved by the emulated operating system 106 from the OS disk subsystem 140 may be mapped to one or more memory-mapped data expanse files 116a-n located at the SAIL 108 and stored at the SAIL disk subsystem 118. As shown in
The emulated operating system 106 can be any of a variety of operating systems capable of hosting a database management system 104 and which provides access controls to data stored in database files 142 on the OS disk subsystem 140. In one example embodiment, the emulated operating system 106 can be an operating system from Unisys Corporation of Blue Bell, Pa. In alternative embodiments, other operating systems could be used as well.
In the embodiment shown in
Following creation of the memory-mapped data expanse, the data expanse control 110 can be used by any of the user applications 102a-n to access and/or modify data in the memory-mapped data expanse by creating a view of the data expanse. In one embodiment, the data expanse may be the memory mapped data expanse created by the CREATSDATAXP call. The data expanse view may be a bank created by the operating system 106 in response to a DX$VIEW. The bank may be a visible subset or view of the data expanse. For example, each of the user applications can request a different view of the data expanse, defined by a starting address (i.e., an offset from the starting address returned to the RDMS data expanse control 110), as well as a size of the view to be created. This can be accomplished, for example as shown, using the operating system call DX$VIEW, providing the starting address and size of the view to be created. The data expanse view control component 114 can then create a view of the data expanse, and provide to the database management system 104 a private address of the view. For example, the address can be an extended virtual mode address, including a length and a bank descriptor index to reference the location of the view.
In some embodiments, the data expanse may be referenced by its starting address or by an address of a particular segment, therefore the RDMS data expanse control 110 and other portions of the database management system 104 may not need to be capable of addressing the entire range of the data expanse created. Rather, the particular view created within the data expanse may be fully addressable by the database management system 104. In this way, a database management system, such as system 104, can be made compatible with data files having sizes greater than a maximum addressable range of the database management system. For example, in some embodiments of the present disclosure, the database management system 104 may be capable of individually addressing addresses in a bank of 262 thousand words; in such an arrangement, the database file 142 can have a size in excess of that number, since the address identified by the database management system to the emulated operating system 106 might identify an offset on a bank-by-bank basis, rather than on an individual, word-addressable basis.
Furthermore, using the system 100 as illustrated, a bank may be made accessible to the database management system 104 without requiring that the database management system cache each database file. Still further, and in contrast to locking a bank (and corresponding database file) to a particular application, the data expanse arrangement of
The aforementioned combination of RAM and swap files may be viewed as one interpretation of virtual memory. The use of virtual memory may allow a computing system to run more programs than it could run in RAM alone. In some embodiments, an operating system, such as Linux, Windows, Java, Unix, or the like, may set aside a permanent swap space that reserves a certain portion of the hard disk. According to one embodiment, permanent swap files may take a contiguous section of the hard disk.
A memory-mapped file may be a segment of virtual memory which has been assigned a direct byte-for-byte correlation with some portion of a file or file-like resource. This resource may be a file that is physically present on-disk or may be a device, shared memory object, or other resource that the operating system can reference through a file descriptor. Once present, the correlation between the file and the memory space may permit applications to treat the mapped portion as if it were primary memory. One benefit of memory mapping a file is increased input/output (I/O) performance, for example, when files being accessed are large. Therefore, in some embodiments, implementing a data expanse with memory-mapped files instead of swap files may lead to increased system performance.
Referring to
According to an embodiment, paging by the SAIL 122 may move data in and out of memory 124 from the swap file 130 and the data expanse (memory mapped files) 132. In some embodiments, an emulator 134 within the SAIL 122 may reference data directly into memory 124 using a virtual address assigned by either the swap file paging interface 128 or the memory mapping interface 126. For example, when an operating system needs memory for banks the operating system may call the swap file paging interface 128 to allocate the required memory and return a virtual address to the allocated memory. The allocated memory may be part of a swap space and may be shared with other applications executing in SAIL 122, such as network I/O. When a bank is no longer needed, a call may be made by the operating system to remove and recycle the memory space. According to another embodiment, when the operating system needs to assign a data expanse, the operating system may call the memory mapping interface 126 to initialize a memory mapped file and return a virtual address to the file.
The database management program 204 can be any program implementing a database management system that is hosted by an underlying operating system. In an example embodiment, the database management program may correspond to a relational database management system, such as the relational database management system (RDMS) available from Unisys Corporation of Blue Bell, Pa. The relational data model represents data in two dimensional tables of rows and columns. In alternative embodiments, other types of database management systems, and other arrangements of databases, could be used as well.
In the embodiment shown, the database management program 204 may include a syntax analyzer component 206, an access component 208, and an error status component 210. The components 206-210 may be used to access and validate access requests to data on behalf of the user application 202 by the database management program 204. The syntax analyzer component 206 may receive a database command from the user application 202, such as a SQL command, or other database command that will allow the application program to add, delete, insert, and update data in a database. In some embodiments, the syntax analyzer component 206 may determine an operation to be performed based on parsing of the received command.
If no errors are detected in the command, the access component 208 may interface with an underlying operating system to access a file containing data associated with the database accessed by the user application 202 for parsing and use by the database management program 204. The access component 208 can then execute the database command as defined in the received command. In such a case, an error status component 210 may be set to indicate that no error has occurred in completion of the database operation. However, if an error is detected in the syntax analyzer component 206, or during performance of the command by the access component 208, error status component 210 may indicate that an error exists in the received database command. Accordingly, either a confirmation of the properly executed database command, or an indication of an error, can be returned from the error status component 210 to the user application 202.
In some embodiments, beyond passage of particular database commands from the user application 202, it is also possible for the database management program 204 to allow use of placeholder variables in a command string, and therefore transfer values from program variables in the C code of the program to the database, or from the database to program variables in the C code, thereby integrating the database as a mechanism for storage of large program constructs, such as variables of large size, variable classes, and other data structures used as variables and for which storage in a database is convenient.
In one example embodiment,
A CREATSDATAXP 312 call from the RDMS 304 to the operating 302 tells the operating system to create and initialize all necessary control structures to control the data expanse. A data expanse is a single bank descriptor that allows access to up to 2**60 words of virtual and/or physical space. These control structures include a data expanse view control 314 and a data expanse file control 316. The address of the data expanse is returned in the CREAT$DATAXP packet. The RDMS 304 calls the VIEW instruction 308 and provides the data expanse address, starting offset and size of the postern (can be upto 2**60 words of space), or activity level bank, to be created. The operating system 302 returns the address of the postern (L, BDI) 314 to the RDMS 304. The RDMS 304 bases the postern and the data can be read or written.
The RDMS 304 can modify the postern by calling the VIEW instruction 308, providing the data expanse address, the postern address, starting offset and the size of the view. The RDMS 304 will base the postern and the data can be read or written. The RDMS 304 can deleted the postern by calling the VIEW instruction 308, providing the data expanse address and a null postern address. The RDMS 304 can delete the expanse by calling a DELET$DATAXP call to the operating system 302.
The above example embodiment is faster than previous implementations because an operating system interface has thousands of instructions to be implemented. Creating the data expanse at the operating system 302 level eliminates the need for an interface. The database can have multiple views enabled at one time.
The View instruction 406 modifies the Postern BD specified by a U.L., BDI with information from both (U) and from the Data_Expanse BD entry specified by U.DEL, DEBDI and, optionally loads one of the user Base_Registers B2-B15, specified by U.B., to describe a portion of the Data_Expanse entry selected.
The multi0word U operand has the following format:
L,BDI selects the Level and BDI of the Postern.
If L,BDI=0 and DEL,DEBDI 0 then an SSF=3 interrupt is intercepted by the operating system and a postern bank is created. The postern bank's L,BDI is inserted into the packet and the view instruction restarts following the contingency.
DEL,DEBDI selects the Level and BDI of the Data_Expanse.
If L,BDI #0 and DEL,DEBDI=0 then an SSF=3 interrupt is intercepted by the operating system and the postern bank is deleted. L,BDI is set to zero in the packet and the next instruction is executed following the contingency.
Subset, 30 most significant bits. The Postern BD describes a space starting subset distance from the beginning of the space defined by the selected Data_Expanse BD.
Subset, 36 least significant bits. The Postern BD describes a space starting subset distance from the beginning of the space defined by the selected Data_Expanse BD.
Postern_upper_limit. The Postern_upper_limit is the highest numbered address from the Postern BD Base_Address to which the Postern BD has visibility. If Postern_upper_limit>0777776, then hardware generates an Addressing_Exception interrupt (see VIEWing; section 11; step 12).
Postern_lower_limit. When establishing a BD for use by Basic_Mode programs, a non-zero Postern_lower_limit may be required.
Base_Register to load. To save having to execute a VIEW then an LBU of the same Postern, the VIEW instruction loads the specified Base_Register if B≠0. If B=0, the VIEW instruction does not load a Base_Register from the established Postern BD. If B−1, then hardware generates an Addressing_Exception interrupt (see VIE Wing; section 11; step 14).
Set to zero by user and filled in by operating system if an interrupt (section 13) caused a user error.
All of the interrupts (class9, SSF interrupts) generated from the view instruction hardware are fielded by the operating system and transformed into a user-friendly status that is placed into word 7 of the view operand above. But two interrupts in the view operand are not transformed into a word, but instead cause the operating system to either create a postern or deleted the specified postern. If the postern is created, the operating system fills in the L, BDI of the postern and restarts the instruction. If the postern is deleted, the L,BDI is removed from the View operand, a “user” status is stored, and the next instruction is executed. These interrupts include:
LBDI selects the Level and BDI of the Postern.
If L,BDI=0 and DEL,DEBDI≠0 then an SSF=3 interrupt is intercepted by the operating system and a postern bank is created. The postern bank's L,BDI is inserted into the packet and the view instruction restarts following the contingency.
DEL,DEBDI selects the Level and BDI of the Data_Expanse.
If L,BDI 0 and DEL,DEBDI=0 then an SSF=3 interrupt is intercepted by the operating system and the postern bank is deleted. L,BDI is set to zero in the packet and the next instruction is executed following the contingency.
VIEWing is a mechanism whereby a Postern Bank Descriptor (and optionally a Base Register 412) is loaded to describe only a portion of a Data Expanse Bank Descriptor. The VIEW instruction uses a specified Subset, such that subsequent references to that Postern Bank Descriptor interpret U as relative to the Subset rather than to the true start of the Data Expanse. The VIEW instruction also provides Postern upper limit, and Postern lower limit to establish a Postern BD for Basic Mode. VIEWing applies only to Postern Bank Descriptors (and optionally a Base Register). The VIEW Algorithm is as follows and is represented in
In view of exemplary systems shown and described herein, methodologies that may be implemented in accordance with the disclosed subject matter will be better appreciated with reference to various functional block diagrams. While, for purposes of simplicity of explanation, methodologies are shown and described as a series of acts/blocks, it is to be understood and appreciated that the claimed subject matter is not limited by the number or order of blocks, as some blocks may occur in different orders and/or at substantially the same time with other blocks from what is depicted and described herein. Moreover, not all illustrated blocks may be required to implement methodologies described herein. It is to be appreciated that functionality associated with blocks may be implemented by software, hardware, a combination thereof or any other suitable means (e.g. device, system, process, or component). Additionally, it should be further appreciated that methodologies disclosed throughout this specification are capable of being stored on an article of manufacture to facilitate transporting and transferring such methodologies to various devices. Those skilled in the art will understand and appreciate that a methodology could alternatively be represented as a series of interrelated states or events, such as in a state diagram.
In one embodiment, the user interface device 610 is referred to broadly and is intended to encompass a suitable processor-based device such as a desktop computer, a laptop computer, a personal digital assistant (PDA) or tablet computer, a smartphone or other mobile communication device having access to the network 608. In a further embodiment, the user interface device 610 may access the Internet or other wide area or local area network to access a web application or web service hosted by the server 602 and may provide a user interface for enabling a user to enter or receive information.
The network 608 may facilitate communications of data between the server 602 and the user interface device 610. The network 608 may include any type of communications network including, but not limited to, a direct PC-to-PC connection, a local area network (LAN), a wide area network (WAN), a modem-to-modem connection, the Internet, a combination of the above, or any other communications network now known or later developed within the networking arts which permits two or more computers to communicate.
The computer system 700 may also include random access memory (RAM) 708, which may be synchronous RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), or the like. The computer system 700 may utilize RAM 708 to store the various data structures used by a software application. The computer system 700 may also include read only memory (ROM) 706 which may be PROM, EPROM, EEPROM, optical storage, or the like. The ROM may store configuration information for booting the computer system 700. The RAM 708 and the ROM 706 hold user and system data, and both the RAM 708 and the ROM 706 may be randomly accessed.
The computer system 700 may also include an I/O adapter 710, a communications adapter 714, a user interface adapter 716, and a display adapter 722. The I/O adapter 710 and/or the user interface adapter 716 may, in certain embodiments, enable a user to interact with the computer system 700. In a further embodiment, the display adapter 722 may display a graphical user interface (GUI) associated with a software or web-based application on a display device 724, such as a monitor or touch screen.
The I/O adapter 710 may couple one or more storage devices 712, such as one or more of a hard drive, a solid state storage device, a flash drive, a compact disc (CD) drive, a floppy disk drive, and a tape drive, to the computer system 700. According to one embodiment, the data storage 712 may be a separate server coupled to the computer system 700 through a network connection to the I/O adapter 710. The communications adapter 714 may be adapted to couple the computer system 700 to the network 608, which may be one or more of a LAN, WAN, and/or the Internet. The user interface adapter 716 couples user input devices, such as a keyboard 720, a pointing device 718, and/or a touch screen (not shown) to the computer system 700. The display adapter 722 may be driven by the CPU 702 to control the display on the display device 724. Any of the devices 702-722 may be physical and/or logical.
The applications of the present disclosure are not limited to the architecture of computer system 700. Rather the computer system 700 is provided as an example of one type of computing device that may be adapted to perform the functions of the server 602 and/or the user interface device 710. For example, any suitable processor-based device may be utilized including, without limitation, personal data assistants (PDAs), tablet computers, smartphones, computer game consoles, and multi-processor servers. Moreover, the systems and methods of the present disclosure may be implemented on application specific integrated circuits (ASIC), very large scale integrated (VLSI) circuits, or other circuitry. In fact, persons of ordinary skill in the art may utilize any number of suitable structures capable of executing logical operations according to the described embodiments. For example, the computer system 700 may be virtualized for access by multiple users and/or applications.
In another example, hardware in a computer system may be virtualized through a hypervisor.
If implemented in firmware and/or software, the functions described above may be stored as one or more instructions or code on a computer-readable medium. Examples include non-transitory computer-readable media encoded with a data structure and computer-readable media encoded with a computer program. Computer-readable media includes physical computer storage media. A storage medium may be any available medium that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Disk and disc includes compact discs (CD), laser discs, optical discs, digital versatile discs (DVD), floppy disks and blu-ray discs. Generally, disks reproduce data magnetically, and discs reproduce data optically. Combinations of the above should also be included within the scope of computer-readable media.
In addition to storage on computer-readable medium, instructions and/or data may be provided as signals on transmission media included in a communication apparatus. For example, a communication apparatus may include a transceiver having signals indicative of instructions and data. The instructions and data are configured to cause one or more processors to implement the functions outlined in the claims.
Although the present disclosure and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the disclosure as defined by the appended claims. Moreover, the scope of the present application is not intended to be limited to the particular embodiments of the process, machine, manufacture, composition of matter, means, methods and steps described in the specification. As one of ordinary skill in the art will readily appreciate from the present invention, disclosure, machines, manufacture, compositions of matter, means, methods, or steps, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding embodiments described herein may be utilized according to the present disclosure. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.