Unlock instant, AI-driven research and patent intelligence for your innovation.

Synchronous variable mapping method and device, synchronous variable freeing method and synchronous variable deleting method

A mapping method and variable technology, which is applied in the computer field, can solve problems such as synchronization variable deletion processing, deadlock, and inability to hold synchronization variables, and achieve the effects of cost saving, security and stability

Inactive Publication Date: 2011-09-28
BEIJING HUAWEI DIGITAL TECH
View PDF4 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This will affect the security and stability of the kernel
[0013] 3. When the user mode process exits normally or abnormally, the synchronization variable held by it may not be released. The synchronization variable has always been held, which makes it impossible for other processes / threads to hold the synchronization variable.
This will cause a "deadlock", making the shared resource protected by the synchronization variable unusable by others
[0014] 4. If the user mode process exits normally or abnormally, the synchronization variables created by it may not be deleted, which will make the synchronization variables used by the user mode process always exist in the system

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
  • Synchronous variable mapping method and device, synchronous variable freeing method and synchronous variable deleting method
  • Synchronous variable mapping method and device, synchronous variable freeing method and synchronous variable deleting method
  • Synchronous variable mapping method and device, synchronous variable freeing method and synchronous variable deleting method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0063] The embodiment of the present invention provides a synchronous variable mapping method, see image 3 , image 3 is a schematic diagram of a synchronization variable mapping method provided by an embodiment of the present invention, and is specifically discussed as follows:

[0064] The virtual address space of an embedded system can be divided into a user space mode or a kernel space mode. In the user state mode, use the virtual address space corresponding to the user state process, that is, the user state address space 304 . In the core state mode, use the virtual address space corresponding to the core state thread, that is, the core state address space 305 .

[0065] In the physical address space 301, a first physical address space 303 is allocated, and the address space is used to store synchronization variables created by a user mode process or a kernel mode thread. The synchronization variable is used to associate shared resources shared by user-mode processes ...

Embodiment 2

[0120] The embodiment of the present invention also provides a synchronous variable mapping device, and this embodiment can be realized by the synchronous variable mapping method provided in the first embodiment. The synchronization variable mapping device provided by the embodiment of the present invention can realize that the user mode process can access the synchronization variable without making a system call, so as to save the overhead of the embedded system, and at the same time ensure the security and stability of the kernel. see Figure 10 , Figure 10 It is a schematic diagram of a synchronous variable mapping device provided by an embodiment of the present invention, and the synchronous variable mapping device includes:

[0121] 1001: A first physical address space allocation unit. For allocating a first physical address space for storing synchronization variables in the physical address space of the embedded system;

[0122] 1002: A first virtual address space al...

Embodiment 3

[0128] The embodiment of the present invention provides a method for releasing a synchronization variable of a user state process, which solves the "deadlock" phenomenon caused by the normal exit or abnormal exit of the user state process without releasing the synchronization variable held by it. The "deadlock" phenomenon means that shared resources protected by synchronization variables cannot be used by others. The embodiment of the present invention provides two synchronization variable release methods, the first one is the user state process exit synchronization variable processing function called immediately after the user state process exits, for details, please refer to Figure 11 ; The second is that the user mode process exits the core mode processing function to call the user mode process exit synchronization variable processing function, for details, please refer to Figure 12 .

[0129] see Figure 11 , Figure 11 It is a flow chart of the first synchronous vari...

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 embodiment of the invention provides a synchronous variable mapping method. The synchronous variable mapping method comprises the following steps of: allocating a first physical address space used for storing a synchronous variable in a physical address space of an embedded system; allocating a first virtual address space in a virtual address space of the embedded system corresponding to a user mode process; mapping the first physical address space to the first virtual address space; allocating a second virtual address space in the virtual address space of the embedded system corresponding to a kernel mode thread; and mapping the first physical address space to the second virtual address space. In addition, the embodiment of the invention provides a corresponding synchronous variable mapping device. In addition, the embodiment of the invention provides a synchronous variable freeing method and a synchronous variable deleting method. By adopting the synchronous variable mapping method and the synchronous variable mapping device provided by the embodiment of the invention, the technical effect of saving the expense of the embedded system because the user mode process can access the synchronous variable without calling the system is realized; meanwhile, the security and the stability of the inner core are ensured.

Description

technical field [0001] The invention relates to the field of computers, in particular to a synchronization variable mapping method, a synchronization variable mapping device, a synchronization variable release method and a synchronization variable deletion method. Background technique [0002] With the continuous development of multi-core and multi-thread technology, embedded systems can execute multiple "tasks" concurrently, for example, a program in user mode and an operating system in core mode can be executed concurrently, which greatly improves the overall performance of the embedded system . Using multi-core and multi-thread technology to enable embedded systems to have more "tasks" work concurrently is the trend of technology research and development. [0003] Sometimes, multiple "tasks" that execute concurrently in an embedded system are interrelated. For example, both the kernel state thread and the user state process need to access (including read and write) data...

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/54
Inventor 李凤凯董雪松尹鸿涛
Owner BEIJING HUAWEI DIGITAL TECH