Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and apparatus of thread scheduling

A scheduling method and thread technology, applied in the computer field, can solve the problem of reducing system efficiency, unbalanced pressure distribution, and not scheduling these threads that have been bound to a fixed processor to other processors that issue scheduling requests. Implementation and other issues to improve system efficiency, avoid uneven distribution of system pressure, and reduce contention

Active Publication Date: 2008-12-17
SNAPTRACK
View PDF0 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When multiple groups of threads are bound to execute on the same processor, it may cause the processor to be busy processing these threads. Even if there are currently idle processors requesting scheduling, the system will not regard these threads as being bound to the same processor. Threads on a fixed processor are scheduled to execute on other processors that issue scheduling requests
[0010] Since it is impossible to predict the running and idle conditions of the processor, binding the thread to run on a certain processor is prone to the situation that the above-mentioned bound processor is busy while other processors are idle, so it cannot be used as much as possible. The advantages of processor free scheduling and parallel processing will lead to uneven pressure distribution
[0011] To sum up, the current symmetric pair of processors cannot fully reflect the advantages of symmetric multiprocessor systems when processing multithreading with a relatively high degree of correlation, and reduces system efficiency.

Method used

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
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and apparatus of thread scheduling
  • Method and apparatus of thread scheduling
  • Method and apparatus of thread scheduling

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] This embodiment describes the process of thread scheduling by using threads as scheduling units and binding interrelated threads to thread clusters (also referred to as thread sets, the same below).

[0035] see figure 1 , is a schematic diagram of a thread scheduling process in Embodiment 1 of the present invention, and the specific steps include:

[0036] Step 101. When a certain processor sends out a scheduling request because it is currently idle, the thread scheduler receives the scheduling request from the processor, and selects a thread from the thread queue to be executed according to the thread scheduling rule. Threads in the ready state are arranged in the thread queue to be executed. The thread scheduling rules can be scheduled according to the scheduling mode or thread priority. For example, a thread scheduler selects a thread with the highest priority from a queue of threads to be executed.

[0037] Step 102, the scheduler obtains information about threa...

Embodiment 2

[0070] This embodiment describes the process of binding interrelated threads to thread clusters and performing thread scheduling with the thread cluster as a scheduling unit.

[0071] First, create and set thread clusters in the same manner as in Embodiment 1. When there is no association between threads, these independent threads can be set as thread clusters independently, so that all threads are bound to the corresponding thread clusters middle. Threads in a thread cluster maintain their individual attributes.

[0072] Thread clusters also have attributes such as priority. The attributes of a thread cluster are the attributes of the thread with the highest priority in the ready state in the thread cluster. The scheduler can schedule thread clusters according to attributes such as the priority of the thread clusters. For example, thread clusters with high priority are scheduled first, which ensures that threads with high priority are executed first.

[0073] Thread cluste...

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

The invention discloses a thread-scheduling method applied to symmetrical multi-processor systems, and a device thereof. The method comprises the following steps: a thread-scheduling request is received, an executory thread in a ready state is selected, a thread associated with the executory thread is obtained, and the executory thread which is in the ready state in the obtained thread is set to a non-ready state; the selected executory thread is assigned to the processor which sends out a scheduling request for executing, and the thread which is set to the non-ready state and the thread associated with the selected thread are restored to the ready states when the selected thread executing is finished. By adopting the method, the contesting and the simultaneous resource expenses brought by free scheduling of the symmetrical multi-processor systems to the thread can be reduced, the phenomena that the system efficiency is low because the thread is designated to the fixed processor for execution can be avoided, and the operating efficiency of the system can be improved.

Description

technical field [0001] The invention relates to the computer field, in particular to a thread scheduling method and a device thereof applied to a symmetric multiprocessor system. Background technique [0002] A process is usually defined as an instance of a running program, which is the unit of resource allocation. A process can support multiple threads, and multiple threads in a process share the same memory address space. [0003] A thread is an entity in a process, and a thread must have a parent process. A thread does not own system resources, only some data structures necessary for running; it shares all resources owned by the process with other threads of the parent process. Threads can be created and revoked to implement concurrent execution of programs. Threads generally have three basic states: ready, blocked, and running. [0004] The execution of a thread may depend on the execution of other threads, or the start of a thread needs to wait for the end of other ...

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
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/46
Inventor 李国柱
Owner SNAPTRACK
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products