Method and system for acquiring inner core jiffies from user mode program
A user-mode, kernel technology, applied in the computer field, can solve the problems of user-mode program performance and low efficiency, and achieve the effect of eliminating frequent calls, saving time, and improving system performance.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0031] The embodiment of the present invention proposes a method for a user state program to obtain kernel jiffies, see figure 1 , including the following steps:
[0032] Step 101: Apply for a block of memory in the kernel to store the value of the kernel global variable jiffies, set the starting address of the memory as kmem, and whenever the kernel is interrupted by a clock, the value of jiffies will be increased by 1, and whenever jiffies changes , the kernel will write the value of jiffies to kmem.
[0033] In this step, apply for a piece of memory in the kernel through the kernel function kmalloc in the kernel. This memory is used to store the kernel global variable jiffies. The kmalloc function returns the memory start address kmem. Whenever a clock interrupt occurs in the kernel, jiffies The value of jiffies is increased by 1, and whenever jiffies changes, the kernel writes the value of jiffies to kmem.
[0034] Step 102: The kernel converts the virtual start address ...
Embodiment 2
[0044] Embodiment 2 of the present invention also proposes a system for user state programs to obtain kernel jiffies, see figure 2 , the system includes a kernel module 201 and a user mode module 202, wherein,
[0045] The kernel module 201 is used to apply for a block of memory in the kernel to store the kernel global variable jiffies. The starting address of the memory is set to kmem. Whenever a clock interruption occurs in the kernel, the value of jiffies is increased by 1. Whenever jiffies changes, The kernel just writes the value of jiffies into kmem; the kernel converts the virtual start address kmem of the memory into the physical start address kphy;
[0046] The user state module 202 is used to obtain the physical start address kphy of the memory, convert the physical start address kphy of the memory into the virtual start address uvir used by the user state program, and read the virtual start address uvir, get the value of the kernel global variable jiffies stored i...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com