Thread synchronization method and system and medium
A thread and sub-thread technology, applied in the fields of systems and media, and thread synchronization methods, can solve problems affecting bandwidth and server performance, and achieve the effects of avoiding frequent synchronization, rapid backup, and reducing resource consumption.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0046] see figure 1 , a thread synchronization method comprising:
[0047] S100, setting the maximum event value Maxdelays and the threshold of rsync;
[0048] S200, set the file directory that needs to be monitored in the file system, create a monitoring process to monitor and read the event in the monitoring mode inotifyMode, the event in the monitoring mode inotifyMode includes file creation, deletion, modification, movement, and file attribute change, 5 mode; every time an event in the monitoring mode is monitored, this message is written into the event pool for accumulation, and it is judged whether the number of events in the event pool exceeds Maxdelays;
[0049] S300, if it exceeds Maxdelays, trigger a multi-threaded calling process, call the rsync process, and when the number of calling rsync exceeds the rsync threshold, perform a synchronization operation to synchronize the main directory content in the file system server to each web server in real time.
[0050] C...
Embodiment 2
[0063] see figure 2 , based on the same inventive concept as the thread synchronization method in the foregoing embodiments, the embodiment of this specification also provides a thread synchronization system, including: a threshold setting module, an event monitoring module, a judgment module and a thread scheduling module;
[0064] The threshold setting module sets the threshold of the maximum event value Maxdelays and rsync;
[0065] The monitoring event module monitors and reads the events in the monitoring mode inotifyMode; and stores the events monitored in the monitoring mode,
[0066] The judging module judges whether the accumulated number of events exceeds Maxdelays;
[0067] If it exceeds Maxdelays, trigger the thread scheduling module;
[0068] The thread scheduling module calls the rsync process, and when the number of called rsync processes exceeds the rsync threshold, a synchronization operation is performed to synchronize the content in the file system server...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com