A method and system for obtaining kernel jiffies by a user-mode program
A user mode and kernel technology, applied in the computer field, can solve the problems of user mode program performance and low efficiency, and achieve the effects 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] An embodiment of the present invention proposes a method for obtaining kernel jiffies by a user-mode program, see figure 1 , including the following steps:
[0032] Step 101: Apply for a piece of memory in the kernel to store the value of the kernel global variable jiffies, set the starting address of the memory to kmem, every time a clock interrupt occurs in the kernel, the value of jiffies is incremented by 1, and whenever jiffies changes , the kernel writes the value of jiffies to kmem.
[0033] In this step, a piece of memory is applied in the kernel through the kernel function kmalloc, and the memory is used to store the kernel global variable jiffies, and the kmalloc function returns the starting address kmem of the memory. Whenever a clock interrupt occurs in the kernel, jiffies The value of jiffies is incremented by 1. Whenever jiffies changes, the kernel writes the value of jiffies to kmem.
[0034] Step 102: The kernel converts the virtual start address kmem...
Embodiment 2
[0044] Embodiment 2 of the present invention also proposes a system for obtaining kernel jiffies by a user-mode program, 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 piece of memory in the kernel to store the kernel global variable jiffies, and the starting address of the memory is set to kmem. Whenever a clock interrupt occurs in the kernel, the value of jiffies is incremented by 1. Whenever jiffies changes, The kernel writes the value of jiffies to kmem; the kernel converts the virtual start address kmem of the memory to the physical start address kphy;
[0046] The user mode module 202 is configured 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 mode program, and read the virtual start address by reading the virtual start address uvir, get the value of the k...
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