A computer system manages multiple resources, such as computing power, network access and memory storage. The multiple resources are of course not infinitive. In particular, the memory storage is in many cases a limiting resource in view of the computer systems capacity and/or performance. As an example, program code for handling e.g. user-interface objects, common mathematical functions and search queries is identical for many different applications. Therefore, it has become customary to share memory of the computer system between different applications.
A Personal Computer (PC), as an example of a known computer system with memory sharing, comprises at least one Central Processing Unit (CPU) as computing power. Moreover, the PC comprises memory; primary and secondary memories. Primary memory is normally fast random access memories of different types. Secondary memory, such as a Hard Disc Drive (HDD) or Solid State Disc drive (SSD) is slower than primary memory. A smallest addressable section of the memory is referred to as a page, or memory pages. The PC is installed with Linux as Operating System (OS). Within the Linux operating system a function called Kernel Same-page Merging (KSM) is implemented in order to provide memory sharing. With KSM, the operating system scans the memory to find identical memory pages. When two or more identical memory pages are found, these are marked as sharable. Identification of identical memory pages may be performed in various known manners, such as search based on hash-tables, red-black tree or the like. Upon processing the sharable memory pages, the KSM function replaces the sharable memory pages with one shared memory page that is write-protected. This means that none of the applications that use the shared memory page is allowed, as monitored by the KSM function, to modify the contents of the shared memory page. Should one of the applications need to modify the content of the shared memory page, a copy of the shared memory page will be created and any modifications will be performed on the copy just created. Copying and modifying memories pages in this manner is often referred to as that the shared memory page is protected with copy-on-write.
While the above mentioned KSM function is suitable for traditional hardware architectures, it is sub-optimal for the data center hardware architectures that are arising, e.g. disaggregated hardware type of architectures, such as the Intel Rack Scale architecture, HyperScale Datacenter Systems or the like. By combining the disaggregated hardware architecture with optical interconnect, traditional distance and capacity limitations of electrical connections are alleviated. This enables a more efficient pooling of resources, which is expected to have a positive impact on utilization and energy consumption. A disaggregated hardware system of this kind, thus, typically comprises multiple pools of computing resources, multiple pools of memory resources etc.
The disaggregated hardware system is intended replace one or more PCs or servers, aka server machines. Consequently, for each server machine, a virtual hardware assembly is created by allocating a selected set of resources from the pools of resources in the disaggregated hardware system. The PC's operating system, such as Linux mentioned above, is then executed on the virtual hardware assembly. Even though the existing KSM function works well on such virtual hardware assembly, it is clear that unnecessary multiplicity of memory consumption for the KSM function may occur when multiple virtual hardware assemblies executes respective operating systems e.g. with the KSM function. In other cases, similar but not identical memory merging functions may be provided by respective operating systems executed on a plurality of virtual hardware assemblies. This also leads to unnecessary memory consumption since similar functionality is provided by the respective operating systems. A problem may thus be how to adapt memory merging to the disaggregated hardware system of the above mentioned kind.