# US 2005/0097294 A1 · Method and system for page initialization using off-level worker thread

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

- Number: US 2005/0097294 A1
- Document ID: US20050097294A1
- Status: Published application
- Kind: A1
- Application number: 10/697,867
- Filed: 2003-10-30
- Published: 2005-05-05
- Earliest claimed: 2003-10-30
- Assignees: International Business Machines Corporation
- Inventors: David Hepkin
- Web page: https://patentgrep.com/patent/US20050097294A1

## CPC

- G06F 9/4812: {by interrupt, e.g. masked}
- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06F 12/08: in hierarchically structured memory systems, e.g. virtual memory systems
- G06F 2209/481: Exception handling
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, an apparatus, and a computer program product are presented for memory page initialization operations. After an application thread attempts to reference a memory page, an exception or fault may be generated, and a physical memory page is allocated. The application thread is put to sleep, and a page initialization request is given to a kernel off-level worker thread, after which the interrupt-level processing is concluded. During the normal course of execution for the worker thread, the worker thread recognizes the page initialization request, and the worker thread initializes the newly allocated page by zeroing the page or by copying the contents of a source page to the newly allocated page, as appropriate. The worker thread then puts the application thread into a runnable state.

## Claims

### Claim 1

A method for initializing a memory page, the method comprising:
in response to a memory operation by a first thread, allocating a memory page;
generating a request for a second thread to initialize the allocated memory page; and
initializing the allocated memory page by the second thread in accordance with the request.

### Claim 2 (depends on 1)

The method of claim 1 further comprising:
putting the first thread into a sleep state prior to initialization of the allocated memory page; and
in response to completion of initialization of the allocated memory page, putting the first thread into a runnable state.

### Claim 3 (depends on 1)

The method of claim 1 further comprising:
zeroing the allocated memory page to initialize the allocated memory page.

### Claim 4 (depends on 1)

The method of claim 1 further comprising:
copying contents from a source page to the allocated memory page to initialize the allocated memory page, wherein the request identifies the source page.

### Claim 5 (depends on 1)

The method of claim 1 further comprising:
receiving an interrupt prior to allocating the memory page; and
returning from the interrupt after generating the request for the second thread to initialize the allocated memory page.

### Claim 6 (depends on 5)

The method of claim 5 further comprising:
identifying the interrupt as a result of a page fault.

### Claim 7 (depends on 5)

The method of claim 5 further comprising:
identifying the interrupt as a result of a copy-on-write fault.

### Claim 8 (depends on 1)

The method of claim 1 wherein the memory page is allocated to an application comprising the first thread.

### Claim 9 (depends on 1)

The method of claim 1 wherein the second thread is a kernel worker thread.

### Claim 10 (depends on 1)

The method of claim 1 further comprising:
indicating the memory page as being in an input/output state after allocating the memory page; and
indicating the allocated memory page as being in a normal state after initializing the memory page.

### Claim 11

A computer program product on a computer readable medium for use in a data processing system for initializing a memory page, the computer program product comprising:
means for allocating a memory page in response to a memory operation by a first thread;
means for generating a request for a second thread to initialize the allocated memory page; and
means for initializing the allocated memory page by the second thread in accordance with the request.

### Claim 12 (depends on 11)

The computer program product of claim 11 further comprising:
means for putting the first thread into a sleep state prior to initialization of the allocated memory page; and
means for putting the first thread into a runnable state in response to completion of initialization of the allocated memory page.

### Claim 13 (depends on 11)

The computer program product of claim 11 further comprising:
means for zeroing the allocated memory page to initialize the allocated memory page.

### Claim 14 (depends on 11)

The computer program product of claim 11 further comprising:
means for copying contents from a source page to the allocated memory page to initialize the allocated memory page, wherein the request identifies the source page.

### Claim 15 (depends on 11)

The computer program product of claim 11 further comprising:
means for receiving an interrupt prior to allocating the memory page; and
means for returning from the interrupt after generating the request for the second thread to initialize the allocated memory page.

### Claim 16 (depends on 15)

The computer program product of claim 15 further comprising:
means for identifying the interrupt as a result of a page fault.

### Claim 17 (depends on 15)

The computer program product of claim 15 further comprising:
means for identifying the interrupt as a result of a copy-on-write fault.

### Claim 18 (depends on 11)

The computer program product of claim 11 wherein the memory page is allocated to an application comprising the first thread.

### Claim 19 (depends on 11)

The computer program product of claim 11 wherein the second thread is a kernel worker thread.

### Claim 20 (depends on 11)

The computer program product of claim 11 further comprising:
means for indicating the memory page as being in an input/output state after allocating the memory page; and
means for indicating the allocated memory page as being in a normal state after initializing the memory page.

### Claim 21

An apparatus for initializing a memory page, the apparatus comprising:
means for allocating a memory page in response to a memory operation by a first thread;
means for generating a request for a second thread to initialize the allocated memory page; and
means for initializing the allocated memory page by the second thread in accordance with the request.

### Claim 22 (depends on 21)

The apparatus of claim 21 further comprising:
means for putting the first thread into a sleep state prior to initialization of the allocated memory page; and
means for putting the first thread into a runnable state in response to completion of initialization of the allocated memory page.

### Claim 23 (depends on 21)

The apparatus of claim 21 further comprising:
means for zeroing the allocated memory page to initialize the allocated memory page.

### Claim 24 (depends on 21)

The apparatus of claim 21 further comprising:
means for copying contents from a source page to the allocated memory page to initialize the allocated memory page, wherein the request identifies the source page.

### Claim 25 (depends on 21)

The apparatus of claim 21 further comprising:
means for receiving an interrupt prior to allocating the memory page; and
means for returning from the interrupt after generating the request for the second thread to initialize the allocated memory page.

### Claim 26 (depends on 25)

The apparatus of claim 25 further comprising:
means for identifying the interrupt as a result of a page fault.

### Claim 27 (depends on 25)

The apparatus of claim 25 further comprising:
means for identifying the interrupt as a result of a copy-on-write fault.

### Claim 28 (depends on 21)

The apparatus of claim 21 wherein the memory page is allocated to an application comprising the first thread.

### Claim 29 (depends on 21)

The apparatus of claim 21 wherein the second thread is a kernel worker thread.

### Claim 30 (depends on 21)

The apparatus of claim 21 further comprising:
means for indicating the memory page as being in an input/output state after allocating the memory page; and
means for indicating the allocated memory page as being in a normal state after initializing the memory page.
