CN106293966A - The communication means of AP layer and SP layer and LFS system in a kind of LFS system - Google Patents

The communication means of AP layer and SP layer and LFS system in a kind of LFS system Download PDF

Info

Publication number
CN106293966A
CN106293966A CN201610628130.9A CN201610628130A CN106293966A CN 106293966 A CN106293966 A CN 106293966A CN 201610628130 A CN201610628130 A CN 201610628130A CN 106293966 A CN106293966 A CN 106293966A
Authority
CN
China
Prior art keywords
layer
shared drive
lfs
lock
dbus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610628130.9A
Other languages
Chinese (zh)
Other versions
CN106293966B (en
Inventor
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Technology Co Ltd
Original Assignee
Wuhan Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Technology Co Ltd filed Critical Wuhan Technology Co Ltd
Priority to CN201610628130.9A priority Critical patent/CN106293966B/en
Publication of CN106293966A publication Critical patent/CN106293966A/en
Application granted granted Critical
Publication of CN106293966B publication Critical patent/CN106293966B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses the AP layer in a kind of LFS system and the communication means of SP layer and LFS system, LFS system includes AP layer, LFS manager, SP layer and device drive layer, the method includes: AP layer registers the dbus bus of current AP process to dbus finger daemon, calls LFS manager and connects SP layer;LFS manager, according to the call instruction of AP layer, positions the SP process relevant to current AP process in SP layer;SP layer accesses device drive layer to obtain the facility information corresponding with SP process;SP layer obtains thread lock and the process lock of shared drive successively, calls LFS manager write device information in shared drive, successively release process lock and thread lock;SP layer connects upper dbus finger daemon by dbus bus, by dbus finger daemon, the dbus message generated according to facility information is passed to AP layer;After AP layer obtains facility information from the dbus message received, obtain thread lock and the process lock of shared drive successively, call LFS manager release shared drive, release process lock and thread lock successively.

Description

The communication means of AP layer and SP layer and LFS system in a kind of LFS system
Technical field
The present invention relates to financial technology field, particularly to communication means and the LFS of AP layer in a kind of LFS system and SP layer System.
Background technology
At present, overwhelming majority financial terminal equipment, such as ATM etc., all follow CEN/ based on Windows operating system XFS (Comit é Europ é en de Normalisation/eXtensions for Financial Services) specification, CEN/XFS specification is the financial service extension specification that European Committee for Standardization formulates, closely related with Windows system, tool There is stronger operating system binding characteristic, it is impossible to Direct Transfer is to other system, and Windows system is pacified for banking Full property is relatively low.
Gradually it is applied to increasing field along with linux system, has occurred in that based on linux system XFS realizes system, referred to as LFS (Linux Financial Services) system, but with regard to AP layer in this type of system and SP layer Between communication mode for, the most inconsistent with mode based on shared drive in the XFS implementation method under Window system, Extra system migration problem can be brought.And lock mechanism is ambiguous, if not using lock mechanism, then Data Concurrent can be caused Access errors, if using lock mechanism, owing to lock granularity is relatively big, systematic function can decline, and insecure lock mechanism between process Deadlock may be brought, cause whole system work that abnormal phenomena occurs.
Summary of the invention
To this end, the present invention provides AP layer and the communication plan of SP layer in a kind of LFS system, to try hard to solve or the most slow Solve the problem existed above.
According to an aspect of the present invention, it is provided that AP layer and the communication means of SP layer in a kind of LFS system, be suitable in finance Terminal unit performs, financial terminal equipment is populated with LFS system, including AP layer, LFS manager, SP layer and device drives Layer, first the method comprises the steps:, AP layer registers the dbus bus of current AP process to dbus finger daemon, passes through API Interface interchange LFS manager connects SP layer;LFS manager, according to the call instruction of AP layer, is positioned in SP layer by SPI interface The SP process relevant to current AP process;SP layer accesses device drive layer to obtain the facility information corresponding with SP process;SP layer Obtain thread lock and the process lock of shared drive successively, call LFS manager write device information in shared drive, release successively Put process lock and thread lock;SP layer connects upper dbus finger daemon by dbus bus, will be according to setting by dbus finger daemon The dbus message that standby information generates passes to AP layer;After AP layer obtains facility information from the dbus message received, obtain successively Take thread lock and the process lock of shared drive, call LFS manager release shared drive, release process lock and thread lock successively.
Alternatively, in the LFS system according to the present invention, AP layer is with the communication means of SP layer, also includes: SP process is created Build the write thread to shared drive write device information.
Alternatively, in the LFS system according to the present invention, AP layer is with the communication means of SP layer, also includes: SP layer will altogether The thread lock enjoying internal memory authorizes write thread;The process lock of shared drive is authorized SP process by SP layer.
Alternatively, in the LFS system according to the present invention, AP layer is with the communication means of SP layer, and SP layer calls LFS management Device obtains shared drive and is written to facility information and includes: call the shared drive distribution interface of LFS manager, in sharing Deposit middle acquisition one piece and specify the shared drive block of size;By write thread write device information in shared drive block.
Alternatively, in the LFS system according to the present invention in the communication means of AP layer and SP layer, the head of shared drive block In space, storage has the memory block information of fixed size, and memory block information includes that the storage address of shared drive block and capacity are big Little.
Alternatively, in the LFS system according to the present invention, AP layer is with the communication means of SP layer, also includes: current AP enters Journey creates the release thread of release shared drive.
Alternatively, in the LFS system according to the present invention, AP layer is with the communication means of SP layer, also includes: AP layer will altogether The thread lock enjoying internal memory authorizes release thread;Current AP process authorized by the process lock of shared drive by AP layer.
Alternatively, in the LFS system according to the present invention, AP layer is with the communication means of SP layer, and AP layer calls LFS management Device release shared drive includes: call the shared drive realizing interface of LFS manager, storing device information in release shared drive Shared drive block.
According to a further aspect of the invention, it is provided that a kind of LFS system, being suitable to reside in financial terminal equipment, this is System includes: AP layer, is suitable to register the dbus bus of current AP process to dbus finger daemon, calls LFS by api interface and manages Device connects SP layer, after obtaining, from the dbus message received, the facility information that the SP process relevant to current AP process is corresponding, Obtain thread lock and the process lock of shared drive successively, call LFS manager release shared drive, release process lock and line successively Cheng Suo.LFS manager, it is provided that api interface, is suitable to the call instruction according to AP layer, is positioned by SPI interface and work as in SP layer The SP process that front AP process is relevant;SP layer, it is provided that SPI interface, is suitable to access device drive layer corresponding with SP process to obtain Facility information, obtains thread lock and the process lock of shared drive successively, calls LFS manager write device letter in shared drive Breath, successively release process lock and thread lock, connect upper dbus finger daemon by dbus bus, by dbus finger daemon by root The dbus message generated according to facility information passes to AP layer;Device drive layer, is suitable to provide relevant to current AP process to SP layer Facility information corresponding to SP process.
Alternatively, in the LFS system according to the present invention, SP process is suitable to create to shared drive write device information Write thread.
Alternatively, in the LFS system according to the present invention, SP layer is further adapted for: the thread lock of shared drive authorized Write thread;SP process is authorized by the process lock of shared drive.
Alternatively, in the LFS system according to the present invention, SP layer is further adapted for: call the shared drive of LFS manager Distribution interface, obtains one piece of shared drive block specifying size from shared drive;By write thread in shared drive block Write device information.
Alternatively, in the LFS system according to the present invention, in the head space of shared drive block, storage has fixed size Memory block information, memory block information includes storage address and the amount of capacity of shared drive block.
Alternatively, in the LFS system according to the present invention, current AP process is suitable to create the cable release of release shared drive Journey.
Alternatively, in the LFS system according to the present invention, AP layer is further adapted for: the thread lock of shared drive authorized Release thread;The process lock of shared drive is authorized current AP process.
Alternatively, in the LFS system according to the present invention, AP layer is further adapted for: call the shared drive of LFS manager Realizing interface, the shared drive block of storing device information in release shared drive.
AP layer and the communication technology scheme of SP layer in LFS system according to the present invention, after AP layer is connected with the foundation of SP layer, SP layer obtains thread lock and the process lock of shared drive successively, calls LFS manager and writes from device drive layer to shared drive The facility information obtained, then release process lock and thread lock successively, and after AP layer gets this facility information, obtain successively and share The thread lock of internal memory and process lock, call the release of LFS manager and store the shared drive of this facility information, then discharge process successively Lock and thread lock.In technique scheme, realized the transmission of data by shared drive when AP layer communicates with SP layer, reduce The data number of copy times of interprocess communication, shared drive is provided fine-grained same by the twin-stage lock of thread lock and process lock composition Step accesses and controls, it is ensured that the compatibility of communication mechanism, high-performance and high reliability between AP layer and SP layer.
Accompanying drawing explanation
In order to realize above-mentioned and relevant purpose, herein in conjunction with explained below and accompanying drawing, some illustrative side is described Face, these aspects indicate can to put into practice the various modes of principles disclosed herein, and all aspects and equivalence aspect It is intended to fall under in the range of theme required for protection.By reading in conjunction with the accompanying detailed description below, the disclosure above-mentioned And other purpose, feature and advantage will be apparent from.Throughout the disclosure, identical reference generally refers to identical Parts or element.
Fig. 1 shows AP layer and the flow process of SP layer communication method 100 in LFS system according to an embodiment of the invention Figure;And
Fig. 2 shows the schematic diagram of LFS system 200 according to an embodiment of the invention.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows the disclosure Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should be by embodiments set forth here Limited.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
Fig. 1 shows showing of the communication means 100 of AP layer and SP layer in LFS system according to an embodiment of the invention It is intended to.In LFS system, AP layer is suitable to perform, in financial terminal equipment in financial terminal equipment with the communication means 100 of SP layer It is populated with LFS system, including AP layer, LFS manager, SP layer and device drive layer.Wherein, wherein AP layer is application program Layer, AP is the english abbreviation of Application Program, the financial service management that LFS manager is under linux system Device, SP layer is service and provides layer, and SP is the english abbreviation of Service Provider.LFS manager provides API to AP layer (Application Programming Interface) interface, SP layer provides SPI (Service to LFS manager Provider Interface) interface.
As it is shown in figure 1, method 100 starts from step S110.In step s 110, AP layer is current to the registration of dbus finger daemon The dbus bus of AP process, calls LFS manager by api interface and connects SP layer.In the present embodiment, AP layer calls dbus_ Bus_get function registers the dbus bus of current AP process to dbus finger daemon, starts LFS manager by api interface, refers to The version scope of the api interface of the LFS manager that settled front AP process can use, and this AP process registers to LFS is managed To set up the connection of AP layer and LFS manager in device.After connection establishment between AP layer and LFS manager completes, AP layer will Calling LFS manager dynamic importing SP layer, this request uses logical name, and logical name can be mapped to SP layer to build by LFS manager Vertical connection between AP layer and SP layer.AP layer is the facility information obtaining the SP process relevant to current AP process, manages to LFS Device sends call instruction.
Subsequently, step S120 is entered.LFS manager, according to the call instruction of AP layer, is positioned in SP layer by SPI interface The SP process relevant to current AP process.In the present embodiment, LFS manager, according to the call instruction of AP layer, gets and works as The numbering of the SP process that front AP process is relevant and the dbus bus message of current AP process, fixed by SPI interface according to this numbering Position is to SP process, and transmits the dbus bus message of current AP process to SP layer.
In step s 130, SP layer accesses device drive layer to obtain the facility information corresponding with above-mentioned SP process.At this In embodiment, SP layer passes through device drives interface accessing device drive layer, obtains what current AP process was correlated with from device drive layer The facility information that SP process is corresponding.When SP layer is from driving mechanical floor to get the equipment that the relevant SP process of current AP process is corresponding After information, preparation write device information in shared drive.Now, SP process creation writing to shared drive write device information Enter thread.
In step S140, SP layer obtains thread lock and the process lock of shared drive successively, calls LFS manager to sharing Internal memory writes the facility information that SP process is corresponding, successively release process lock and thread lock.Specifically, SP layer obtains shared successively The thread lock of internal memory and process lock, authorize write thread by the thread lock of shared drive, authorizes SP by the process lock of shared drive Process, SP layer calls the shared drive distribution interface of LFS manager, from shared drive obtain one piece specify size share in Counterfoil, by this write thread write device information in shared drive block, release process lock and thread lock successively.Wherein, altogether Enjoying storage in the head space of memory block and have the memory block information of fixed size, memory block information includes the storage of shared drive block Address and amount of capacity.Shared drive is one piece of continuous print memory address space, in shared drive distribution mechanism, enters it Row discontinuous Memory Allocation management, i.e. when needs obtain one piece of shared drive block from shared drive, shared drive can be The most unappropriated memory headroom finds a block size suitable shared drive block, is allocated, it is not required that newly assigned Before shared drive block is positioned at, the afterbody of allocated shared drive block ensures the seriality of storage.Meanwhile, all distribute Shared drive block and the memory block information of unappropriated shared drive block, leave in the most continuously open up in advance one preset in Deposit in space, it is simple to by the memory block information of each shared drive block in shared drive index quickly access shared drive, and nothing Need traversing operation.The management method of this shared drive can be described as chain block memory management mechanism.About above-mentioned memory block information Management, can use Hash table to set up shared drive index and the associating of memory block information, not repeat.In this enforcement In example, the thread lock of shared drive is expressed as pthread_mutex_t, and process lock is expressed as lockf.Wherein, process lock lockf Being a kind of file lock, when the process getting this process lock lockf is collapsed, process lock lockf also can lose efficacy simultaneously, now its The above-mentioned shared drive block having collapsed process is distributed in release by his process.Further, it is also possible to locked by persistency and process ID Management, it is ensured that process collapse in the case of to shared drive block in storage facility information and process lock lockf process, Avoid the leakage of shared drive, be further ensured that the stability of LFS system.First SP layer obtains the thread lock of shared drive Pthread_mutex_t, then obtain the process lock lockf of shared drive, thread lock pthread_mutex_t is authorized above-mentioned writing Enter thread, authorize SP process by the process lock of shared drive.When this write thread gets thread lock pthread_mutex_t After, shared drive cannot be conducted interviews by other threads in this SP process, and now this SP process gets process lock Lockf, then shared drive also cannot be conducted interviews by other processes in SP layer again.Subsequently, SP layer calls being total to of LFS manager Enjoy Memory Allocation interface, shared drive is conducted interviews.Shared drive is according in the size of facility information and default memory headroom The memory block information of storage, obtains the unappropriated shared drive block specifying size, is passed the storage address of this shared drive block Pass above-mentioned write thread.After unappropriated shared drive block one is the allocated, the internal memory of correspondence can be stored at its head space Block message.Facility information corresponding for SP process is written to the shared drive block being newly assigned to by write thread according to this storage address In.After above-mentioned write operation completes, the process lock lockf of SP process release shared drive, it is subsequently written thread release and shares interior Thread lock pthread_mutex_t deposited.Afterwards, shared drive can be conducted interviews by other threads or process.
In step S150, SP layer connects upper dbus finger daemon by dbus bus, by dbus finger daemon by root The dbus message generated according to facility information passes to AP layer.In the present embodiment, SP layer is according to the dbus bus of current AP process Acquisition of information dbus bus, connects upper dbus finger daemon by dbus bus, calls dbus_message_new_method_ Call function creation dbus message, calls dbus_message_iter_append_basic function and adds in dbus message altogether Enjoy the facility information pointer in internal memory, by dbus finger daemon, this dbus message is passed to AP layer.And AP layer receives After dbus message, call bus_message_get_args function and obtain the facility information pointer in shared drive, refer to according to this Pin obtains the facility information that the relevant SP process of current AP process is corresponding from shared drive.When AP layer obtains from shared drive After the said equipment information, preparation release shared drive.Now, the release thread of current AP process creation release shared drive.
In step S160, after AP layer obtains facility information from the dbus message received, obtain shared drive successively Thread lock and process lock, call LFS manager release shared drive, release process lock and thread lock successively.Specifically, AP layer Obtain thread lock and the process lock of shared drive successively, authorize release thread by the thread lock of shared drive, by shared drive Current AP process authorized by process lock, calls the shared drive realizing interface of LFS manager, storage device letter in release shared drive The shared drive block of breath, then release process lock and thread lock successively.In the present embodiment, the thread lock of shared drive is expressed as Pthread_mutex_t, process lock is expressed as lockf.After AP layer obtains facility information from the dbus message received, first Thread lock pthread_mutex_t of acquisition shared drive, then obtain the process lock lockf of shared drive, by thread lock Pthread_mutex_t authorizes above-mentioned release thread, and the process lock of shared drive is authorized current AP process.When this release thread After getting thread lock pthread_mutex_t, shared drive cannot be visited by other threads in this current AP process Asking, now this current AP process gets process lock lockf, then shared drive also cannot be carried out by other processes in AP layer again Access.Subsequently, AP layer calls the shared drive realizing interface of LFS manager, conducts interviews shared drive.Due to allocated In the head space of shared drive block, all storage has the memory block information of fixed size, and includes shared in this memory block information The storage address of memory block and amount of capacity, then store facility information corresponding to the relevant SP process of current AP process in release During shared drive block, can directly verify its memory block information.Discharge thread according to this memory block information by interior for sharing of its correspondence After counterfoil discharges, the process lock lockf of AP process release shared drive, the thread lock of release thread release shared drive pthread_mutex_t.Afterwards, shared drive can be conducted interviews by other threads or process.
Fig. 2 shows the schematic diagram of LFS system 200 according to an embodiment of the invention.As in figure 2 it is shown, this system Including AP layer 210, LFS manager 220, SP layer 230 and device drive layer 240.
AP layer 210 is suitable to register the dbus bus of current AP process to dbus finger daemon, calls LFS by api interface Manager connects SP layer, obtains the facility information that the SP process relevant to current AP process is corresponding from the dbus message received After, obtain thread lock and the process lock of shared drive successively, call LFS manager release shared drive, discharge process lock successively With thread lock.AP layer 210 is further adapted for authorizing release thread by the thread lock of shared drive, is awarded by the process lock of shared drive Give current AP process.AP layer 210 is further adapted for calling the shared drive realizing interface of LFS manager, in release shared drive The shared drive block of storing device information.Wherein, in the head space of shared drive block, storage has the memory block of fixed size to believe Breath, memory block information includes storage address and the amount of capacity of shared drive block.In the present embodiment, AP layer 210 calls dbus_ Bus_get function registers the dbus bus of current AP process to dbus finger daemon, starts LFS manager by api interface 220, by this AP process registers to LFS manager 220 to set up the connection of AP layer 210 and LFS manager 220.When AP layer 210 And after the connection establishment between LFS manager 220 completes, AP layer 210 will call LFS manager 220 dynamic importing SP layer 230 with Set up the connection between AP layer 210 and SP layer 230.AP layer 210 is the equipment letter obtaining the SP process relevant to current AP process Breath, sends call instruction to LFS manager 220.When AP layer 210 receives what SP layer 230 was transmitted by dbus finger daemon After dbus message, call bus_message_get_args function and obtain the facility information pointer in shared drive, refer to according to this Pin obtains the facility information that the relevant SP process of current AP process is corresponding from shared drive.Subsequently, in AP layer 210 obtains and shares Thread lock pthread_mutex_t deposited, then obtain the process lock lockf of shared drive, by thread lock pthread_mutex_t Authorize the release thread of current AP process creation, the process lock of shared drive is authorized current AP process.When this release thread obtains After getting thread lock pthread_mutex_t, shared drive cannot be conducted interviews by other threads in this current AP process, Now this current AP process gets process lock lockf, then shared drive also cannot be carried out by other processes in AP layer 210 again Access.AP layer 210 calls the shared drive realizing interface of LFS manager 220, conducts interviews shared drive.Release thread is tested Card is stored in the memory block information in allocated shared drive block header space, according to the shared drive that the result release is corresponding Block, the process lock lockf of the shared drive of AP process release afterwards, thread lock pthread_ of release thread release shared drive mutex_t。
LFS manager 220 provides api interface, is suitable to the call instruction according to AP layer, is determined in SP layer by SPI interface The SP process that position is relevant to current AP process.In the present embodiment, LFS manager 220, according to the call instruction of AP layer 210, obtains Get numbering and the dbus bus message of current AP process of the SP process relevant to current AP process, pass through according to this numbering SPI interface navigates to SP process, and transmits the dbus bus message of current AP process to SP layer 230.
SP layer 230 provides SPI interface, is suitable to access device drive layer to obtain the facility information corresponding with SP process, depends on The thread lock of secondary acquisition shared drive and process lock, call LFS manager write device information in shared drive, discharge successively Process lock and thread lock, connect upper dbus finger daemon by dbus bus, will be according to facility information by dbus finger daemon The dbus message generated passes to AP layer.SP layer 230 is further adapted for authorizing the thread lock of shared drive write thread, will be altogether SP process authorized by the process lock enjoying internal memory.SP layer 230 is further adapted for calling the shared drive distribution interface of LFS manager, from Shared drive obtains one piece of shared drive block specifying size, is believed by write thread write device in shared drive block Breath.In the present embodiment, SP layer 230, by device drives interface accessing device drive layer 240, obtains from device drive layer 240 The facility information that SP process that current AP process is relevant is corresponding.Subsequently, SP layer 230 obtains thread lock pthread_ of shared drive Mutex_t, then obtain the process lock lockf of shared drive, thread lock pthread_mutex_t is authorized writing of SP process creation Enter thread, authorize SP process by the process lock of shared drive.When this write thread gets thread lock pthread_mutex_t After, shared drive cannot be conducted interviews by other threads in this SP process, and now this SP process gets process lock Lockf, then shared drive also cannot be conducted interviews by other processes in SP layer 230 again.SP layer 230 calls LFS manager 220 Shared drive distribution interface, shared drive is conducted interviews.Shared drive is empty according to size and the default internal memory of facility information The memory block information of storage between, obtains the unappropriated shared drive block specifying size, by the storage ground of this shared drive block Location passes to above-mentioned write thread.After unappropriated shared drive block one is the allocated, correspondence can be stored at its head space Memory block information.Write thread according to this storage address be written to facility information corresponding for SP process to be newly assigned to share in In counterfoil.After above-mentioned write operation completes, the process lock lockf of SP process release shared drive, it is subsequently written thread release altogether Enjoy thread lock pthread_mutex_t of internal memory.It is total that SP layer 230 obtains dbus according to the dbus bus message of current AP process Line, connects upper dbus finger daemon by dbus bus, calls dbus_message_new_method_call function creation Dbus message, calls dbus_message_iter_append_basic function and adds setting in shared drive in dbus message Standby information pointer, passes to AP layer 210 by dbus finger daemon by this dbus message.
Device drive layer 240 is suitable to facility information corresponding to the SP process relevant to current AP process provide to SP layer.
Wherein, SP process is suitable to create the write thread to shared drive write device information, and current AP process is suitable to wound Build the release thread of release shared drive.
The concrete steps communicated with SP layer about AP layer in LFS system and embodiment, the most detailed in description based on Fig. 1 Thin open, do not repeated.
In existing LFS system in communication means between AP layer and SP layer, there is extra system migration and lock mechanism Unclean problem, can reduce the performance of whole system.And AP layer and SP layer in LFS system according to embodiments of the present invention Communication plan, after AP layer is connected with the foundation of SP layer, SP layer obtains thread lock and the process lock of shared drive successively, calls LFS The facility information that manager obtains from device drive layer to shared drive write, then release process lock and thread lock successively, and AP After layer gets this facility information, obtaining thread lock and the process lock of shared drive successively, calling the release storage of LFS manager should The shared drive of facility information, then release process lock and thread lock successively.In technique scheme, by shared drive at AP layer Realize the transmission of data when communicating with SP layer, reduce the data number of copy times of interprocess communication, thread lock and process lock composition Twin-stage lock shared drive provided fine-grained synchronization of access control, use chain block memory management mechanism to reduce memory management Granularity, it is to avoid internal memory waste, improve shared drive access speed, it is ensured that the compatibility of communication mechanism between AP layer and SP layer Property, high-performance and high reliability.
B11. the system as described in B10, described SP layer is further adapted for:
Said write thread is authorized by the thread lock of described shared drive;
The process lock of described shared drive is authorized described SP process.
B12. the system as described in B11, described SP layer is further adapted for:
Call the shared drive distribution interface of LFS manager, from described shared drive, obtain one piece specify being total to of size Enjoy memory block;
In described shared drive block, described facility information is write by said write thread.
B13. the information as described in B12, in the head space of described shared drive block, storage has the memory block of fixed size Information, described memory block information includes storage address and the amount of capacity of described shared drive block.
B14. the system as described in B12 or 13, described current AP process is suitable to create the release discharging described shared drive Thread.
B15. the system as described in B14, described AP layer is further adapted for:
The thread lock of described shared drive is authorized described release thread;
The process lock of described shared drive is authorized described current AP process.
B16. the system as described in B15, described AP layer is further adapted for:
Call the shared drive realizing interface of LFS manager, release shared drive stores sharing of described facility information Memory block.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that the enforcement of the present invention Example can be put into practice in the case of not having these details.In some instances, it is not shown specifically known method, knot Structure and technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that one or more in order to simplify that the disclosure helping understands in each inventive aspect, exist Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes In example, figure or descriptions thereof.But, the method for the disclosure should not be construed to reflect an intention that i.e. required guarantor The application claims protected is than the feature more features being expressly recited in each claim.More precisely, as following As claims are reflected, inventive aspect is all features less than single embodiment disclosed above.Therefore, abide by The claims following detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself Independent embodiment as the present invention.
Those skilled in the art are to be understood that the module of the equipment in example disclosed herein or unit or group Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in this example In different one or more equipment.Module in aforementioned exemplary can be combined as a module or be segmented into multiple in addition Submodule.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment adaptively Change and they are arranged in one or more equipment different from this embodiment.Can be the module in embodiment or list Unit or assembly are combined into a module or unit or assembly, and can put them in addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit excludes each other, can use any Combine all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed appoint Where method or all processes of equipment or unit are combined.Unless expressly stated otherwise, this specification (includes adjoint power Profit requires, summary and accompanying drawing) disclosed in each feature can be carried out generation by providing identical, equivalent or the alternative features of similar purpose Replace.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include other embodiments Some feature included by rather than further feature, but the combination of the feature of different embodiment means to be in the present invention's Within the scope of and form different embodiments.Such as, in the following claims, embodiment required for protection appoint One of meaning can mode use in any combination.
Additionally, some in described embodiment be described as at this can be by the processor of computer system or by performing The method of other device enforcement of described function or the combination of method element.Therefore, have for implementing described method or method The processor of the necessary instruction of element is formed for implementing the method or the device of method element.Additionally, device embodiment This described element is the example of following device: this device is for implementing by performed by the element of the purpose in order to implement this invention Function.
As used in this, unless specifically stated so, ordinal number " first ", " second ", " the 3rd " etc. is used Describe plain objects and be merely representative of the different instances relating to similar object, and be not intended to imply that the object being so described must Must have the time upper, spatially, sequence aspect or in any other manner to definite sequence.
Although the embodiment according to limited quantity describes the present invention, but benefits from above description, the art In it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that The language that uses in this specification primarily to the readable and purpose of teaching and select rather than in order to explain or limit Determine subject of the present invention and select.Therefore, in the case of without departing from the scope of the appended claims and spirit, for this For the those of ordinary skill of technical field, many modifications and changes will be apparent from.For the scope of the present invention, to this The disclosure that invention is done is illustrative and not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.

Claims (10)

1. the AP layer in LFS system and a communication means for SP layer, be suitable to perform in financial terminal equipment, and described finance is eventually Being populated with LFS system in end equipment, described system includes AP layer, LFS manager, SP layer and device drive layer, described method bag Include:
AP layer registers the dbus bus of current AP process to dbus finger daemon, calls LFS manager by api interface and connects SP Layer;
LFS manager, according to the call instruction of AP layer, positions the SP relevant to current AP process in SP layer by SPI interface and enters Journey;
SP layer accesses device drive layer to obtain the facility information corresponding with described SP process;
SP layer obtains thread lock and the process lock of shared drive successively, calls LFS manager and writes institute in described shared drive State facility information, discharge described process lock and thread lock successively;
SP layer connects upper dbus finger daemon by described dbus bus, will be according to described facility information by dbus finger daemon The dbus message generated passes to AP layer;
After AP layer obtains described facility information from the dbus message received, obtain thread lock and the process of shared drive successively Lock, calls LFS manager and discharges described shared drive, discharge described process lock and thread lock successively.
2. the method for claim 1, also includes:
Described SP process creation writes the write thread of described facility information to shared drive.
3. method as claimed in claim 2, also includes:
The thread lock of described shared drive is authorized said write thread by SP layer;
Described SP process authorized by the process lock of described shared drive by SP layer.
4. method as claimed in claim 3, described SP layer calls LFS manager and obtains described shared drive and be written to institute State facility information to include:
Call the shared drive distribution interface of LFS manager, from described shared drive obtain one piece specify size share in Counterfoil;
In described shared drive block, described facility information is write by said write thread.
5. method as claimed in claim 4, in the head space of described shared drive block, storage has the memory block of fixed size Information, described memory block information includes storage address and the amount of capacity of described shared drive block.
6. the method as described in claim 4 or 5, also includes:
Described current AP process creation discharges the release thread of described shared drive.
7. method as claimed in claim 6, also includes:
The thread lock of described shared drive is authorized described release thread by AP layer;
Described current AP process authorized by the process lock of described shared drive by AP layer.
8. method as claimed in claim 7, described AP layer calls the LFS manager described shared drive of release and includes:
Call the shared drive realizing interface of LFS manager, release shared drive stores the shared drive of described facility information Block.
9. a LFS system, is suitable to reside in financial terminal equipment, and described system includes:
AP layer, is suitable to register to dbus finger daemon the dbus bus of current AP process, calls LFS manager by api interface Connect SP layer, after obtaining, from the dbus message received, the facility information that the SP process relevant to current AP process is corresponding, depend on The thread lock of secondary acquisition shared drive and process lock, call LFS manager and discharge described shared drive, discharge described process successively Lock and thread lock.
LFS manager, it is provided that api interface, is suitable to the call instruction according to AP layer, is positioned by SPI interface and work as in SP layer The SP process that front AP process is relevant;
SP layer, it is provided that SPI interface, is suitable to access device drive layer to obtain the facility information corresponding with described SP process, successively Obtain thread lock and the process lock of shared drive, call LFS manager in described shared drive, write described facility information, depend on The described process lock of secondary release and thread lock, connect upper dbus finger daemon by described dbus bus, by dbus finger daemon The dbus message generated according to described facility information is passed to AP layer;
Device drive layer, is suitable to facility information corresponding to the SP process relevant to current AP process provide to SP layer.
10. system as claimed in claim 9, described SP process is suitable to create writing to the shared drive described facility information of write Enter thread.
CN201610628130.9A 2016-08-03 2016-08-03 The AP layers of communication means and LFS system with SP layers in a kind of LFS system Active CN106293966B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610628130.9A CN106293966B (en) 2016-08-03 2016-08-03 The AP layers of communication means and LFS system with SP layers in a kind of LFS system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610628130.9A CN106293966B (en) 2016-08-03 2016-08-03 The AP layers of communication means and LFS system with SP layers in a kind of LFS system

Publications (2)

Publication Number Publication Date
CN106293966A true CN106293966A (en) 2017-01-04
CN106293966B CN106293966B (en) 2019-10-18

Family

ID=57664379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610628130.9A Active CN106293966B (en) 2016-08-03 2016-08-03 The AP layers of communication means and LFS system with SP layers in a kind of LFS system

Country Status (1)

Country Link
CN (1) CN106293966B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493266A (en) * 2017-07-26 2017-12-19 广州广电运通金融电子股份有限公司 Communication system, the method and device of built-in self-help terminal
CN109389779A (en) * 2018-08-28 2019-02-26 苏州浪潮智能软件有限公司 A kind of finance device unified call method under linux system
CN111857852A (en) * 2020-07-28 2020-10-30 Oppo广东移动通信有限公司 Drive system, information processing method, electronic device, and storage medium
CN113535414A (en) * 2021-05-31 2021-10-22 宁波三星医疗电气股份有限公司 Multi-process synchronization method suitable for Linux container application

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110137874A1 (en) * 2009-12-07 2011-06-09 International Business Machines Corporation Methods to Minimize Communication in a Cluster Database System
KR20110079228A (en) * 2009-12-31 2011-07-07 노틸러스효성 주식회사 Security policy realization in automatic teller machine
CN103064738A (en) * 2013-01-15 2013-04-24 珠海金山办公软件有限公司 Method and system for embedding local application program window into browser in Linux
CN103135966A (en) * 2011-11-24 2013-06-05 深圳市证通电子股份有限公司 Service provider (SP) implementation method and SP architecture based on XFS standard
CN104102490A (en) * 2014-07-28 2014-10-15 梓昆科技(中国)股份有限公司 Method for realizing CEN/XFS SP on basis of Windows service
CN104375841A (en) * 2014-12-03 2015-02-25 广州广电运通金融电子股份有限公司 Structure and implementation method based on CEN/XFS standard of linux system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110137874A1 (en) * 2009-12-07 2011-06-09 International Business Machines Corporation Methods to Minimize Communication in a Cluster Database System
KR20110079228A (en) * 2009-12-31 2011-07-07 노틸러스효성 주식회사 Security policy realization in automatic teller machine
CN103135966A (en) * 2011-11-24 2013-06-05 深圳市证通电子股份有限公司 Service provider (SP) implementation method and SP architecture based on XFS standard
CN103064738A (en) * 2013-01-15 2013-04-24 珠海金山办公软件有限公司 Method and system for embedding local application program window into browser in Linux
CN104102490A (en) * 2014-07-28 2014-10-15 梓昆科技(中国)股份有限公司 Method for realizing CEN/XFS SP on basis of Windows service
CN104375841A (en) * 2014-12-03 2015-02-25 广州广电运通金融电子股份有限公司 Structure and implementation method based on CEN/XFS standard of linux system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王洪元 等: "CEN/XFS在柜面存取款一体机中的应用", 《常州大学学报(自然科学版)》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493266A (en) * 2017-07-26 2017-12-19 广州广电运通金融电子股份有限公司 Communication system, the method and device of built-in self-help terminal
CN109389779A (en) * 2018-08-28 2019-02-26 苏州浪潮智能软件有限公司 A kind of finance device unified call method under linux system
CN111857852A (en) * 2020-07-28 2020-10-30 Oppo广东移动通信有限公司 Drive system, information processing method, electronic device, and storage medium
CN113535414A (en) * 2021-05-31 2021-10-22 宁波三星医疗电气股份有限公司 Multi-process synchronization method suitable for Linux container application

Also Published As

Publication number Publication date
CN106293966B (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN102736945B (en) A kind of method and system of the Multi-instance running application
US7634618B2 (en) Methods, systems, and computer program products for optimized copying of logical units (LUNs) in a redundant array of inexpensive disks (RAID) environment using buffers that are smaller than LUN delta map chunks
US7895394B2 (en) Storage system
US7783737B2 (en) System and method for managing supply of digital content
US8301717B2 (en) Extended virtual memory system and method in a computer cluster
CN106293966A (en) The communication means of AP layer and SP layer and LFS system in a kind of LFS system
US9952788B2 (en) Method and apparatus for providing a shared nonvolatile memory system using a distributed FTL scheme
CN106484311B (en) A kind of data processing method and device
US11347417B2 (en) Locking structures in flash memory
CN104937564B (en) The data flushing of group form
CN108924124A (en) A kind of file access method, device, equipment and readable storage medium storing program for executing
US20140040563A1 (en) Shared virtual memory management apparatus for providing cache-coherence
CN105892955A (en) Method and equipment for managing storage system
CN105955801A (en) RDMA and HTM based distributed optimistic concurrency control method
KR20200023757A (en) Memory system
US9645946B2 (en) Encryption for solid state drives (SSDs)
US20160041920A1 (en) Systems and methods for managing read-only memory
US9317420B2 (en) Computer program installation across multiple memories
US11119703B2 (en) Utilizing a set of virtual storage units distributed across physical storage units
CN103970682B (en) The method of safe read-write in Safety Redundancy storage device and this equipment
US11099740B2 (en) Method, apparatus and computer program product for managing storage device
WO2023184907A1 (en) Multi-control storage system io processing method and system, and related component
US10445014B2 (en) Methods of operating a computing system including a host processing data of first size and a storage device processing data of second size and including a memory controller and a non-volatile memory
US9361040B1 (en) Systems and methods for data storage management
US8966133B2 (en) Determining a mapping mode for a DMA data transfer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant