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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:01:09+00:00 2026-06-10T23:01:09+00:00

we know CPU can reord instructions. and OS simulate multithreading by dispatch. following cpu

  • 0

we know CPU can reord instructions. and OS simulate multithreading by dispatch.

following cpu machine instructions:

ins0
ins1
ins2

thread0 partition these three ins into 2 parts. part0 execute ins0, part1 execute ins1 and ins2. before part0 start, part2 complete. and then thread1 is triggered.

my question is:should part0 be completed before thread1 start? or thread1 start while thread0 complete ins1 and ins2 without completing ins0?

  • 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-10T23:01:11+00:00Added an answer on June 10, 2026 at 11:01 pm

    The short answer is that, with very few exceptions, when a CPU switches from one thread to another, it picks an instruction boundary and completes every instruction prior to that boundary and doesn’t start any after that boundary. When it resumes, it starts from the first instruction after that boundary.

    To allow the restarting of program or task following the handling of an exception or
    an interrupt, all exceptions (except aborts) are guaranteed to report exceptions on
    an instruction boundary. All interrupts are guaranteed to be taken on an instruction
    boundary.

    …
    Interrupts rigorously support restarting of interrupted programs and tasks without
    loss of continuity. The return instruction pointer saved for an interrupt points to the
    next instruction to be executed at the instruction boundary where the processor took
    the interrupt. If the instruction just executed has a repeat prefix, the interrupt is
    taken at the end of the current iteration with the registers set to execute the next
    iteration. — Intel x86 System Programming Guide, Volume 3A, Part 1, Section 6.6

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

Sidebar

Related Questions

Out of order execution in CPUs means that a CPU can reorder instructions to
I know how to query the cpu type in C code using the sys/systemcfg.h
I know its possible to use a wakelock to hold the screen, cpu, ect
It would be useful to also know Disk Reads/Writes, Memory, CPU, etc. statistics for
I know you can not set a key value dynamically, but what about the
Anyone know how I can make a login button in Ruby on Rails for
I would like to know the CPU time used by a portion of code.(
How can the CPU affinity of a process be set in kernel module? In
I know I can’t compile my C# code using the default Platform Target :
I know how to do it the other way around. But how can I

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.