Supercharge Your Innovation With Domain-Expert AI Agents!

Mutual exclusion resource access method based on single-chip microcomputer platform without operating system

A technology of mutually exclusive resources and operating systems, applied in the directions of multi-programming devices, inter-program communication, program control design, etc., can solve the problems of complex access to mutually exclusive resources, and achieve the effect of reducing complexity, simplifying writing, and reducing impact

Active Publication Date: 2021-01-29
上海新时达机器人有限公司
View PDF12 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since there is no operating system, access to some mutually exclusive resources (such as EEPROM, FRAM) becomes complicated and requires good reentrant code

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
  • Mutual exclusion resource access method based on single-chip microcomputer platform without operating system
  • Mutual exclusion resource access method based on single-chip microcomputer platform without operating system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] According to the mutual exclusion resource access method based on the non-operating system single-chip microcomputer platform of the embodiment of the present invention, the object of accessing the mutual exclusion resource includes a background program and an interrupt program, and the mutual exclusion resource access method based on the non-operating system single-chip microcomputer platform includes the following steps:

[0020] Before the background program or low-priority interrupt accesses the mutually exclusive resource, a mutex is set for the mutually exclusive resource to be accessed; the mutually exclusive resource is a resource that both the background program and the interrupt program can access, but cannot be accessed at the same time;

[0021] The high-priority interrupt interrupts the running of the background program or the low-priority interrupt program. Set the interrupt to return to the context. If it detects that the mutex has been released before acce...

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 mutual exclusion resource access method based on a single-chip microcomputer platform without an operating system comprises the steps that a background program or low-priority interrupt sets a mutual exclusion lock for a mutual exclusion resource to be accessed before accessing the mutual exclusion resource; the high-priority interrupt interrupts the operation of the background program or the low-priority interrupt program, sets an interrupt return context, and closes the current interrupt, add a mutual exclusion resource waiting queue and sets a waiting resource context if detecting that amutual exclusion lock is valid before accessing the mutual exclusion resource, and then jumps to the interrupt return context to realize interrupt return; the background program or the low-priority interrupt restores operating, releases the mutual exclusion lock after accessing the mutual exclusion resources, and enables the high-priority interrupt in the mutual exclusion resource waiting queue; and the high-priority interrupt jumps to the waiting resource context, and if it is detected that the mutual exclusion lock is released, the mutual exclusion resource is accessed. According to the method, multitask synchronous access of mutually exclusive resources in a single-chip microcomputer platform without an operating system is realized.

Description

technical field [0001] The invention relates to the technique of multitasking accessing mutually exclusive resources. Background technique [0002] With the development of automated production lines, digital factories, etc., the real-time requirements for control and drive units are getting higher and higher. Most control units use real-time operating systems or microkernels to implement task scheduling and real-time control. Because the operating system or the microkernel itself will bring task jitter and delay, affecting real-time performance. [0003] In order to further improve real-time performance and reduce costs, most drive units and low-end control units are developed based on single-chip microcomputers, without an operating system, and adopt the method of interrupt program plus background program. Due to the high real-time performance of interrupts, it can be better Real-time control. Since there is no operating system, access to some mutually exclusive resource...

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/52G06F9/48G06F9/54
CPCG06F9/526G06F9/546G06F9/4831
Inventor 郝佳佳王科钟前进李延法胡向明
Owner 上海新时达机器人有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More