The present invention relates to the fields of filesystems and operating systems, and more particularly to optimizing processing of I/O operations on a filesystem by an operating system. An operating system is system software that manages computer hardware and software resources and provides common services for computer programs. The operating system is a component of the system software in a computer system. With the aid of firmware and device drivers, the kernel of the operating system provides the most basic level of control over all of the computer's hardware devices. The kernel organizes data for long term storage with file systems on media such as disks, tapes, and flash memory.
A filesystem is used to control how data is stored and retrieved. The operating system enables a user application to access data stored by the filesystem. For example, the operating system may provide system calls that can be used by the user application program to open a file stored on the filesystem and read data from the opened file. However, the order at which the user application execute these system calls may cause unnecessary delays.
An exemplary embodiment of the present invention provides a computer storage management system that includes a memory storing a process; a processor executing the process; and an operating system (OS). The OS includes a filesystem configured to receive a plurality of requests from the process to access data stored on the memory; and a filesystem event handler configured to receive the requests in a sequence determined by an order in which instructions associated with the requests occur within the process, store the sequence of requests without accessing the memory, and execute the sequence of requests.
According to an exemplary embodiment of the invention, a method of controlling a storage management system includes: storing a plurality of requests into a queue, wherein each request is generated as a result of a process executing a read function to read data from a file; for each stored request, un-mapping an area of a memory map of the process corresponding to an address in which the corresponding read data is to be copied; re-mapping the areas when a condition occurs; and executing the sequence of requests after the re-mapping has been performed.
An exemplary embodiment of the present invention provides a method of modifying an existing operating system. The method includes inserting code into a read function of the operating system that stores a request into a queue and un-maps an area of a process map table of a process, each time the read function is executed by the process to read data from a file, wherein the area includes an address where the read data is to be copied; and inserting code into an event handler of the operating system to re-map the areas when the process requires access to one of the areas.
Through the more detailed description of some embodiments of the present disclosure in the accompanying drawings, features of the present disclosure will become more apparent, wherein:
The inventive concept will be described in more detail with reference to the accompanying drawings, where exemplary embodiments of the present disclosure have been illustrated. Throughout the drawings, same or like reference numerals are used to represent the same or like components. However, the present inventive concept can be implemented in various manners, and thus should not be construed to be limited to the embodiments disclosed herein. On the contrary, those embodiments are provided for the thorough and complete understanding of the present disclosure to convey the scope of the present disclosure to those skilled in the art.
Filesystems can be heavily optimized by performing collective I/O operations. That is, if a given process P1 requests to read 100 bytes from FileA starting at offset 0, process P2 requests to read 100 bytes starting at offset 100, and process P3 requests to read 100 bytes from FileA starting at offset 200, then an optimized file system can sort these requests according to the cost of accessing the request's offset or perform a single read operation that covers the entire range of data requested by the processes (e.g., applications). However, since the file opening calls and file reading calls used to read these bytes are serialized, there is nothing the filesystem can do to perform optimized access to the underlying media. Accordingly, embodiments of the invention provide a way of converting sequential sequences of read operations into parallel requests to the filesystem with no changes to the user application code.
As shown in
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
The computer system/server 12 may include a variety of computer system readable media. Such media may be any available media that is accessible by the computer system/server 12, and it includes both volatile and non-volatile media, removable and non-removable media.
The system memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32. The computer system/server 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example, storage system 34 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a “hard drive”). Although not shown, a magnetic disk drive for reading from and writing to a removable, non-volatile magnetic disk (e.g., a “floppy disk”), and an optical disk drive for reading from or writing to a removable, non-volatile optical disk such as a CD-ROM, DVD-ROM or other optical media can be provided. In such instances, each can be connected to bus 18 by one or more data media interfaces. As will be further depicted and described below, memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40, having a set (at least one) of program modules 42, may be stored in memory 28 by way of example, and not limitation, as well as an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data or some combination thereof, may include an implementation of a networking environment. The program modules 42 generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
The computer system/server 12 may also communicate with one or more external devices 14 such as a keyboard, a pointing device, a display 24, etc.; one or more devices that enable a user to interact with the computer system/server 12; and/or any devices (e.g., network card, modem, etc.) that enable the computer system/server 12 to communicate with one or more other computing devices. Such communication can occur via Input/Output (I/O) interfaces 22. The computer system/server 12 can communicate with one or more networks such as a local area network (LAN), a general wide area network (WAN), and/or a public network (e.g., the Internet) via a network adapter 20. As depicted, the network adapter 20 communicates with the other components of computer system/server 12 via the bus 18. It should be understood that although not shown, other hardware and/or software components could be used in conjunction with the computer system/server 12. Examples of these other hardware and/or software components include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems.
If an embodiment of the invention is not applied, after the file is opened, 1024 bytes are read during a first step from the file beginning at offset 4096 into a first buffer (e.g., outputBuffer1), second 1024 bytes are read during a second step from the beginning of the file (i.e., at offset 0 into a second buffer (e.g., outputBuffer2), and finally a check sum operation (e.g., see line 4 in
Referring to
Referring to
Referring to
The method next includes determining whether to continue queuing up requests (S404). For example, the method will continue to queue up read requests until a certain condition occurs. These conditions may include the following: the process attempting to access an area that was un-mapped, the process attempting to write to the file, the process having already queued up a pre-determined number of read requests.
When the method has determined that it should not continue queuing up requests, the method re-maps all of the prior un-mapped areas (S405), and executes all of the queued requests in an optimized order (S406). For example, the order may be optimized to reduce the seek time, which is the time taken for a disk drive to locate an area of the disk were the data to be read is stored.
The file system event handler 214 responds to the page fault by re-mapping all the areas that were un-mapped including the second un-mapped area (e.g., buf_2). For example, the page fault triggers the file system event handler 214. The file system event handler 214 (e.g., trap handler) then coalesces all of that process' queued requests and sends them as a whole to the underlying filesystem, which does the actual read operations. In an embodiment, the underlying filesystem is configured to receive a command from the event handler 214 to read data from a file at multiple offsets and differing amounts of requested bytes from those offsets so that the underlying filesystem can process the queued requests as a whole.
The file system is able to determine the best access order to serve the read requests based on (1) the current position of the medium's read head and on (2) the physical location in the medium where each requested data is stored. By doing so, a single-threaded application can gain the benefits of efficient I/O that are often given only to high performance computing applications carefully crafted to execute parallel I/O. In an exemplary embodiment, rather than rely on the file system to re-order the requests, the event handler 214 re-orders the requests on its own. For example, the event handler 214 could sort the requests in ascending or descending order of offsets.
As shown in
Embodiments of the invention are implemented at the operating system's kernel level of the operating system 210 and not within the processes 220 themselves. In essence a trap is created in a common low-level API that all applications/processes will eventually use if they operate on files. For example, no matter what language an application is written in, ultimately that software's requests to read data from a file will end up being handled by that low-level API in the kernel. Thus, as long as an application performs a set of calls to regular read requests, embodiments of the invention are able, to intercept these requests and queue them according to the above described methods
Please note that while the sample code illustrated in
Referring to
The method further includes inserting code into an event handler of the OS to un-map the areas when the process requires access to one of the areas (S502). For example the process requires access to one of the areas when the process has executed an instruction that operates on one of the areas or when the process has executed an instruction that writes to the file. In an embodiment in which the operating system is 210 is interpreted at run-time, it does not require re-compiling after the above code insertions are made.
In an alternate embodiment, when the operating system 210 is non-interpretative, the method may further include compiling or re-compiling the code of the operating system.
Embodiments of the invention may be applied to various software including desktop/embedded/server software, software that reads data but never consumes or operates on that data, software reading large collections of data (e.g., satellite imagery, sensing data from oil reservoirs, etc.).
The units shown in
The present invention may be a system, a method, and/or a computer program product. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention.
The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The descriptions of the various embodiments of the present invention have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Number | Name | Date | Kind |
---|---|---|---|
5072378 | Manka | Oct 1991 | A |
5269013 | Abramson et al. | Dec 1993 | A |
6105104 | Guttmann et al. | Aug 2000 | A |
6272565 | Lamberts | Aug 2001 | B1 |
6654295 | Frank, Jr. et al. | Nov 2003 | B2 |
7477477 | Maruchi et al. | Jan 2009 | B2 |
8700879 | Porzio | Apr 2014 | B2 |
9274937 | Batwara | Mar 2016 | B2 |
20120210095 | Nellans | Aug 2012 | A1 |
20130212319 | Hida | Aug 2013 | A1 |
Entry |
---|
Kivity et al., OSv—Optimizing the Operating System for Virtual Machines, 2014 USENIX Annual Technical Conference, pp. 61-72. (Year: 2014). |
Sun et al, RALD: Reliable Transactional Software Controller for Redundancy Array of Log Structured Disks, Aug. 24-26, 2015, pp. 110-121. (Year: 2015). |
Pirkola, “A file system for a general-purpose time-sharing environment.” Proceedings of the IEEE 63.6 (1975): 918-924. |
Matthews, “Improving file system performance with adpative methods.” Diss. University of California at Berkeley, 1999. |
Domjan, “Processor management for adaptive applications.” Diss. ETH Zürich, 2001. |
Jacobson et al., “Disk scheduling algorithms based on rotational position.” Palo Alto, CA: Hewlett-Packard Laboratories, 1991. |
Reuther et al., “Rotational-position-aware real-time disk scheduling using a dynamic active subset (DAS).” Real-Time Systems Symposium, 2003. RTSS 2003. 24th IEEE. IEEE, 2003. |
Number | Date | Country | |
---|---|---|---|
20170139614 A1 | May 2017 | US |