Method and system for acquiring inner core jiffies from user mode program

The invention provides a method for acquiring an inner core jiffies from a user mode program. The method is characterized by including the following steps that firstly, a memory is applied for in an inner core and used for storing the numerical value of the inner core global variable jiffies, the initial address of the memory is set as kmem, 1 will be added to the numerical value of the jiffies every time when clock interrupt of the inner core happens, and the numerical value of the jiffies will be written into the kmem by the inner core as long as the jiffies changes; secondly, the virtual initial address kmem of the memory is converted to a physical initial address kphy by the inner core; thirdly, the physical initial address kphy of the memory is acquired through the user mode program; fourthly, the physical initial address kphy of the memory is converted to a virtual initial address uvir adopted by the user mode program by the user mode program; fifthly, the numerical value of the inner core local variable jiffies stored in the kmem address by the inner core is acquired by the user mode program by reading the virtual initial address uvir. By means of the method, the inner core jiffies can be quickly and conveniently acquired from the user mode program, and accordingly system time can be quickly acquired.