Method for detecting and intervening deadlock of single-threading microprocessor

A microprocessor, single-threaded technology, applied in the direction of program synchronization, multi-programming device, resource allocation, etc., can solve the problems of multi-threaded microprocessors being on a par, cannot be applied to single-threaded microprocessor systems, etc., to overcome deadlocks Detect and intervene system shortcomings, save resources, and improve performance

CN1811719AInactive Publication Date: 2006-08-02FUJIAN NORMAL UNIV
0 Cites 15 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2006-08-02
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

Present invention relates to a simple microprocessor deadlock detection and intervene methodú¼for solving deadlock in system. It contains opening timer resource and initialisation utilized physics internal storage location timer before initiating task obtaining CPU time, proceeding accumulation clocking to physics internal storage location timer in timer interruption service program according to current task running status, continuously circular checking CPU occupied utilized time unless current operational task normal ending, if exceeding configured maximal operation time, then regarding deadlock occurring, thereby ending deadlock task and taking CPU time to followed task to continue execute. Said technology only uses less resource, such as a whole flag bit, a physics memory timer and timer resource.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the technical field of microprocessors, in particular to a deadlock detection and intervention method for a typical single-threaded microprocessor system such as a single-chip microcomputer. Background technique

[0002] The thread of a microprocessor refers to the execution process of a program. In a single-threaded microprocessor such as a single-chip microcomputer, a program can only execute one instruction at present. This single-thread microprocessor has been widely used in some portable and remote unattended instrumentation systems because of its small size, powerful functions, low price and convenient development.

[0003] The deadlock described above is generally believed to exist in multi-threaded microprocessors corresponding to single-threaded microprocessors. Each thread in two or more threads is waiting for the other thread to release a certain lock. Commonly used resources are blocked, so that each thread cannot ...

Examples

Embodiment Construction

[0015] figure 1 It is a schematic diagram of the deadlock detection structure of the present invention. In the figure, the data storage device 101 saves the maximum CPU time requirement of each specific task, which can be set in advance or dynamically adjusted during program running. The nth task running 102 of the single-threaded microprocessor indicates that the current task takes up all the time of the CPU, and only when a processor interrupt occurs, the CPU time is temporarily handed over to the interrupt service program for use, and the interrupt service program performs on-site protection and other processing to complete After that, give the CPU time to the current nth task to continue using the CPU time. The microprocessor physical timing resource 103 is an important physical resource of the present invention, works in an interrupt mode, and deprives the CPU usage time of the current task when an interrupt occurs.

[0016] figure 2 It is a flow chart of the task modu...