Method and system for sharing driver pages
First Claim
1. A computer-implemented method for sharing driver pages among Containers, the method comprising:
- on a computer system having a processor, a single operating system (OS) and a first instance of a dedicated system driver installed and performing dedicated system services, instantiating a plurality of Containers that virtualize the OS, wherein code and data of the first instance of the dedicated system driver are loaded from an image into a plurality of pages arranged in a virtual memory, andinstantiating a second instance of the dedicated system driver upon a first request from one of the Containers for dedicated system services by;
(a) loading, from the image, pages of the second instance into a physical memory and allocating virtual memory pages for the second instance;
(b) associating the second instance with the first instance and acquiring virtual addresses of identical pages of the first instance compared to the second instance;
(c) mapping the virtual addresses of the identical pages of the second instance to physical pages to which virtual addresses of the corresponding identical pages of the first instance are mapped, while protecting the physical pages from modification;
(d) wherein virtual addresses of non-identical pages of the second instance remain mapped to the physical pages of the second instance;
(e) releasing the physical memory occupied by the identical physical pages of the second instance; and
(f) starting the second instance for responding to requests for the dedicated system services from the one of the Containers.
3 Assignments
0 Petitions
Accused Products
Abstract
Method for sharing driver pages, including, on a computer system having a first driver and performing system services, instantiating Containers; code and data of the driver are loaded sequentially into pages arranged in a virtual memory, and instantiating a next driver upon a request from one of the Containers for system services by: loading physical pages of the next driver into physical memory and allocated virtual memory pages for the next driver; associating the next driver with the first driver and comparing pages of the next driver and the first driver, generating a set of identical physical pages; mapping virtual pages of the next driver to identical physical pages of the first driver while atomically protecting identical physical pages; non-identical pages of the next driver from physical memory remain mapped to virtual pages of the next driver; releasing physical memory occupied by identical physical pages of the next driver.
-
Citations
33 Claims
-
1. A computer-implemented method for sharing driver pages among Containers, the method comprising:
-
on a computer system having a processor, a single operating system (OS) and a first instance of a dedicated system driver installed and performing dedicated system services, instantiating a plurality of Containers that virtualize the OS, wherein code and data of the first instance of the dedicated system driver are loaded from an image into a plurality of pages arranged in a virtual memory, and instantiating a second instance of the dedicated system driver upon a first request from one of the Containers for dedicated system services by; (a) loading, from the image, pages of the second instance into a physical memory and allocating virtual memory pages for the second instance; (b) associating the second instance with the first instance and acquiring virtual addresses of identical pages of the first instance compared to the second instance; (c) mapping the virtual addresses of the identical pages of the second instance to physical pages to which virtual addresses of the corresponding identical pages of the first instance are mapped, while protecting the physical pages from modification; (d) wherein virtual addresses of non-identical pages of the second instance remain mapped to the physical pages of the second instance; (e) releasing the physical memory occupied by the identical physical pages of the second instance; and (f) starting the second instance for responding to requests for the dedicated system services from the one of the Containers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
-
-
33. A computer-implemented method for sharing driver pages among Containers, the method comprising:
-
(a) tracking loading and unloading of each instance of a driver in the Containers, wherein the Containers run on a host with a single Operating System (OS), and wherein the Containers virtualize the OS; (b) upon a loading of a first instance of the driver, analyzing portions of executable files of the driver to find pages suitable to share (identical), to generate a “
zeroth”
set of pages;(c) upon loading of a second instance of the driver checking that the driver is the same as the first driver; generating a set shared of common pages among the drivers that is the “
zeroth”
set;substituting the common pages for pages of the second instance of the drivers when the pages are identical; making virtual writeable pages copy on write; and returning freed up pages of the drivers back to the system; (d) upon loading of a third and subsequent instances of the driver checking that the drivers are the same as the first driver; substituting the common pages for pages of the drivers when the pages are identical; making virtual writeable pages copy on write; returning freed up pages of the drivers back to the system; (e) during system operation, upon a write attempt to a common page, unmerging that page of the driver from the common page set; (f) upon unloading of one of the instances of the driver, unmerging the pages of the instance of the driver being unloaded; and (g) upon unloading of the last instance of the driver, deleting the “
zeroth”
set of pages.
-
Specification