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 7194937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:28:36+00:00 2026-05-28T20:28:36+00:00

Friends, I am trying to trace the complete execution of an operating system including

  • 0

Friends, I am trying to trace the complete execution of an operating system including the processes running on top of it. For this I want the instructions executed by each process and its execution trace and I want to do this without having to go and take objdump of each process.

So my goals are :
1) Building address space of each pid.
2) Tracking execution of each pid.

For accomplishing above goals, I am running a linux-based operating system on top of an emulator Qemu.

When qemu encounters an instruction for the first time, i will check the pid of the process running this instruction using an io-port or a known physical memory address in the guest. I can then use this information to do the stuff that I want.

My problem is ….
where in the kernel/sched.c can i know the pid of the process that is going to be executed next. Means i am not able to figure a function call like -> launch_process(pid).Can somebody please point me to this location in the kernel. Or is there a known location in the system where we can track the address space. One is CR3 but i really cannot trust it.

For some guys this may seem to be a trivial pointer to this location but I am not able to find this location myself.

  • 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-05-28T20:28:38+00:00Added an answer on May 28, 2026 at 8:28 pm

    Each process has appropriate struct task_struct. You can use find_task_by_*() functions to find struct task_struct by PID or task_pid_*() to get PID of given task. See also “What is struct pid?” section in include/linux/pid.h.

    Running tasks are in per-CPU runqueue: see struct rq definition in kernel/sched.c.

    Functions try_to_wake_up(), wake_up_process(), wake_up_new_task(), context_switch() and others are also related to your task.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hello friends i am trying to get a list of user id and want
I am trying to develop a friends system, and I need a Many-To-Many relation
I'm trying to write my own code for a 'friends-of-friends' algorithm. This algorithm acts
Just trying to make sure I have understood friends properly with this one class
I am trying to get the list of specific user`s friends from twitter. This
Trying to make a class friends with an extern C function, this code works:
hello friends i m trying to make a inbox system in which we select
friends i am trying to work with predesigned visual studio dotNet projects. so i
I'm trying to find out if friends of a user have liked a page
Friends, I am trying to rotate image using css3. On w3schools i found :

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.