Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
Linux kernel thread address space

I read that linux kernel threads don't have their own address space, their mm field is set to NULL. I know that all kernel threads share address space, but still, they have their own stack right? They need to somehow describe that field, and without mm, how to they do that? and other lists like open files, where do they keep it? also, what's the point of setting active_mm field to previous user task's mm? thanks in advance.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As their name suggest, kernel threads work in kernel mode, so its stack is referenced by a CPU register (i.e: ss, ebp).

Open files references (as any other process) are kept in the process descriptor field struct files_struct *files. They have nothing to do with memory descriptors.

For regular process, the fields mm and active_mm are normally the same. Kernel threads don't own any memory descriptor, so they use the one that was active (active_mm) of the previously running process, hence, kernel threads mm is always null and they use active_mm.

Hope this helps!

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!