Method for preventing abnormal deadlock of main unit during access to shared devices

A shared equipment and abnormal technology, applied in the direction of instruments, multi-programming devices, electrical digital data processing, etc., can solve problems such as deadlocks, and achieve the effect of solving deadlocks and realizing simplicity

Inactive Publication Date: 2009-08-05
CHENGDU SUPERXON COMM TECH CO LTD
View PDF0 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] The invention provides a method for avoiding the abnormal deadlock caused by the host when accessing the shared device, and can solve the problem of deadlock occurring after the task obtains the control right of the shared device

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 for preventing abnormal deadlock of main unit during access to shared devices
  • Method for preventing abnormal deadlock of main unit during access to shared devices
  • Method for preventing abnormal deadlock of main unit during access to shared devices

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] The present invention will be further described below in conjunction with the accompanying drawings and implementation examples.

[0033] figure 1 It is a flow chart of avoiding deadlock caused by accessing shared devices in the present invention. Such as figure 1 As shown, the process includes the following steps:

[0034] Step 101, setting a global access conflict flag for the shared device in the program.

[0035] Step 102, setting the retry times value of shared device access in the low priority task.

[0036] Step 103, start the shared device in the low priority task and set a timeout count value.

[0037] Step 104, inquire whether the shared device operation completion flag is set to 1 in the low-priority task, if the flag is set to 1, then clear it to 0, and clear the shared device access conflict flag to 0, indicating that the low-priority task If the access to the shared device is successfully completed, other operations in the low-priority tasks can be pe...

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 method to avoid abnormal deadlock of a host computer in accessing shared device. The host computer sets an access conflict mark for the shared devices. When the low priority task accesses the shared device, and requires whether operation achieving mark of the shared devices is set as 1 in a circular manner, the host computer interrupts a service routine or a high priority task interrupts the lower one and accesses the shared devices, and requires whether operation achieving mark of the shared devices is set as 1, the host computer cleans the mark as 0 and sets the access conflict mark as 1. Along interruption returns or task re-transfer, the low priority task is executed continuously, and detects the operation achieving mark that is 0, the access conflict mark that is 1, the host computer escapes circular requirement (or the task enters deal circle, causing deadlock), re-accesses the shared devices. The technical solution of the invention can avoid the deadlock. Because of simple and reliable method, the invention is in particular applied to the embedded system field with a low-performance processor and inadequate memory resources.

Description

technical field [0001] The invention relates to the technical field of embedded systems, in particular to a method for avoiding abnormal deadlocks caused by hosts accessing shared devices. Background technique [0002] The embedded processor will connect various peripherals to achieve various functions. Although the functions of the peripherals are different, there are usually only two handshaking methods between the embedded processor and the peripherals, one is the query method, and the other is the interrupt Way. In a system that uses the query method, deadlock may occur due to various reasons, so it is very important to design reliable software to ensure that the system is not deadlocked. [0003] For deadlock, different fields will give different definitions, here it mainly means that the embedded processor has been waiting for the device to complete the operation and cannot do other things. The necessary conditions for deadlock are summarized as follows: [0004] 1....

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): G06F13/16G06F9/46
Inventor 姜先刚邹渊蒋小青
Owner CHENGDU SUPERXON COMM TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products