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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 