Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8612849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:43:42+00:00 2026-06-12T04:43:42+00:00

In the kernel implementation of mutex, thread owner field exists only if it is

  • 0

In the kernel implementation of mutex, thread owner field exists only if it is a SMP build. I can understand that under good and clean code a thread will call release only if acquire was successful so we can save some cache and cpu cycles by not keeping track of the thread. But then why does SMP require it ? Is it because in SMP the mutex is hybrid and spins while the thread owner is on another cpu and requires this field for the reference or are there more reasons behind it ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:43:44+00:00Added an answer on June 12, 2026 at 4:43 am

    Honestly, I don’t remember linux kernel mutex implementation now, but I see at least three reasons to store mutex owner directly in the data structure:

    1. For debugging. It’s easy to detect an owner from the kernel crash dump
    2. For runtime assertions. It becomes dead easy to detect an attempt to acquire the mutex you’ve already acquired.
    3. For implementation of priority inheritance protocol or any other mechanism that resolves priority inversion problem: http://en.wikipedia.org/wiki/Priority_inversion
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand Linux Kernel implementation of linked list and hash table.
First of all, I know that it can be implemented with a mutex and
I'm trying to understand the system call interface and implementation in the Linux kernel.
I've been searching for information for a common kernel implementation of queues, that is,
I know that the implementation of threads in the Linux kernel and libc went
I am trying to use the kernel space implementation of the md5 algorithm (md5.h
I know that a kernel may be launched with the triple brackets syntax: kernel<<<NumOfBlocks,
I'm writing a kernel module that needs to read the value of bitrate from
I have a CUDA kernel that calls out to a series of device functions.
Recently I've peeked into the Linux kernel implementation of an atomic read and write

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.