AU2021297161B2 - Fast compiling source code without dependencies - Google Patents
Fast compiling source code without dependencies Download PDFInfo
- Publication number
- AU2021297161B2 AU2021297161B2 AU2021297161A AU2021297161A AU2021297161B2 AU 2021297161 B2 AU2021297161 B2 AU 2021297161B2 AU 2021297161 A AU2021297161 A AU 2021297161A AU 2021297161 A AU2021297161 A AU 2021297161A AU 2021297161 B2 AU2021297161 B2 AU 2021297161B2
- Authority
- AU
- Australia
- Prior art keywords
- code
- nodes
- executable
- node
- sections
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 claims abstract description 42
- 230000006870 function Effects 0.000 claims description 40
- 238000007796 conventional method Methods 0.000 abstract 1
- 238000009434 installation Methods 0.000 description 37
- 230000007704 transition Effects 0.000 description 27
- 238000010586 diagram Methods 0.000 description 20
- 230000005055 memory storage Effects 0.000 description 12
- 238000009635 antibiotic susceptibility testing Methods 0.000 description 8
- 238000011900 installation process Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 230000001419 dependent effect Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 230000006872 improvement Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 239000002131 composite material Substances 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000006855 networking Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 241000577979 Peromyscus spicilegus Species 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 210000003813 thumb Anatomy 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
Abstract
Techniques for an ultra-fact software compilation of source code are provided. A compiler receives software code and may divide it into code sections. A map of ordered nodes may be generated, such that each node in the map may include a code section and the order of the nodes indicates an execution order of the software code. Each code section may be compiled into an executable object in parallel and independently from other code sections. A binary executable may be generated by linking executable objects generated from the code sections. The methodology significantly differs from existing source code compilation techniques because conventional compilers build executable sequentially, whereas the embodiments divide the source code into multiple smaller code sections and compile them individually and in parallel. Compiling multiple code sections improves the compilations in order of magnitude from conventional techniques.
Description
FAST COMPILING SOURCE CODE WITHOUT DEPENDENCIES
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to U.S. Application No. 16/912,507, filed June 25, 2020, and U.S. Application No. 16/912,517, filed June 25, 2020. which is incorporated herein by reference in their entirety.
TECHNICAL FIELD
[0002] The disclosure generally relates to fundamental changes in software operations and allowing faster actions by changing the way software dependencies operate, particularly in some embodiments that relate to installing and updating operating systems and compiling source code into a binary executable.
BACKGROUND
[0003] Conventionally, an operating system is installed by sequentially installing multiple components on a computing device. As components are installed, components transition from an uninstalled to installed state. Further, installation of subsequent components often depends on the previous components transitioning from an uninstalled to the installed states. E.g. if component B is dependent on the successful install of component A, the install for component B cannot be completed (or in many cases not even started) until component A is finished. Because of these dependencies, the operating system installation process is highly sequential and is difficult to parallelize. Further, if the installation of one of components fails, the installation of components subsequent to the one blocking component also fails. This causes the entire installation process to fail which leads to wasted installation and processing time.
[0004] Conventionally, a compiler may compile source code in a sequential process. In the sequential process, the compiler performs a lexical analysis of the entire source code, generates an abstract syntax tree from the entire source code, generates an assembly code from the abstract syntax tree and converts the assembly code into a binary
executable. This highly sequential process results in significant delays in compilation times. Applicant recognizes that with respect to operating system installs, source code compiling, and software operations generally, there is an opportunity to dramatically speed up certain actions that are dependent on the completion of other prior actions.
BRIEF DESCRIPTION OF THE DRAWINGS
[0005] FIG. 1 is an exemplary system where embodiments can be implemented. [0006] FIG. 2 is a block diagram for installing an operating system, according to an embodiment.
[0007] FIG. 3 is a flowchart of a method for installing an operating system, according to an embodiment.
[0008] FIGs. 4 and 5 are block diagrams illustrating an update of an operating system, according to an embodiment.
[0009] FIG. 6 is a flowchart of a method for updating an operating system, according to an embodiment.
[00010] FIG. 7 is a block diagram of a compiler, according to an embodiment.
[00011] FIG. 8 is a diagram of a source code, according to an embodiment.
[00012] FIG. 9 is a diagram of an ordered map with nodes that include code sections from the source code, according to an embodiment.
[00013] FIG. 10 is a diagram of an assembly code generated from the code sections, according to an embodiment.
[00014] FIG. 11 is a diagram of executable objects generated from the code sections, according to an embodiment.
[00015] FIG. 12 is a diagram of an executable generated from the executable objects, according to an embodiment.
[00016] FIG. 13 is a flowchart of a method for compiling source code, according to an embodiment.
[00017] FIG. 14 is a block diagram of a computer system suitable for implementing one or more components or operations in FIGs. 1-13 according to an embodiment.
[00018] Embodiments of the disclosure and their advantages are best understood by referring to the detailed description that follows. It should be appreciated that like reference
numerals are used to identify like elements illustrated in one or more of the figures, wherein showings therein are for purposes of illustrating embodiments of the disclosure and not for purposes of limiting the same.
DETAILED DESCRIPTION
[00019] The detailed description set forth below, in connection with the appended drawings, is intended as a description of various configurations and is not intended to represent the only configurations in which the concepts described herein may be practiced. The detailed description includes specific details for the purpose of providing a thorough understanding of the various concepts. However, it will be apparent to those skilled in the art that these concepts may be practiced without these specific details. In some instances, well-known structures and components are shown in block diagram form in order to avoid obscuring such concepts.
[00020] The embodiments describe fundamental changes to conventional software operations that result in geometric decrease in magnitude in software operations that, for example, install or update an operating system or compile source code into a binary executable. This may be accomplished by distilling typically aggregated components into the building blocks and then acting on the building blocks individually. By acting on the building blocks individually, the building blocks may be executed or compiled separately and in parallel from other building blocks and without external dependencies, such as dependencies on other building blocks. As each building block is executed or compiled the building block transitions from an initial state to a final state. Once all blocks have transitioned to the final state, the entire global state may shift to a final global state. The embodiments below apply the above methodology to software operations that perform installation of an operating system, an update of an operation system, and execution or compilation of any form of source code into a binary executable.
Overview of Ultra-Fast Operating System Installation
[00021] Different embodiments describe a novel installation process that reduces operating system installation times, such as from twenty-five minutes to approximately fifteen seconds on the same or similar computing device and using the same or similar
hardware. Conventionally, the components of an operating system are installed by sequentially copying the components initially stored in a memory storage such as a compact disk or a universal serial bus (USB) drive to a computing device or another device that runs the operating system. As the components are installed, the components transition from an uninstalled state to an installed state. The components are highly dependent on other components successfully transitioning from an uninstalled state to an installed state. Because of inter-dependencies between the components, if one of the components fails, then the entire installation operating system installation process fails. [00022] For example, suppose an operating system is installed in a conventional, sequential manner. Suppose further that the operating system includes six components, such as component A, component B, component C, component D, component E, and component F. The components maybe files, libraries, executable programs, etc. During installation, each of the components A-F transitions from an uninstalled state to an installed state. Suppose the installation of component B depends on component A transitioning from an uninstalled state to an installed state, while component C may transition from an uninstalled state to an installed state independently from components A and B. However, while component C can mostly transition independently from components A and B from an uninstalled state to an installed state, component C cannot switch into an installed state until both components A and B transition into the installed state. Further, for the operating system to transition from an uninstalled state to an installed state, all components A-F must transition to the installed states. In this case, if component A does not transition from the uninstalled state to the installed state, neither will component B. Component C also may not transition to an installed state because components A and B have not transitioned to the installed state. Accordingly, the risk of time and processor cycle loss for component B is higher than for component A, and the risk of time and processor cycle loss for component C is higher than for components A and B.
[00023] In another example, suppose component E can be installed only after components A-D have been installed and have transitioned from an uninstalled state to an installed state. However, component E fails to transition from an uninstalled state to an installed state. In this case, the risk of time and processor cycle loss is greater for
component E than for components A-D. Similarly, if component F depends on component E and the installation of component F fails, the risk of time and processor cycle loss is greater for component F than for component E.
[00024] The embodiments herein describe a new operating system installation process that decouples sequential installation of components in the operating system. More particularly, the present techniques allow traditional dependencies to be broken so that when a component B is reliant on completion of a component A, component B can instead be installed independently of component A. In this way, installation of individual components is independent from other components. The new operating system installation process utilizes a disk image container and a definition. A disk image container may store components, e.g. files, libraries, etc., that comprise an operating system. A definition of the operating system includes key-value pairs where a key is a name of a component and a value is a location of the operating system component in memory. An operating system that executes on a computing device and installs the new operating system may receive the container with the components and the definition. Once received, the operating system assigns an uninstalled state to the components and a global uninstalled state to the new operating system. The operating system installs the new operating system by copying components from the container to the respective locations specified in the definition to a memory of a computing device. The components are independent of each other and may be copied in parallel. As each component is copied to the memory, the component transitions from an uninstalled state to an installed state. If one or more components fail, then each component may be corrected independently from other components and without affecting the installation of other components. Once all components are copied to the memory and are switched to the installed state, the operating system switches the global uninstalled state to the installed state which indicates that the new operating system is installed on the computing device. These operations above may occur in various embodiments and should not be assumed as required for any particular embodiment.
Overview of Fast Compiling Source Code
[00025] The embodiments also disclose a novel compilation process that compiles source code written in a programming language into a binary executable. Unlike conventional compilers, the compiler compiles multiple sections of the source code using a novel parallel technique. In the embodiments, the compiler receives source code and divides the source code into code sections. The compiler then generates an ordered map where nodes include the code sections, one code section per node, in some embodiments. The nodes are also appended with edges that indicate the order of the nodes. The order indicates an execution order of the code sections as specified by the software code. For each node, the compiler performs a lexical analysis of the code snippet, generates an abstract syntax tree from the code section based on the lexical analysis, traverses the abstract syntax tree to generate a low-level code, and generates an executable object from the low-level code. The compiler may generate the executable objects for each node in parallel with other nodes. Once the compiler generates the executable objects from all code sections, the compiler may link the executable objects in an order indicated in the ordered map to generate a binary executable. The binary executable may be an executable of an application that executes on a computing device.
[00026] In an embodiment, once the compiler divides the source code into code sections, the compiler may assign an uncompiled state to each code snippet. The compiler may also assign an uncompiled global state to the source code. When the compiler generates an executable object for a corresponding code snippet, the compiler may switch the uncompiled state to a compile state for the code snippet. Once the compiler switches all code sections to a compiled state, the compiler generates a binary executable and switches that global state to a compiled global state.
System that Supports Ultra-Fast Operating System Installation and Update and Fast Compiling Source Code
[00027] FIG. 1 is an exemplary system 100 where embodiments can be implemented. System 100 includes a network 102. Network 102 may be implemented as a single network or a combination of multiple networks. For example, in various embodiments, network 102 may include the Internet or one or more intranets, landline networks, wireless networks, and/or other appropriate types of networks. Network 102 may be a
small-scale communication network, such as a private or local area network, or a larger scale network, such as a wide area network.
[00028] Various components that are accessible to network 102 may be computing device(s) 104 and server(s) 106. Computing devices 104 may be portable and non portable electronic devices under the control of a user and configured to transmit, receive, and manipulate data from one or more servers 106 over network 102. Example computing devices 104 include desktop computers, laptop computers, tablets, smartphones, wearable computing devices, eyeglasses that incorporate computing devices, implantable computing devices, etc.
[00029] Computing devices 104 may include one or more applications 108. Applications 108 may be pre-installed on the computing devices 104, installed on the computing devices 104 using portable memory storage devices, such as compact disks or thumb-drives, or be downloaded to the computing devices 104 from servers 106. Applications 108 may execute on computing devices 104 and receive instructions and data from a user, from server 106.
[00030] Example applications 108 may be payment transaction applications. Payment transaction applications may be configured to transfer money world-wide, receive payments for goods and services, manage money spending, etc. Further, applications 108 may be under an ownership or control of a payment service provider, such as PAYPAL®, Inc. of San Jose, CA, USA, a telephonic service provider, a social networking service provider, and/or other service providers. Applications 108 may also be analytics applications. Analytics applications perform business logic, provide services, and measure and improve performance of services and functions of other applications that execute on computing devices 104 based on current and historical data. Applications 108 may also be security applications for implementing client-side security features, programmatic client applications for interfacing with appropriate application programming interfaces (APIs) over network 102, communication applications, such as email, texting, voice, and instant messaging applications that allow a user to send and receive emails, calls, texts, and other notifications through network 102, and the like. Applications 108 may be location detection applications, such as a mapping, compass, and/or global positioning system (GPS) applications, social networking applications
and/or merchant applications. Additionally, applications 108 may be service applications that permit a user of computing device 104 to receive, request and/or view information for products and/or services, and also permit the user to purchase the selected products and/or services.
[00031] In an embodiment, applications 108 may utilize numerous components included in computing device 104 to receive input, store and display data, and communicate with network 102. Example components are discussed in detail in FIG. 4. [00032] Server 106 may be a computer or a program that provides services and functionality to applications 108. Server 106 may receive requests with data from application 108, manipulate the data using an application 110, which is a server counterpart to application 108 and send a response back to applications 108.
[00033] To execute applications, in some embodiments, server 106 and computing device 104 may include an operating system 112. Operating system 112 may be system software that provides an interface between applications 108, 110, and computer hardware of computing devices 104 and servers 106. Typically, operating system 112 provides common system services to applications 108, 110 such as scheduling application tasks on hardware resources, allocating processor time and volatile and non-volatile memory utilized by applications 108, 110. In some embodiments, operating system 112 also manages hardware functions such as device components that are used for input and output (e.g. mouse and keyboard) of data and memory allocation. In other words, operating system 112 acts as an intermediary between computer hardware (discussed in FIG. 14) and applications 108, 110.
[00034] Prior to computing device 104 executing applications 108 or server 106 executing application 110, operating system 112 is installed on computing device 104 or server 106. Operating system 112 installation may include installing hundreds of components that make up operating system 112 on computing device 104 or server 106. An example component may include a file, library, etc.
[00035] Unlike conventional operating system installation procedures, components of the operating system 112 may be installed irrespective of dependencies among each other. FIG. 2 is a block diagram 200 of a system that installs an operating system, according to some embodiments. Although the diagram 200 illustrates the operating
system 112 installation process on server 106, the embodiments are also applicable to computing device 104. As illustrated in FIG. 2, operating system 112 may include components 202 A, 202B, 202C, 202D and 202E (referred to herein as 202 A-E) which are installed on server 106 before operating system 112 can execute on server 106. Components 202 A-E may be stored in a container 204. Container 204 may be a disk image file such as a QEMU (Quick Emulator) Copy on Write (QCOW) or QCOW2. The disk image may be a file containing the contents and structure of a disk volume or data storage device, such as a hard disk drive, or another memory storage.
[00036] The system in diagram 200 also includes a definition 206. The definition 206 may define the location of components 202A-E in memory, such as a disk volume or data storage device. In other words, definition 206 defines the final installed state of components 202 A-E when operating system 112 is installed on server 106.
[00037] In some embodiments, definition 206 may include multiple key-value pairs. The keys may correspond to the names of components 202A-E and the values may correspond to the location of the components 202A-E in memory. For example, one key- value pair may include a key that is a name of component 202A and a value that is a location of the component 202A in memory. Another key-value pair may include a key that is a name of component 202B and a value that is a location of component 202B in memory. In some instances, definition 206 may be in a JavaScript Object Notation (JSON) format. Further, definition 206 may also include key-value pairs in one or more blobs, such as JSON blobs. The blobs may be groupings of different components 202A- E. With respect to components 202A-E, an example definition 206 may be:
{ OS_files : {
“Component 202A” : “//location/component 202A”
“Component 202B” : “//location/component 202B”
“Component 202C” : “//location/component 202C”
“Component 202D” : “//location/component 202D”
“Component 202E” : “//location/component 202E”
} }
[00038] In some embodiments, server 106 may receive container 204 and definition 206 from another computing device connected to network 102 or from a portable memory storage, such as a thumb drive that may be connected to server 106.
[00039] In some embodiments, server 106 may include an operating system 208. Operating system 208 is already installed and executes on server 106. Server 106 may use operating system 208 to access components 202A-E included in container 204 to install operating system 112.
[00040] In some embodiments, operating system 208 may receive or access container 204 that includes components 202 A-E of operating system 112 and definition 206. For example, operating system 208 may include an application programming interface (API) that receives a name of definition 206 and a name of container 204 and accesses definition 206 and container 204 from a memory within or coupled to server 106. At this point, operating system 208 may assign an uninstalled state to each component in components 202 A-E and an uninstalled global state to operating system 112. Operating system 208 may move components 202A-E stored in container 204 to locations in memory identified in definition 206. The operating system 208 may move each one of components 202A-E independently of other components in components 202A-E, thus eliminating dependencies among components 202A-E.
[00041] For example, suppose installation of component 202B depends on installation of component 202A. If in a conventional installation component 202B cannot be installed until installation of component 202A completes, in the embodiments herein component 202A and component 202B may be installed in parallel and independently of each other and based on the assumption that installation of component 202A will be successful. [00042] Suppose further that installation of component 202C depends on installation of component 202B, and installation of component 202E depends on installation of component 202D, and installation of component 202D depends on installation of component 202B. In a conventional installation, component 202B would not be installed until component 202A has been installed (i.e. copied to a designated location), and components 202C and 202D would not be installed until component 202B has been installed. Further, in a conventional installation, component 202E would not be installed until component 202D has been installed and component 202D would not be installed
until component 202B has been installed. However, when components 202A-E are installed using operating system 208, component 202A may be installed in parallel with component 202B-E, component 202C may be installed in parallel with components 202A-B and 202C-E, component 202D may be installed in parallel with components 202 A-C and 202E, etc. Further the dependencies between components 202 A and 202B, components 202B and 202C, components 202B and 202D, and components 202D and 202E are disregarded. Instead, operating system 208 may assume that installation of components 202A-E will be successful and installs components 202A-E in parallel. [00043] Once operating system 208 moves each component in components 202A-E to the location specified in definition 206, operating system 208 may transition the state of each component from an uninstalled state to an installed state. In the example above, operating system 208 may move component 202A in parallel with component 202B. Moving component 202 A (and other components 202B-E) means copying component 202 A (or other components 202B-E) from container 204 to a memory of a computing device that is specified in definition 206 according to various embodiments. However, operating system 208 completes moving component 202B before it completes moving component 202A. Once operating system 208 completes moving component 202B, operating system 208 may switch the uninstalled state associated with component 202B to an installed state, irrespective of the state of component 202A. Only once operating system 208 completes moving component 202A, does operating system 208 move the uninstalled state associated with component 202A to an installed state.
[00044] As discussed above, operating system 208 may move components 202A-E. Prior to the move, operating system 208 may assign an uninstalled state to each one of components 202A-E. As operating system 208 completes moving each one of components 202A-E, operating system 208 may transition the state of the each one of components 202A-E from uninstalled state to installed state. For example, once operating system 208 moves component 202A from container 204 to one or more locations specified in definition 206, operating system 208 may transition the state of component 202A from uninstalled state to installed state. Similarly, suppose operating system 208 next completes moving component 202C from container 204 to a location specified in definition 206, operating system 208 may then transition the state of component 202C
from uninstalled state to installed state irrespective of whether components 202B and 202D-E have been moved. Operating system 208 may similarly transition the state from an uninstalled state to an installed state for each of components 202C-E as operating system 208 completes moving each of components 202C-E. For example, suppose operating system 208 completes moving component 202E before it completes moving components 202C and 202D. In this case operating system 208 may transition component 202E from an uninstalled to an installed state regardless of component 202E being dependent on component 202D.
[00045] In some embodiments, operating system 112 may also have a global state that is initially set to a global uninstalled state. Operating system 208 may transition the global state of operating system 112 to the installed state when all components 202 A-E have transitioned to the installed state.
[00046] In some embodiments, operating system 208 may also track a component, such as component 202B, that has not been able to transition from an uninstalled state to the installed state. A failure in transitioning from an uninstalled state to an installed state may occur when a location in definition 206 that is associated with component 202B does not exist in memory. In this case, operating system 208 may display, e.g. using an API, the name of component 202B, the location in definition 206 and a reason for the failure. Upon receiving input via the API, such as a new location for component 202B, operating system 208 may again attempt to install component 202B at the new location. This is unlike conventional installations, where the entire operating system may be reinstalled from the beginning because the transition of a component from the uninstalled state to the installed state is dependent on the previous components transitioning from the uninstalled state to the installed state as discussed above.
[00047] In some embodiments, the speed of the operating system 208 copying components 202A-E from container 204 to the locations specified in definition 206 may depend on the hardware and software that executes on server 106. For example, suppose the processor on server 106 may execute three threads where each thread may copy one component from components 202A-E in parallel. In this case, operating system 112 may copy components 220A-C in parallel from container 204 to the respective locations specified in definition 206, and then copy components 202D-E in parallel.
[00048] FIG. 3 is a flowchart of a method 300 for installing an operating system, according to an embodiment. Method 300 may be performed using hardware and/or software components described in FIGs. 1-2. Note that one or more of the operations may be deleted, combined, or performed in a different order as appropriate.
[00049] At operation 302, a definition is received. For example, operating system 208 that installs operating system 112 may receive definition 206. As discussed above, definition 206 includes names of components 202A-E that are included in the operating system 112 and locations of components 202A-E in memory of server 106 or computing device 104. Definition 206 may include multiple key- value pairs where a key in a key- value pair may identify the name of one of components 202A-E and a value may identify a location in memory of the one of the components 202A-E. Definition 206 may be in a JavaScript Object Notation (JSON) format. In some embodiments, operating system 208 may receive definition 206 using an API.
[00050] At operation 304, a container is accessed. For example, operating system 208 may access container 204. Container204 may include components 202A-E that may be files, libraries, executable files, etc., that are used by or are part of operating system 112. In some embodiments, container 204 may be a QCOW or a QCOW2 container that may include disk image files that are components 202 A-E.
[00051] At operation 306, an uninstalled state is assigned to components. For example, operating system 208 may assign an uninstalled state to each component in components 202 A-E. The uninstalled state may be in a binary form or another form. Further operation 306 may be included in operation 304.
[00052] At operation 308, a global uninstalled state is assigned. For example, operating system 208 may assign a global uninstalled state to operating system 112. The global state may be in a binary or another form. Notably operation 308 may be included in one of operations 302-306.
[00053] At operation 310, components are installed. For example, operating system 208 may copy components 202A-E from container 204 to a memory of computing device 104 or server 106. As discussed above, some or all components 202A-E may be copied in parallel and without dependencies on each other. As each component in components 202A-E is copied, operating system 208 may switch the state of the copied component
from an uninstalled state to an installed state. The switch may occur when the component is copied and irrespective of whether other components have been copied or are still being copied. For example, if components 202A and 202B are copied in parallel, and the copying of component 202B completes before component 202A, then the uninstalled state of component 202B is switched to the installed state irrespective of the state of component 202A. Once the copying of component 202A completes, the uninstalled state of component 202A is switched to the installed state. Further if one of components 202A- E, e.g. component 202B, fails to install, operating system 208 may receive a new location or other instructions that may rectify the failure, and reinstall the failed component 202B without affecting the installation of components 202A and 202C-E.
[00054] At operation 312, a global state is transitioned to an installed state. For example, after all components 202A-E are transitioned to the installed state, operating system 208 transitions the global state of operating system 112 to an installed state. [00055] At operation 314, the operating system is initiated. For example, the operating system 112 installed in operation 306 executes on computing device 104 or server 106. [00056] The installation technique discussed in FIGs. 2 and 3 is a significant improvement over conventional operating system installation techniques. As discussed above, conventional operating system installation techniques install components sequentially and the subsequent components do not transition to an installed state until previous components have been installed and transitioned from uninstalled to installed states. For example, suppose operating system 112 is an “Ubuntu 16.04.3” operating system, which is known in the art. When installed in a conventional manner, the installation process of the Ubuntu 16.04.3 can take approximately 25 minutes on server 106. On the other hand, when components of the Ubuntu 16.04.3 are included in container 204 and definition 206 includes names and locations of the components in memory of server 106, the Ubuntu 16.04.3 may be installed in about 15 seconds on average on the same or similar server 106, which is almost a 1000% improvement over conventional installation techniques.
[00057] Going back to FIG. 1, in some embodiments, as operating system 112 executes on server 106 or computing device 104, a subset of components, such as files or libraries may be updated. In conventional updates, operating system 112 is terminated,
the subset of components is updated, and then the operating system 112 is rebooted. However, when operating system 112 is terminated, applications 108, 110 cannot execute on computing device 104 or server 106 because applications 108, 110 do not have access to the hardware resources of computing device 104 or server 106. This means that application 108 or 110 may not provide application services to users or other applications. To minimize or eliminate the downtime on computing device 104 or server 106, the embodiments disclose a technique for updating components of operating system 112 without terminating operating system 112. In other words, components of operating system 112 may be updated while operating system 112 continues to execute on computing device 104 or server 106 and without rebooting operating system 112.
[00058] Downtime of computer servers during a software and/or hardware update is particularly relevant when those servers are running enterprise software at scale to support a business — e.g. to facilitate electronic payment transactions, or another service. If a set of 5,000 servers are being used for an enterprise, and a critical update patch becomes necessary to install on all those servers, and the update takes 10 minutes to patch, then that is 50,000 machine-minutes of unplanned downtime that will be required. In the case of enterprise system, this downtime may mean that additional temporary capacity has to be installed or acquired, users may have longer wait times, certain operations or transactions might fail during the downtime, etc. Such downtime is also consequential for new operating system installs as well (e.g. putting new or reformatted machines into service). Thus, reducing this downtime results in a higher system capacity to execute operations for one more services.
[00059] FIGs. 4 and 5 are block diagrams 400 and 500 for upgrading components of an operating system, according to some embodiments. FIG. 4 illustrates upgrading components of operating system 112 that executes on server 106 without rebooting operating system 112. Further, although embodiments are discussed with respect to server 106, the embodiments may also apply to computing device 104.
[00060] In FIG. 4, operating system 112 has previously been installed on server 106 and includes components 202 A-E. In some embodiments, components 202 A and 202B may be upgraded with components 202A_NEW and 202B_NEW. In this case, container 204 may be generated to include components 202A_NEW and 202B_NEW. Container
204 may be generated using server 106 or generated on another computing device and transmitted to server 106 over network 102 or a portable memory device. Additionally, definition 206 may define the names and locations of components 202A_NEW and 202B_NEW. As discussed above, definition 206 may include the names and locations of components 202A_NEW and 202B_NEW using key-value pairs.
[00061] In this example, operating system 112 receives container 204 and definition 206. Notably, operating system 112 is the operating system that executes on server 106 and supports application 110. Operating system 112 accesses components 202A_NEW and 202B_NEW in container 204 and copies components 202A_NEW and 202B_NEW to the respective locations indicated in definition 206 using the methodology discussed in FIG. 2.
[00062] Operating system 112 may include a component that is a kernel 210. Kernel 210 is a computer program that controls other components in operating system 112 and is stored in memory protected from other applications. Kernel 210 may handle input/output requests from applications 110, may translate these requests into processing instructions for a processor, and may handle memory and peripheral components, such as a keyboard, mouse, speakers, printers, monitors, etc. In some embodiments, kernel 210 may invoke a kernel execution function 212. Kernel execution function 212 may invoke a boot of a new kernel 210A (shown in FIG. 5 after loading to operating system 112) from the currently executing kernel 210. Kernel 210 may invoke the kernel execution function 212 using a kernel API. When kernel 210 invokes kernel execution function 212, kernel execution function 212 loads kernel 210A into memory of server 106, along with the components of operating system 112, such as new components 202A_NEW and 202B_NEW and existing components 202C-E. Once kernel 210A is booted and begins to execute within the operating system 112, kernel 210 may be terminated (e.g. no longer executing in memory). FIG. 5 illustrates new kernel 210A that executes within operating system 112 and uses new components 202A_NEW and 202B_NEW and existing components 202C-E. In this way, the component such as components 202A and 202B of the operating system 112 may be upgraded without first terminating operating system 112 and causing application 110 downtime.
[00063] FIG. 6 is a flowchart of a method 600 for upgrading an operating system, according to an embodiment. Method 600 may be performed using hardware and/or software components described in FIGs. 1-2 and 4-5. Note that one or more of the operations may be deleted, combined, or performed in a different order as appropriate. [00064] At operation 602, a definition is received. As discussed above, operating system 112 that executes on server 106 receives definition 206 that includes the names of components 202A_NEW and 202B_NEW and the corresponding locations of components 202A_NEW and 202B_NEW.
[00065] At operation 604, a container is accessed. Container 204 may include components 202A_NEW and 202B_NEW that may be upgraded in operating system 112. As discussed above, components 202A_NEW and 202B_NEW may be files, libraries, executable files, etc., that are used by operating system 112. As also discussed above, the container may be a QCOW or a QCOW2 container.
[00066] At operation 606, components are upgraded. For example, operating system 112 may copy components 202A_NEW and 202B_NEW from container 204 to a memory. As discussed above, components 202A_NEW and 202B_NEW replace components 202A and 202B. As each components 202A and 202B is copied, operating system 208 may switch the copied component state from an uninstalled state to an installed state.
[00067] At operation 608, a new kernel is booted from an existing kernel. For example, while operating system 112 continues to execute, kernel 210 that is executing within operating system 112 boots new kernel 210A using kernel execution function 212. As new kernel 210A boots, new kernel 210A loads the new components 202A_NEW and 202B_NEW and existing components 202C-E into the kernel memory. In this way, components 202 A-B may be upgraded in operating system 112 without shutting down operating system 112 which reduces application 110 downtime.
[00068] Going back to FIG. 1, as discussed above, computing device 104 or server 106 also includes compiler 114. Compiler 114 may receive source code as input and generate an executable that may execute on computing device 104 or server 106.
[00069] FIG. 7 is a block diagram 700 of a compiler, according to an embodiment. As illustrated in FIG. 7, compiler 114 may receive source code 702, e.g. source code for
application 108 or 110, and generate a binary executable (or simply executable) 704 that may execute as application 108 or application 110. Typically, compiler 114 may compile source code 702 written in a particular programming language into executable 704. [00070] In some embodiments, the source code 702 may include a function. Compiler 114 may compile the function as discussed with reference to FIGs. 8-12 below. For simplicity, the embodiments below are discussed with respect to a function, but the embodiments may be applicable to multiple functions, classes, etc., that may be included in source code 702. FIG. 8 is a diagram 800 of an example source code according to an embodiment. For illustration purposes, FIG. 8 shows a function 802 written in the source code in the C# programming language.
[00071] In some embodiments, once compiler 114 receives a source code that includes function 802, compiler 114 may split function 802 into one or more code sections, such as code sections 804 A-D. An example code section may include a name of the function (code section 804 A), a definition of a variable and/or initialization of the variable (code section 804B), an operation that is performed on a variable (code section 804C) and a variable that may be returned by the function (code section 804D). Compiler 114 may also divide the source code into other sections not shown in FIG. 8, such as code sections that include a control flow statements, decision statements, definitions of other functions, etc.
[00072] In some embodiments, compiler 114 may generate an ordered map. The ordered map represents an execution order of operations in function 802. To generate an ordered map, compiler 114 may initially generate nodes that include code sections 804A- D. In some embodiments, there may be one code section in code sections 804A-D per node. The nodes in the ordered map may be arranged such that the execution order of code sections 804A-D and operations within code sections 804A-D are preserved. In some embodiments, one or more edges may indicate an order in which the nodes are arranged in the ordered map such that the execution order of code snippets 804A-D is preserved.
[00073] FIG. 9 is a diagram 900 of an ordered map that includes nodes with code sections, according to an embodiment. FIG. 9 illustrates nodes 902A-D that include code sections 804 A-D. In some embodiments there may be one node per code snippet, such
that node 902 A includes code section 804 A, node 902B includes code section 804B, node 902C includes code section 804C, and node 902D includes code section 804D. Notably, code sections 804A-D in nodes 902A-D may be combined in parallel and independently of each other. In other words, each node in nodes 902A-D may transition from an uncompiled state to a compiled state independently of other nodes in nodes 902 A-D. [00074] In some embodiments, each node 902A-D may be in a key-value format, a key includes a node name and an order of the node in the map. The value may include a corresponding code section in code sections 804 A-D.
[00075] In some embodiments, nodes 902A-D may be ordered or organized into an ordered map 904. The order of nodes 902 A-D in map 904 may preserve the execution order of the code sections 804A-D in function 802. To preserve execution order, nodes 902A-D may include edges, such as edges 906 A-B. Edges may preserve the order of nodes 902A-D by indicating how nodes 902A-D may be appended to each other. In other words, an edge can be a data structure that indicates the dependency between nodes in nodes 902A-D such that the order of operations among the nodes is preserved. As illustrated in FIG. 9, edges 906A-B may be included or appended to one or more nodes 902 A-D or values in the key- value pair in nodes 902 A-D. Edges 906 A-B may further indicate the relationship among nodes 902A-D in map 904 and the order of nodes 902A- D. For example, edge 906 indicates that node 902B may be appended to node 902 A, node 902C may be appended to node 902B, and node 902D may be appended to node 902C. In another example, edge 906A may indicate that code snippet 802A may be appended to another code snippet (not shown).
[00076] In some embodiments, compiler 114 may perform a lexical analysis on the code sections 804 A-D in each node in nodes 902 A-D. The lexical analysis on the code sections from each node, may be performed in parallel with other nodes 902 A-D. In the lexical analysis, compiler 114 may divide words in a code section and assign tokens to a particular type to the word. With reference to the code section 804A “int f () { }” in node 902A, lexical analysis may identify tokens that are “int”, “f”, “(“, “)”, “{“ and “}” and assign respective types to the tokens that are “keyword”, “identifier”, “operator”, “operator”, “operator”, and “operator.” Compiler 114 may perform a similar lexical
analysis on code sections 804B-D in nodes 902B-D in parallel with the analysis in node 902A.
[00077] After performing a lexical analysis on nodes 902A-D, compiler 114 may generate an abstract syntax tree (AST) that includes the identified tokens. The AST may describe the structure of the code snippet, including the order that the tokens may be combined in to perform the operations described in the code snippet. As with the lexical analysis, compiler 114 may generate an AST for each node in nodes 902A-D in parallel with other nodes in nodes 902A-D. For example, compiler 114 may generate an AST for node 902A in parallel with compiler 114 generating ASTs for nodes 902B-D.
[00078] In some embodiments, compiler 114 may generate a low-level code, such as assembly code (ASM), from the AST. To generate the low-level code, compiler 114 may walk through the branches of the AST tree and translate the tokens in the AST tree into the low-level code. Compiler 114 may generate the low-level code for each node in nodes 902 A-D in parallel with other nodes in nodes 902 A-D. For example, compiler 114 may generate the low-level code for the AST associated with node 902A in parallel with compiler 114 generating the low-level code for ASTs associated with nodes 902B-D.
FIG. 10 is a diagram 1000 illustrating assembly code, according to an embodiment. As illustrated in FIG. 10, assembly code 1002A-1002D may be generated from ASTs associated with nodes 902A-D, such that the AST associated with node 902A generates assembly code 1002A, the AST associated with node 902B generates assembly code 1002B, the AST associated with node 902C generates assembly code 1002C, and the AST associated with node 902D generates assembly code 1002D.
[00079] In some embodiments, compiler 114 may determine that low-level code, such as assembly code 1002A and assembly code 1002D generated from ASTs associated with nodes 902A and 902D respectively, may overlap. When the code overlaps, compiler 114 may discard the assembly code from one of the nodes. As illustrated in FIG. 10, compiler 114 may discard assembly code 1002D.
[00080] From the non-overlapping assembly code, such as assembly codes 1002A- 1002C, compiler 114 may generate one or more executable objects. Executable objects may be portions of a program or software that may be executed as executable 704 and are in a binary format. In some embodiments, compiler 114 may generate an executable
object from each assembly codes 1002A-C in parallel with generating executable objects with other assembly codes in assembly codes 1002A-C. FIG. 11 is a diagram 1100 illustrating executable objects, according an embodiment. FIG. 11 illustrates executable objects 1102A-C, such that executable object 1102A is generated from assembly code 1002A associated with node 902A; executable object 1102B is generated from assembly code 1002B associated with node 902B; and executable object 1102C is generated from assembly code 1002C associated with node 902C. Notably, because compiler 114 identified the assembly code 1002D in FIG. 10 as overlapping with assembly code 1002D, compiler 114 does not generate an executable object from assembly code 1002D [00081] Notably, unlike conventional compilers, compiler 114 generates executable objects 1102A-C from the respective code sections 804A-D discussed in FIG. 8 in parallel with each other.
[00082] Once compiler 114 generates executable objects 1102A-C, compiler 114 may link the executable objects 1102A-C into executable 704. Executable 704 may be compiled code that may execute on computing device 104 as application 108 or server 106 as application 110. In some embodiments, executable objects 1102A-C may be linked according to the order identified in map 904. FIG. 12 is a diagram 1200 illustrating executable objects that are linked into an executable, according to an embodiment. As illustrated in FIG. 12, executable objects 1102A-C are linked into executable 704. Compiler 114 may link executable objects 1102A-C by mapping executable objects 1102A-C into a memory stack according to the order indicated in map 904. In addition to the executable objects 1102A-C, compiler 114 may also add one or more libraries 1204 to executable 704. Libraries 1204 may be libraries included or referenced by function 802. In addition, compiler 114 may include objects 1206 in executable 704. These objects may be referenced by the libraries 1204 or function 802. Once compiler 114 generates executable 704, executable 704 may execute on computing device 104 or server 106. [00083] Compiler 114 is an improvement over conventional compilers because compiler 114 may divide source code, e.g. function 802, into multiple code sections 804A-D and compile code sections 804A-D into executable objects, e.g. executable objects 1102A-1102C, in parallel and then link executable objects 1102A-C together into executable 704, thus improving compilation time of source code 702. In some
embodiments, compiler 114 may designate each code section in code sections 804A-D as having an uncompiled state, and the entire source code 702 as having a global uncompiled state. As compiler 114 compiles each code section in code sections 804A-D in one of executable objects 1102A-C, compiler 114 may switch the uncompiled state for the code section in code sections 804A-D from an uncompiled state to a compiled state. Once compiler 114 switches all code sections 804A-D into a compiled state, compiler 114 may link executable objects 1102A-C into executable 704 and switch the global uncompiled state to the global compiled state. Once compiler 114 switches the source code 702 to the global compiled state, executable 704 may execute on computing device 104 or server 106.
[00084] FIG. 13 is a flowchart of a method 1300 for compiling source code, according to an embodiment. Method 1300 may be performed using hardware and/or software components described in FIGs. 1 and 8-12. Note that one or more of the operations may be deleted, combined, or performed in a different order as appropriate.
[00085] At operation 1302, source code is received. For example, compiler 114 may receive source code 702 written in one of known software languages. An example of source code 702 may be function 802. Compiler 114 may also assign an uncompiled global state to the source code 702.
[00086] At operation 1304, source code is divided into code sections. For example, compiler 114 may divide source code 702, e.g. function 802, into multiple code sections 804A-D. As discussed above, example code sections 804A-D may be a function definition, a return statement, a variable definition, a variable initialization, an arithmetic function or a decision statement. Compiler 114 may also assign an uncompiled state to each code section 804 A-D.
[00087] At operation 1306, an ordered map is generated. For example, compiler 114 may generate map 904 that includes nodes 902A-D, where each node in nodes 902A-D includes one of sections 802-D identified in operation 1304. Further, the nodes in map 904 are ordered according to the order of operations in the source code received in operation 1302. Nodes 902A-D may be ordered using one or more edges that are appended to nodes 902 A-D.
[00088] Notably, operations 1308-1314 may be performed for each node 902A-D in parallel with other nodes in nodes 902 A-D.
[00089] At operation 1308, a lexical analysis is performed. For example, compiler 114 may perform a lexical analysis on code sections 804A-D in nodes 902A-D. As discussed above, lexical analysis generates tokens from different words or symbols in code sections 804A-D, and assigns a type to the token which identifies whether the word or symbol is a keyword, operator, identifier, etc.
[00090] At operation 1310, ASTs are generated. For example, compiler 114 generates an AST from the tokens associated with each code section in code sections 804A-D. Typically, compiler 114 generates one AST for each code snippet.
[00091] At operation 1312, a low-level code is generated. For example, compiler 114 may generate assembly code or other low-level code from each AST. In some embodiments, compiler 114 may generate assembly code 1002A-D for code sections 804A-D by traversing the AST associated with each code section 804A-D. Further, as discussed above, compiler 114 may identify overlapping instructions in assembly code 1002A-D and remove the assembly code, such as assembly code 1002D that includes overlapping code with assembly code 1002A.
[00092] At operation 1314, executable objects are generated. For example, compiler 114 may generate executable objects 1102A-C from the respective assembly codes 1002A-C. Further, once compiler 114 generates one of executable objects 1102A-C, compiler 114 may switch the uncompiled state to a compiled state for the corresponding code section in code sections 804 A-D. After compiler 114 generates all executable objects 1102A-C from assembly code 1002A-C, and switches all uncompiled states to compiled states, compiler 114 proceeds to operation 1316.
[00093] At operation 1316, an executable is generated. For example, compiler 114 generates executable 704. As discussed above, compiler 114 may generate executable 704 by linking executable objects 1102A-C in the order identified in ordered map 902. Compiler 114 may also include libraries identified in executable objects 1102A-C or other objects identified in executable objects 1102A-C into executable 704. After compiler 114 generates executable 704, compiler 114 may switch the global state to a
compiled global state. As discussed above, executable 704 may be executed using computing device 104 or server 106.
[00094] The improvements over a conventional compiler may further be illustrated with reference to FIG. 8-12. Suppose, a conventional compiler receives a function 802 discussed in FIG. 8. The conventional compiler may initially perform a lexical analysis on the entire function 802. Notably, this is different from compiler 114 that initially divides function 802 into code sections 804A-D and generates an ordered map 904 that includes nodes 902A-D with code sections 804A-D (discussed in FIG. 9) and then performs the lexical analysis on each code section in code sections 804A-D in nodes 902 A-D in parallel with other code sections in code sections 804 A-D.
[00095] After the conventional compiler performs a lexical analysis on function 802, the conventional compiler may generate an abstract syntax tree (AST) for the code in function 802. Unlike compiler 114 that may generate an AST for each code section 804A-D in nodes 902A-D, the conventional compiler generates a single AST for the entire source code in function 802.
[00096] Using the AST, the conventional compiler may then generate low-level code, such as an assembly code. To generate the assembly code, the conventional compiler may traverse the branches of the AST and generate the assembly code based on the data or instructions that are stored in the nodes of the AST. Unlike compiler 114 that traverses multiple ASTs, such as ASTs associated with nodes 902A-D, and then traverses the multiple ASTs in parallel with each other, the conventional compiler traverses a single AST generated from the entire source code in function 802. Further, unlike the conventional compiler, compiler 114 may generate, as discussed in FIG. 10, separate assembly code 1002A-D for each one of nodes 902A-D, such that assembly code 1002A is generated for node 902A, assembly code 1002B for node 902B, etc.
[00097] Once the conventional compiler generates the low-level code for function 802, the conventional compiler may generate a single executable object from the assembly code. This is different from compiler 114 that generates, as discussed in FIG. 11, multiple executable objects 1102A-1102C from the assembly code 1002A-D that is associated with nodes 902A-C, such that object 1102A is generated from assembly code 1002A that is associated with node 902A, object 1102B is generated from assembly code 1002B that
is associated with node 902B, etc. As discussed above, compiler 114 may generate objects 1102A-1102C in parallel with each other. Further, unlike the conventional compiler, compiler 114 may remove an overlapping assembly code, such as assembly code 1002A and 1002D and compile object 1102A from one of the overlapping nodes. Finally, unlike the conventional compiler, compiler 114 may switch the state of each object 1102A-C from an uncompiled state to a compiled state when compiler 114 generates each of objects 1102A-C irrespective of whether compiler 114 has completed compiling other objects in objects 1102A-C.
[00098] The conventional compiler may generate a binary executable from a single executable object, one or more libraries and objects that are not part of the source code but are referenced by the one or more libraries. Unlike the conventional compiler, compiler 114 may generate, as discussed in FIG. 12, binary executable 704 by combining multiple executable objects 1102A-C in an order identified by nodes 902A-D, one or more libraries 1204 and objects 1206 that may be referenced by libraries 1204. Also, unlike the conventional compiler, compiler 114 may transition the global uncompiled state for function 802 to a global compiled state when compiler 114 generates executable 704.
[00099] In one embodiment, a method for installing a new operating system comprises receiving, at an operating system executing on a computing device, a definition that includes a list of a plurality of files associated with the new operating system and locations for the plurality of files in at least one memory storage; accessing, using the operating system, a container that includes the plurality of files; moving each file in the plurality of files from the container to the locations in the at least one memory storage specified in the definition independently of other files in the plurality of files; after the each file is moved, transitioning the each file from a file uninstalled state to a file installed state; transitioning the new operating system from an uninstalled state to an installed state once the plurality of files transitioned to file installed states; and initiating the new operating system using the plurality of files once the new operating system transitioned to the installed state.
[000100] In various embodiments of the method above, the transitioning of the each file from the file uninstalled state to the file installed state further comprises transitioning the
each file from the file uninstalled state to the file installed state independently from when the other files in the plurality of files have completed the moving; the moving further comprises moving a file in the plurality of files in parallel with the other files in the plurality of files; and/or the method further comprises assigning a first uninstalled state to a first file in the plurality of files and a second uninstalled state to a second file in the plurality of files, wherein the moving further comprises moving the first file in parallel and independently from the second file, completing the moving of the first file prior to completing the moving of the second file, transitioning the first uninstalled state to a first installed state upon completion of the move of the first file; and transitioning the second uninstalled state to a second installed state upon completion of the move of the second file.
[000101] In further embodiments of the method above, the container is a quick emulator copy on write (QCOW) container; the definition includes a plurality of key-value pairs, wherein a key in a key-value pair from the plurality of key-value pairs identifies the file in the plurality of files and a value in the key-value pair identifies a location of the file in the at least one memory; the definition is in a JavaScript Object Notation (JSON) format; the definition indicates the installed state of the new operating system; and/or the method further comprises identifying an error in moving a file from the plurality of files to a location in the locations defined in the definition, displaying the error, and wherein the moving further comprises continuing to move the other files in the plurality of files after the error is identified.
[000102] In another embodiment, a system for installing a new operating system comprises a non-transitory memory storing instructions; and one or more hardware processors coupled to the non-transitory memory and configured to read the instructions from the non-transitory memory to cause the system to perform operations comprising receiving, at an operating system executing in the system, a definition that includes a list of a plurality of files associated with the new operating system and locations for the plurality of files in at least one memory storage; accessing, using the operating system, a container that includes the plurality of files; assigning to each file in the plurality of files a file uninstalled state; moving the each file in the plurality of files from the container to the locations in the at least one memory storage specified in the definition in parallel with
other files in the plurality of files, wherein each file completes the move at time different from the other files; after the each file completes the move, transitioning the each file from the file uninstalled state to a file installed state; transitioning the new operating system from an uninstalled state to an installed state once the plurality of files transitioned to file installed states; and, initiating the new operating system using the plurality of files once the new operating system transitioned to the installed state.
[000103] In various embodiments of the system above, moving each file the operations further comprises moving each file independently from the other files in the container; transitioning the each file the operations further comprises transitioning the each file to the installed file state regardless of whether the other files completed the moving, the container is a quick emulator copy on write (QCOW) container; the definition includes a plurality of key-value pairs, wherein a key in a key- value pair from the plurality of key- value pairs identifies the file in the plurality of files and a value in the key-value pair identifies a location of the file in the at least one memory; and/or the operations further comprise assigning a first uninstalled state to a first file in the plurality of files and a second uninstalled state to a second file in the plurality of files, and wherein the moving further comprises moving the first file in parallel and independently from the second file and wherein the move of the first file completes prior to the move of the second file, transitioning the first uninstalled state to a first installed state upon completion of the move of the first file and transitioning the second uninstalled state to a second installed state upon completion of the move of the second file.
[000104] In a further embodiment, a method for updating an operating system comprises receiving, at the operating system executing on a computing device, a definition that includes a list of a plurality of files for updating the operating system executing on the computing device and locations for the plurality of files in at least one memory storage; accessing, using the operating system, a container that includes the plurality of files; moving each file in the plurality of files from the container to the locations in the at least one memory storage specified in the definition independently of other files in the plurality of files; after the each file is moved, transitioning the each file from a file uninstalled state to a file installed state; and after the plurality of files transition to file installed states, executing a new kernel in the operating system from an
old kernel while the operating system is executing, wherein the new kernel loads the plurality of files from the at least one memory storage into the operating system.
[000105] Various embodiments of the method above include: the definition includes a plurality of key-value pairs, wherein a key in a key-value pair from the plurality of key- value pairs identifies a file in the plurality of files and a value in the key-value pair identifies a location of the file in the at least one memory storage; wherein at least one file in the plurality of files is a new version of an existing file that has previously been loaded into the operating system; wherein the plurality of files update a portion of the files of the operating system; and/or the method further comprising continuously executing an application associated with the operating system before and after updating the operating system.
[000106] Referring now to FIG. 14 an embodiment of a computer system 1400 suitable for implementing, the systems and methods described in FIGs. 1-13 is illustrated. [000107] In accordance with various embodiments of the disclosure, computer system 1400, such as a computer and/or a server, includes a bus 1402 or other communication mechanism for communicating information, which interconnects subsystems and components, such as a processing component 1404 (e.g., processor, micro-controller, digital signal processor (DSP), graphics processing unit (GPU), etc.), a system memory component 1406 (e.g., RAM), a static storage component 1408 (e.g., ROM), a disk drive component 1410 (e.g., magnetic or optical), a network interface component 1412 (e.g., modem or Ethernet card), a display component 1414 (e.g., CRT or LCD), an input component 1418 (e.g., keyboard, keypad, or virtual keyboard), a cursor control component 1420 (e.g., mouse, pointer, or trackball), a location determination component 1422 (e.g., a Global Positioning System (GPS) device as illustrated, a cell tower triangulation device, and/or a variety of other location determination devices known in the art), and/or a camera component 1423. In one implementation, the disk drive component 1410 may comprise a database having one or more disk drive components. [000108] In accordance with embodiments of the disclosure, the computer system 1400 performs specific operations by the processor 1404 executing one or more sequences of instructions contained in the memory component 1406, such as described herein with respect to the mobile communications devices, mobile devices, and/or servers. Such
instructions may be read into the system memory component 1406 from another computer readable medium, such as the static storage component 1408 or the disk drive component 1410. In other embodiments, hard- wired circuitry may be used in place of or in combination with software instructions to implement the disclosure.
[000109] Logic may be encoded in a computer readable medium, which may refer to any medium that participates in providing instructions to the processor 1404 for execution. Such a medium may take many forms, including but not limited to, non volatile media, volatile media, and transmission media. In one embodiment, the computer readable medium is non-transitory. In various implementations, non-volatile media includes optical or magnetic disks, such as the disk drive component 1410, volatile media includes dynamic memory, such as the system memory component 1406, and transmission media includes coaxial cables, copper wire, and fiber optics, including wires that comprise the bus 1402. In one example, transmission media may take the form of acoustic or light waves, such as those generated during radio wave and infrared data communications.
[000110] Some common forms of computer readable media includes, for example, floppy disk, flexible disk, hard disk, magnetic tape, any other magnetic medium, CD- ROM, any other optical medium, punch cards, paper tape, any other physical medium with patterns of holes, RAM, PROM, EPROM, FLASH-EPROM, any other memory chip or cartridge, carrier wave, or any other medium from which a computer is adapted to read. In one embodiment, the computer readable media is non-transitory.
[000111] In various embodiments of the disclosure, execution of instruction sequences to practice the disclosure may be performed by the computer system 1400. In various other embodiments of the disclosure, a plurality of the computer systems 1400 coupled by a communication link 1424 to the network 102 (e.g., such as a LAN, WLAN, PTSN, and/or various other wired or wireless networks, including telecommunications, mobile, and cellular phone networks) may perform instruction sequences to practice the disclosure in coordination with one another.
[000112] The computer system 1400 may transmit and receive messages, data, information and instructions, including one or more programs (i.e., application code) through the communication link 1424 and the network interface component 1412. The
network interface component 412 may include an antenna, either separate or integrated, to enable transmission and reception via the communication link 1424. Received program code may be executed by processor 1404 as received and/or stored in disk drive component 1410 or some other non-volatile storage component for execution.
[000113] Where applicable, various embodiments provided by the disclosure may be implemented using hardware, software, or combinations of hardware and software. Also, where applicable, the various hardware components and/or software components set forth herein may be combined into composite components comprising software, hardware, and/or both without departing from the scope of the disclosure. Where applicable, the various hardware components and/or software components set forth herein may be separated into sub-components comprising software, hardware, or both without departing from the scope of the disclosure. In addition, where applicable, it is contemplated that software components may be implemented as hardware components and vice-versa. [000114] Software, in accordance with the disclosure, such as program code and/or data, may be stored on one or more computer readable mediums. It is also contemplated that software identified herein may be implemented using one or more general purpose or specific purpose computers and/or computer systems, networked and/or otherwise.
Where applicable, the ordering of various steps described herein may be changed, combined into composite steps, and/or separated into sub-steps to provide features described herein.
[000115] The foregoing disclosure is not intended to limit the disclosure to the precise forms or particular fields of use disclosed. As such, it is contemplated that various alternate embodiments and/or modifications to the disclosure, whether explicitly described or implied herein, are possible in light of the disclosure. Having thus described embodiments of the disclosure, persons of ordinary skill in the art will recognize that changes may be made in form and detail without departing from the scope of the disclosure. Thus, the disclosure is limited only by the claims.
Claims (20)
1. A method for compiling a program, the method comprising: receiving the program in a software code; splitting the software code into code sections; generating a map of ordered nodes linked by at least one edge, wherein a node includes a code section in the code sections and other nodes include other code sections in the code sections; compiling the code section in the node into an executable object in a plurality of executable objects in parallel and independently from compiling the other code sections in the other nodes into other executable objects in the executable objects; and generating an executable from the executable objects, wherein an order of the executable objects in the executable corresponds to an order of the nodes in the map.
2. The method of claim 1, wherein the map includes key-value pairs, wherein a key in the key-value pair is the node and include an order of the node in the map, and a value in the key-value pair is the code section from the software code.
3. The method of claim 2, wherein the value is appended with an edge in at least one edge and an order of the edge in the map.
4. The method of claim 1, further comprising: assigning uncompiled states to the nodes; and switching the node to a compiled state when the code section is compiled into the executable objects.
5. The method of claim 1, wherein the compiling further comprises: performing a lexical analysis of the code section in the node in parallel with the lexical analysis of the other code sections in the other nodes;
generating an abstract syntax tree for the code section based on the lexical analysis in parallel with generating abstract syntax trees for the other code sections; generating an assembly code for the code section from the abstract syntax tree in parallel with generating other assembly code for the other code sections from the abstract syntax trees; and generating the executable object for the code section from the assembly code in parallel with generating the other executable objects for the other code sections from the other assembly code.
6. The method of claim 5, wherein the compiling further comprises: identifying a second assembly code from the other assembly code that overlaps with the assembly code; and removing a second node that corresponds to the second assembly code from the map of ordered nodes.
7. The method of claim 1, wherein the code section includes at least one of a function in the software code, a variable returned from the function in the software code, an operation on the variable in the software code, a loop in the software code, or a decision statement in the software code.
8. A system for compiling a program, the system comprising: a non-transitory memory storing instructions; and one or more hardware processors coupled to the non-transitory memory and configured to read the instructions from the non-transitory memory to cause the system to perform operations comprising: receiving the program in a software code; splitting the software code into code sections; generating a map of ordered nodes linked by at least one edge, wherein a node includes a code section in the code sections and other nodes include other code sections in the code sections;
compiling the code section in the node into an executable object in a plurality of executable objects in parallel from compiling the other code sections in the other nodes into other executable objects in the executable objects; and linking the executable objects into an executable, wherein an order of the executable objects in the executable corresponds to an order of the nodes in the map.
9. The system of claim 8, wherein the map includes key-value pairs, wherein a key in the key-value pair is the node and an order of the node in the map and a value in the key-value pair is the code section from the software code.
10. The system of claim 8, wherein the operations further comprise: assigning uncompiled states to the nodes; and switching the node to a compiled state when the code section is compiled into the executable objects.
11. The system of claim 10, wherein the operations further comprise: assigning a global uncompiled states to the software code; and switching the global uncompiled state to a global compiled state after all nodes in the nodes switched to compiled states.
12. The system of claim 8, wherein the operations further comprise: performing a lexical analysis of the code section in the node in parallel with the lexical analysis of the other code sections in the other nodes; generating an abstract syntax tree for the code section based on the lexical analysis in parallel with generating abstract syntax trees for the other code sections; generating an assembly code for the code section from the abstract syntax tree in parallel with generating other assembly code for the other code sections from the abstract syntax trees; and generating the executable object for the code section from the assembly code in parallel with generating the other executable objects for the other code sections from the other assembly code.
13. The system of claim 12, wherein the operations further comprise: identifying a second assembly code from the other assembly code that overlaps with the assembly code; and removing a second node that corresponds to the second assembly code from the map of ordered nodes.
14. The system of claim 8, wherein the code section includes at least one of a data type in the software code, a function in the software code, a variable returned from the function in the software code, an operation on the variable in the software code, a loop in the software code, or a decision statement in the software code.
15. A non-transitory machine-readable medium having stored thereon machine- readable instructions executable to cause a machine to perform operations, the operations comprising: receiving a program in a software code; splitting the software code into code sections; generating a map of ordered nodes linked by at least one edge, wherein a node includes a code section in the code sections and other nodes include other code sections in the code sections and an order indicates an execution order of the code sections; compiling the code section in the node into an executable object in a plurality of object files in parallel from compiling the other code sections in the other nodes into other executable objects in the executable objects; and linking the executable objects into an executable, wherein an order of the object files in the executable corresponds to an order of the nodes in the map.
16. The non-transitory machine-readable medium of claim 15, wherein the map includes key-value pairs, wherein a key in the key-value pair is the node and an order of the node in the map and a value in the key-value pair is the code section from the software code.
17. The non-transitory machine-readable medium of claim 15, wherein the operations further comprise: assigning uncompiled states to the nodes; and switching the node to a compiled state when the code section is compiled into the executable objects.
18. The non-transitory machine-readable medium of claim 17, wherein the operations further comprise: assigning a global uncompiled states to the software code; and switching the global uncompiled state to a global compiled state after all nodes in the nodes switched to compiled states.
19. The non-transitory machine-readable medium of claim 15, wherein operations that compile further comprise: performing a lexical analysis of the code section in the node in parallel with the lexical analysis of the other code sections in the other nodes; generating an abstract syntax tree for the code section based on the lexical analysis in parallel with generating abstract syntax trees for the other code sections; generating an assembly code for the code section from the abstract syntax tree in parallel with generating other assembly code for the other code sections from the abstract syntax trees; and generating the executable object for the code section from the assembly code in parallel with generating the other executable objects for the other code sections from the other assembly code.
20. The non-transitory machine-readable medium of claim 19, wherein operations that compile further comprise: identifying a second assembly code from the other assembly code that overlaps with the assembly code; and removing a second node that corresponds to the second assembly code from the map of ordered nodes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
AU2024202696A AU2024202696A1 (en) | 2020-06-25 | 2024-04-24 | Fast compiling source code without dependencies |
Applications Claiming Priority (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/912,507 US11314496B2 (en) | 2020-06-25 | 2020-06-25 | Ultra-fast install and update of an operating system |
US16/912,507 | 2020-06-25 | ||
US16/912,517 | 2020-06-25 | ||
US16/912,517 US11200038B1 (en) | 2020-06-25 | 2020-06-25 | Fast compiling source code without dependencies |
PCT/US2021/038207 WO2021262582A1 (en) | 2020-06-25 | 2021-06-21 | Fast compiling source code without dependencies |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
AU2024202696A Division AU2024202696A1 (en) | 2020-06-25 | 2024-04-24 | Fast compiling source code without dependencies |
Publications (2)
Publication Number | Publication Date |
---|---|
AU2021297161A1 AU2021297161A1 (en) | 2023-02-02 |
AU2021297161B2 true AU2021297161B2 (en) | 2024-01-25 |
Family
ID=79281729
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
AU2021297161A Active AU2021297161B2 (en) | 2020-06-25 | 2021-06-21 | Fast compiling source code without dependencies |
AU2024202696A Pending AU2024202696A1 (en) | 2020-06-25 | 2024-04-24 | Fast compiling source code without dependencies |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
AU2024202696A Pending AU2024202696A1 (en) | 2020-06-25 | 2024-04-24 | Fast compiling source code without dependencies |
Country Status (4)
Country | Link |
---|---|
EP (1) | EP4172754A4 (en) |
CN (1) | CN115735192A (en) |
AU (2) | AU2021297161B2 (en) |
WO (1) | WO2021262582A1 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9864590B2 (en) * | 2012-07-10 | 2018-01-09 | Loring G. Craymer, III | Method and system for automated improvement of parallelism in program compilation |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9760346B2 (en) * | 2013-05-31 | 2017-09-12 | Microsoft Technology Licensing, Llc | Deeply parallel source code compilation |
KR20160070965A (en) * | 2014-12-11 | 2016-06-21 | 삼성전자주식회사 | Compiler |
WO2018094087A1 (en) * | 2016-11-17 | 2018-05-24 | The Mathworks, Inc. | Systems and methods for generating code for parallel processing units |
-
2021
- 2021-06-21 WO PCT/US2021/038207 patent/WO2021262582A1/en unknown
- 2021-06-21 EP EP21829300.9A patent/EP4172754A4/en active Pending
- 2021-06-21 AU AU2021297161A patent/AU2021297161B2/en active Active
- 2021-06-21 CN CN202180045257.7A patent/CN115735192A/en active Pending
-
2024
- 2024-04-24 AU AU2024202696A patent/AU2024202696A1/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9864590B2 (en) * | 2012-07-10 | 2018-01-09 | Loring G. Craymer, III | Method and system for automated improvement of parallelism in program compilation |
Also Published As
Publication number | Publication date |
---|---|
EP4172754A4 (en) | 2024-07-10 |
AU2024202696A1 (en) | 2024-05-16 |
AU2021297161A1 (en) | 2023-02-02 |
WO2021262582A1 (en) | 2021-12-30 |
CN115735192A (en) | 2023-03-03 |
EP4172754A1 (en) | 2023-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12106080B2 (en) | Fast compiling source code without dependencies | |
US20150089494A1 (en) | Virtual machine template optimization | |
US20150363195A1 (en) | Software package management | |
WO2017185204A1 (en) | Method and device for creating virtual machine | |
WO2022042334A1 (en) | Compilation strategy for sharable application snapshot | |
US10452428B2 (en) | Application execution with optimized code for use profiles | |
US9904574B2 (en) | Parallel computing without requiring antecedent code deployment | |
US11748084B2 (en) | Ultra-fast install of computer system software | |
CN116685946A (en) | Reloading of updated shared libraries without stopping execution of an application | |
EP3770755A2 (en) | Systems and methods for running applications associated with browser-based user interfaces within multi-developer computing platforms | |
US11301223B2 (en) | Artificial intelligence enabled function logic infusion | |
AU2021297161B2 (en) | Fast compiling source code without dependencies | |
US12008353B2 (en) | Parsing tool for optimizing code for deployment on a serverless platform | |
US10936290B2 (en) | Compile-time folding of assumed constant values | |
US10284648B2 (en) | Application multi-versioning in a traditional language environment | |
US20240152371A1 (en) | Dynamic re-execution of parts of a containerized application pipeline | |
CN114253615B (en) | Method and device for setting bootstrap program, electronic equipment and storage medium | |
US11928460B2 (en) | Dynamic update of a computer program in memory | |
US11150890B2 (en) | File system synchronization-based updating |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FGA | Letters patent sealed or granted (standard patent) |