Resources calling method in multiline range process

A multi-threading and resource technology, applied in the direction of resource allocation, multi-programming device, etc., can solve problems such as increasing system load, errors, conflicts, etc., to reduce system workload, reduce system load, and achieve simple effects

A multi-threading and resource technology, applied in the direction of resource allocation, multi-programming device, etc., can solve problems such as increasing system load, errors, conflicts, etc., to reduce system workload, reduce system load, and achieve simple effects

CN1794185AActive Publication Date: 2006-06-28BEIJING KINGSOFT OFFICE SOFTWARE INC

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Resources calling method in multiline range process
  • Resources calling method in multiline range process

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] The invention provides a resource call mechanism in multi-thread processing, especially for solving the problem of deadlock that is easy to occur when multi-thread calls shared resources in the prior art. The shared resources refer to resources processed by multiple threads, including: files, shared memory, registry and so on.

[0018] The core idea of ​​the present invention is: put the operation of the thread on the resource into the preset thread; generate a message when the thread applies for the resource call, and put it into the message queue of the preset thread; send the message according to the queue management mechanism, and trigger the operation of the thread on the resource .

[0019] Step 11: put the operation on the shared resource in each thread into a preset thread; the preset thread described in this embodiment is the message queue of the main thread created by the Windows system for the application program, or the Windows system for the application Th...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

A method for calling on resource in multi-liner ¿C program processing includes placing operation of linear ¿C program on resource in pre-liner ¿C program, generating message when resource call ¿C on is requested by linear ¿C program and placing it in message queue of pre-liner ¿C program, triggering out operation of linear ¿C program on resource by transmitting message according to queue management mechanism.

Description

technical field [0001] The invention relates to a multi-thread processing mechanism, in particular to a resource calling method in multi-thread processing. Background technique [0002] A thread is a collection of instructions, or a special segment of a program, that can be executed independently in a program and is responsible for performing multiple tasks in a single program. Each program has a main thread, and according to needs, create multiple sub-threads outside the main thread to complete some auxiliary tasks. [0003] The multi-thread processing is to make multiple threads work in parallel to complete multiple tasks, so as to improve the efficiency of the system. A multi-threaded application divides the program into independent tasks. For tasks that are not currently being processed, the processor time is given to other tasks. For example: when thread A uses an input and output device to read a certain resource, the CPU is in an idle state. At this point, thread B ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
28 Jun 2006
Publication
CN1794185A
IPC
G06F9/50; G06F9/46
Inventors
付黎