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

  • SEARCH
  • Home
  • 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 8732137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:22:55+00:00 2026-06-13T09:22:55+00:00

I want to understand the interrupt mechanism when a processor yields a chance to

  • 0

I want to understand the interrupt mechanism when a processor yields a chance to kernel code and to perform maintenance and regulation work. What I know is that timer interrupt provides this facility to OS.

1) What I want to know what exactly is the related interrupt number and what is the first OS routine that gets called in case of Linux. Will be good if I get to know the file and function name for this.

In case of Linux, scheduler_tick is the kernel function that is called to schedule new tasks, however what is unknown is who calls scheduler_tick and its parent(s)?

2) Are there any other interrupts as well which call scheduler_tick in Linux ? Which ones are they, if any at all?

 /*
   This function gets called by the timer code, with HZ frequency.
   We call it with interrupts disabled.
 */

 void scheduler_tick(void)
 {
         int cpu = smp_processor_id();
         struct rq *rq = cpu_rq(cpu);
         struct task_struct *curr = rq->curr;
.......
  • 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-13T09:22:56+00:00Added an answer on June 13, 2026 at 9:22 am

    This is easy to answer when you have access to cross-reference (x-ref) source browser.

    Click here: http://lxr.linux.no/#linux+v3.6.3/kernel/sched/core.c#L3214 to get one online x-ref project of Linux Kernel. (This one will not x-ref assembler code.)

    This link goes to scheduler_tick function definition. Click on the function name, then in new panel at right select after the line “Function prototype or declaration” link “usage…”. After some time all code which mentions this function will be listed:

     include/linux/sched.h, line 309  << declaration
     kernel/sched/core.c, line 3214   << definition
     kernel/timer.c, line 1373        << calling
    

    So, timer.c: 1373 http://lxr.linux.no/#linux+v3.6.3/kernel/timer.c#L1373 is part of update_process_times function:

    1355 /*
    1356  * Called from the timer interrupt handler to charge one tick to the current
    1357  * process.  user_tick is 1 if the tick is user time, 0 for system.
    1358  */
    1359 void update_process_times(int user_tick)
    

    This function is only callable from timer interrupt handler; it should be called at every tick.

    Repeat cross-reference search process for update_process_times to get list:

    References:
     arch/alpha/kernel/smp.c, line 520 
     arch/arm/kernel/time.c, line 108 
     arch/cris/arch-v10/kernel/time.c, line 171 
     arch/cris/arch-v32/kernel/time.c, line 206 
     arch/h8300/kernel/time.c, line 40 
     arch/ia64/kernel/time.c, line 184 
     arch/m68k/kernel/time.c, line 38 
     arch/parisc/kernel/time.c, line 163 
     include/linux/sched.h, line 308 
     kernel/time/tick-sched.c, line 683 
     kernel/time/tick-sched.c, line 841
    

    related interrupt number

    Interrupt numbers are platform-dependent (and sometimes they are even assigned at boot time). You didn’t say what platform you are interested in.

    2) Are there any other interrupts as well which call scheduler_tick in Linux ? Which ones are they, if any at all?

    There are several timer implementations, including hrtimers (high-resolution timer, this can be different from usual system timer). Each implementation may use different interrupt.

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

Sidebar

Related Questions

I want to understand how the mechanism of Shadowing and Nested function work. For
I want to understand if code snippets are what I am looking for here.
I want to understand the use of xargs man in Rampion's code : screen
I want to understand how a C++ program that was given to me works,
I want to understand why the following is happening. My guess is that a
i want to understand from the below code y the value of static variable
I want to understand how Ruby method methods() work. I tried to Google with
I want to understand these IPC mechanism concepts in OS - Shared Memory, Message
I want to understand the following code well: /* Become deamon + unstoppable and
I want to understand some things that take place in JAVA application while application

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.