Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda