Semaphore processing method and semaphore processing system

A processing method and processing system technology, which are applied in the direction of program synchronization, multi-programming device, etc., can solve the problems of not meeting the requirements of large counters, and the range of counter values ​​is small, and achieve the effect of satisfying large numbers of counts and large value ranges.

Inactive Publication Date: 2014-07-09
TELEFON AB LM ERICSSON (PUBL)
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Obviously, the disadvantage of the prior art is that the value range of the counter is small, which does not meet the requirements of a large counter

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
  • Semaphore processing method and semaphore processing system
  • Semaphore processing method and semaphore processing system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0030] An embodiment of the present invention provides a semaphore processing method, including: acquiring two semaphores; setting the first semaphore as a high-order semaphore through a converter, and setting the second semaphore as a low-order semaphore through the converter Semaphore; combine the high-order semaphore and the low-order semaphore into a counter; when the low-order of the counter is full and the low-order is incremented by one, the high-order o...

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 semaphore processing method and a semaphore processing system. The semaphore processing method includes: acquiring two semaphores; converting the firs semaphore to be a high-order semaphore and the second semaphore as a low-order semaphore by a converter; combining the high-order semaphore and the low-order semaphore to be a counter; when the low-order of the counter is up to the limit and is added one, the high order of the counter is added one and the low order becomes zero; when the high order of the counter is a certain value and the lower order thereof is a zero and is subtracted one, the high order of the counter is subtracted one and the lower order thereof is up to the limit. By acquiring two semaphores which are setting as the high-order semaphore and the low-order semaphore, combining the two semaphores to be the counter and setting the high-order semaphore as the high order of the counter and the low-order semaphore as the lower order of the counter, the value range of the semaphores is widened to be square. Accordingly, the requirement of high counting capacity can be met by the wider value range.

Description

technical field [0001] The present invention relates to the technical field of semaphore counting, and more specifically, to a processing method and system for semaphore. Background technique [0002] The best choice for the producer-consumer model to be established on the current Unix system is to use SystemV semaphores as counters. [0003] Semaphore, also known as semaphore, is a mechanism used to solve the problem of process synchronization and mutual exclusion. In the system, each process is given a semaphore, which represents the current state of each process, so as to ensure that no collision occurs when the process accesses shared data. SystemV semaphores are two sets of interface standards in Unix. SystemV's semaphore interface can execute multiple semaphore operations at the same time and maintain atomicity in one execution. [0004] However, the value range of the SystemV semaphore is very limited, and the value range of each SystemV semaphore is 0 to 32767. T...

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 Patents(China)
IPC IPC(8): G06F9/52
Inventor 崔启文
Owner TELEFON AB LM ERICSSON (PUBL)
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