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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:46:12+00:00 2026-06-13T05:46:12+00:00

An interrupt causes the CPU to save the EFLAGS, CS and IP registers onto

  • 0

An interrupt causes the CPU to save the EFLAGS, CS and IP registers onto the “stack” and the iret instruction pops them off it. Where is this stack located? How does the CPU know about it (I assume some register somewhere)? I want the dirty details. I am looking at Unix based systems. Say Linux.

  • 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-13T05:46:13+00:00Added an answer on June 13, 2026 at 5:46 am

    First, check out the Intel manuals for all the specifics:
    http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

    As to your questions:

    Where is the stack located?

    On an interrupt, an x86 core loads the stack pointer from the Task-state Segment (TSS). The IDT specifies which TSS to use via a task selector field. In 32-bit mode, the TSS provides 4 stack pointers, one per each protection level. Since the protection level is usually just 0 or 3, only two stacks are relevant. In 64-bit mode, the interrupt descriptor entry can optionally specify an index 0-7 of which stack pointer to use within a given 64-bit TSS. Due to reentrancy problems though, this 64-bit stack selection mechanism is mostly broken and OS’s resort to software switching. Check out the x86 Programmer Reference Volume 3, Figure 7-2.

    If the interrupt moves the core to a higher privilege level (numerically lower CPL), then the core pushes the interrupt stack frame onto this new stack, not the current stack of the interrupted process. If the privilege level stays the same, then the core just pushes the interrupt stack frame in place on the current stack.

    How does the CPU know about it?

    The interrupt descriptor table (IDT) provides a descriptor per each interrupt vector, 0-255. The descriptor entry tells the core which TSS (i.e. stack) to use, whether user-mode can call through the vector, whether interrupt are disable on ISR entry, etc. See PRM Volume 3, chapter 6. So, all interrupt processing is really anchored by the information in the IDT.

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

Sidebar

Related Questions

What the right way to interrupt executor's thread? I've got this: Thread class with
In Python scripts, there are many cases where a keyboard interrupt (Ctrl-C) fails to
Can Thread.Abort interrupt a thread that is sleeping (using, say, Thread.Sleep(TimeSpan.FromDays(40)) ? Or will
I want to interrupt some specific grails domain class events(read,write,delete,update).Is there any hibernate eventlistner
I want to interrupt a thread after a fixed amount of time. Someone else
I have a C# program with an interrupt that processes part of a list
It is said that When an interrupt is sent by the PIC, the PIC
Do system calls execute in the context of a software interrupt handler in entirety?
1) How can the processor recognize the device requesting the interrupt? 2) Given that
I want to use the before action to optionally interrupt the processing if it

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.