Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Linux user mode based method and system for calling timer

A user mode and timer technology, applied in the computer field, can solve problems such as system performance and efficiency reduction, and achieve the effect of improving performance and efficiency and reducing system calls

Pending Publication Date: 2016-04-06
OPZOON TECH
View PDF5 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, the above-mentioned user-added timer function through the kernel timer will generate system calls. If the system calls frequently or the user mode adds too many timers, the performance and efficiency of the entire system will be reduced.

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
  • Linux user mode based method and system for calling timer
  • Linux user mode based method and system for calling timer
  • Linux user mode based method and system for calling timer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in combination with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are exemplary only, and are not intended to limit the scope of the present invention. Also, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concept of the present invention.

[0024] figure 1 Shown the method flow chart of calling timer based on linux user mode of the present invention;

[0025] see figure 1 Shown, the method for calling timer based on linux user mode of the present invention may further comprise the steps:

[0026] Step S1, apply for 8-byte continuous memory through the memory allocation function kmalloc in the kernel, and return the first virtual address kmem of the memory...

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 present invention discloses a linux user mode based method and system for calling a timer. The method comprises: applying for an 8-byte consecutive memory by means of kmalloc in a kernel, and returning a head virtual address kmem of the memory; converting the virtual address kmem to a physical address kphy by means of _pa; enabling a user mode to acquire the physical address kphy from a kernel mode by means of ioctl; converting the physical address kphy to a virtual address umem, used for accessing a user mode address; defining a global variable jiffies in the kernel mode and writing the global variable into the virtual address kmem; enabling the user mode to create an infinite loop thread for performing a while (1), acquiring a value of the jiffies, and acquiring a system time by means of the value of the jiffies; and comparing and determining the system time and a locally stored last time, and calling a user mode timer to process a timer task. Thus, system calling is reduced, and system performance and efficiency are improved.

Description

technical field [0001] The present invention relates to the field of computers, in particular to a method and system for invoking a timer based on linux user state Background technique [0002] In the field of computer technology, timer is a common and necessary technology. It is a collection of a series of functions. By using the methods provided by it, the software can complete the specified function within a fixed time. Automatically execute certain operations or tasks within a certain time. At present, timers are used in many application systems or application platforms to complete periodic tasks or task execution at specific times, such as realizing automatic control, timing state switching or delaying Time processing and other functions. [0003] The linux kernel mode has its own timer, which can obtain the system time of the kernel and the corresponding task scheduling, but currently the user mode does not have a user mode own timer that is synchronized with the kern...

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
IPC IPC(8): G06F9/445
Inventor 赵众
Owner OPZOON TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products