# US 11,442,778 B2 · Fast shutdown of large scale-up processes

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,442,778 B2
- Document ID: US11442778B2
- Status: Granted
- Kind: B2
- Application number: 15/930,041
- Filed: 2020-05-12
- Published: 2021-11-18
- Granted: 2022-09-13
- Earliest claimed: 2020-05-12
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Daniel Booss; Robert Kettler
- Web page: https://patentgrep.com/patent/US11442778B2

## CPC

- G06F 9/5016: {the resource being the memory}
- G06F 9/4418: {Suspend and resume; Hibernate and awake}
- G06F 9/442: {Shutdown}
- G06F 9/5022: {Mechanisms to release resources}
- G06F 12/0882: Page mode
- G06N 20/00: Machine learning
- G06F 2209/5018: Thread allocation
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06N 3/08: Learning methods
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A system for shutting down a process of a database is provided. In some aspects, the system performs operations including tracking, during startup of a process, code locations of a process in the at least one memory. The operations may further include tracking, during runtime of the process and in response to the tracking the code locations, memory segments of the at least one memory allocated to the process. The operations may further include receiving an indication for a shutdown of a process. The operations may further include waking, in response to the indication, at least one processing thread of a plurality of processing threads allocated to a database system. The operations may further include allocating a list of memory mappings to the plurality of processing threads. The operations may further include freeing, by the first processing thread, the physical memory assigned to the processing thread by the memory mappings.

## Claims

### Claim 1

A system, comprising:
at least one data processor; and
at least one memory storing instructions which, when executed by the at least one data processor, result in operations comprising:
tracking, during a startup of a process, code locations of the process in the at least one memory;
tracking, during runtime of the process and in response to the tracking the code locations, memory segments of the at least one memory allocated to the process;
receiving an indication for a shutdown of a process;
waking, in response to the indication, at least one processing thread of a plurality of processing threads allocated to a database system;
allocating a list of memory mappings to the plurality of processing threads, the list of memory mappings comprising a subset of the memory segments allocated to the process, the subset assigned to a first processing thread of the plurality of processing threads;
freeing, by the first processing thread, the physical memory assigned to the processing thread by the memory mappings; and
returning, after all processing threads finish freeing the physical memory assigned to the processing threads, control for shutting down the process to an operating system of the at least one data processor.

### Claim 2 (depends on 1)

The system of claim 1, wherein the tracking the code locations comprises calling an operation to identify memory segments related to the code locations associated with the process.

### Claim 3 (depends on 1)

The system of claim 1, wherein the freeing is performed concurrently by each thread of the plurality of processing threads.

### Claim 4 (depends on 1)

The system of claim 1, wherein the subset of memory is based on a memory size.

### Claim 5 (depends on 1)

The system of claim 1, wherein the allocating comprises allocating particular memory segments to each thread of the plurality of processing threads.

### Claim 6 (depends on 1)

The system of claim 1, wherein freeing the physical memory comprises freeing memory pages from a page table.

### Claim 7 (depends on 5)

The system of claim 5, wherein the allocating is based on the tracked memory segments.

### Claim 8 (depends on 1)

The system of claim 1, wherein the allocating is based on a machine learning model and wherein the operations further comprise:
updating the machine learning model based on a historic allocation of memory mappings to the plurality of processing threads.

### Claim 9 (depends on 8)

The system of claim 8, wherein the allocating is based on the updated machine learning model.

### Claim 10 (depends on 1)

The system of claim 1, wherein freeing the physical memory comprises calling a madvise operation.

### Claim 11

A method comprising:
tracking, by at least one processor during a startup of a process, code locations of the process in a memory;
tracking, by the at least one processor during runtime of the process and in response to the tracking the code locations, memory segments allocated to the process;
receiving, by the at least one processor, an indication for a shutdown of a process;
waking, by the at least one processor and in response to the indication, at least one processing thread of a plurality of processing threads allocated to a database system;
allocating, by the at least one processor, a list of memory mappings to the plurality of processing threads, the list of memory mappings comprising a subset of the memory segments allocated to the process, the subset assigned to a first processing thread of the plurality of processing threads;
freeing, by the first processing thread, the physical memory assigned to the processing thread by the memory mappings; and
returning, by the at least one processor and after all processing threads finish freeing the physical memory assigned to the processing threads, control for shutting down the process to an operating system of the at least one data processor.

### Claim 12 (depends on 11)

The method of claim 11, wherein the tracking the code locations comprises calling an operation to identify memory segments related to the code locations associated with the process.

### Claim 13 (depends on 11)

The method of claim 11, wherein the freeing is performed concurrently by each thread of the plurality of processing threads.

### Claim 14 (depends on 11)

The method of claim 11, wherein the subset of memory is based on a memory size.

### Claim 15 (depends on 11)

The method of claim 11, wherein the allocating comprises allocating particular memory segments to each thread of the plurality of processing threads.

### Claim 16 (depends on 11)

The method of claim 11, wherein freeing the physical memory comprises freeing memory pages from a page table.

### Claim 17 (depends on 11)

The method of claim 11, wherein the allocating is based on the tracked memory segments.

### Claim 18 (depends on 11)

The method of claim 11, wherein the allocating is based on a machine learning model and wherein the method further comprises:
updating, by the at least one processor, the machine learning model based on a historic allocation of memory mappings to the plurality of processing threads.

### Claim 19 (depends on 18)

The method of claim 18, wherein the allocating is based on the updated machine learning model.

### Claim 20

A non-transitory computer readable medium storing instructions which, when executed by at least one processor, cause operations comprising:
tracking, during startup of a process, code locations of a process in the at least one memory;
tracking, during runtime of the process and in response to the tracking the code locations, memory segments of the at least one memory allocated to the process;
receiving an indication for a shutdown of a process;
waking, in response to the indication, at least one processing thread of a plurality of processing threads allocated to a database system;
allocating a list of memory mappings to the plurality of processing threads, the list of memory mappings comprising a subset of the memory segments allocated to the process, the subset assigned to a first processing thread of the plurality of processing threads;
freeing, by the first processing thread, the physical memory assigned to the processing thread by the memory mappings; and
returning, after all processing threads finish freeing the physical memory assigned to the processing threads, control for shutting down the process to an operating system of the at least one data processor.
