Semaphore processing method and semaphore processing system

A processing method and processing system technology, applied in the direction of program synchronization, multi-channel program device, etc., can solve the problems of small counter value range and not meeting the requirements of large counters, achieve a large value range, meet the needs of large counting quantities, The effect of expanding the range of values

Inactive Publication Date: 2014-05-14
TELEFON AB LM ERICSSON (PUBL)
View PDF6 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

[0031] 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.

[0032] An embodiment of the present invention provides a semaphore processing method, comprising: acquiring a semaphore set; forming a semaphore group with every two semaphore in the semaphore set, and converting all semaphore groups into a counter; One semaphore in each semaphore group in the counter is used as a count bit, and another semaphore is used as a switch bit; when the switch bit of the semaphore group is turned on, the counting of the count bit of t...

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 a semaphore set; combining each two semaphores in the semaphore set to be a semaphore group; converting all the semaphore groups to be a counter; setting one semaphore in each semaphore group as a counting position and setting the other semaphore as a switching position; starting the switching position when the counting position of one semaphore group is up to the limit; and closing the switching position when the counting position of one semaphore group is not up to the limit. One semaphore in each semaphore group in the counter, the other semaphore in each semaphore group is set as the switching position, so that each semaphore group can count equally, whether the counting positions are up to the limit or not in each semaphore group is identified by one switch, and value range of the semaphores is extended. Accordingly, the requirement of high counting capacity can be met by larger value ranges.

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