Score:0

How does Ubuntu handle the jiffy wraparound issue?

mv flag

The 64bits jiffies returned by my embedded linux system after it booted up. After 5 minutes, the return value will loop around to zero and continue to increase. will be 0xffff ffff ffff b22b.

# include <sys/times.h>
long long unsigned int tmpJiffies = times(NULL);
printf("the tmpJiffies is 0x%llx.\n", tmpJiffies);

I discovered the following code in the Linux kernel's includelinuxjiffies.h file: That is why, after 5 minutes of system bootup, the jiffies wrap around.

/*
 * Have the 32 bit jiffies value wrap 5 minutes after boot
 * so jiffies wrap bugs show up earlier.
 */
#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))

However, when I attempt it on my Ubuntu linux system, the jiffies returned value differs. It begins at 0x6667bf66.

I'm curious how Ubuntu manages to achieve this.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.