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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:03:34+00:00 2026-05-16T16:03:34+00:00

I finished homework for a graduate course in operating systems. I got a great

  • 0

I finished homework for a graduate course in operating systems. I got a great score and I only missed one tiny point of a question. It asked which were privileged instructions and which were not. I answered all correctly except one: Adding one register value to another

I answered it was privileged but apparently it’s not! How can this be?

I figured the user interacts with registers/memory by using systems calls, which in a sense change from user mode system calls to kernel mode routines. Therefore the adding of one register value to another could be called by a non-privileged user, but in the end the kernel is doing the work and is in kernel, privileged mode. Therefore it’s privileged? A user can’t do it by themselves. Am I wrong? Why?!

  • Thanks!
  • 1 1 Answer
  • 1 View
  • 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-16T16:03:35+00:00Added an answer on May 16, 2026 at 4:03 pm

    I’m not sure why you would think that changing a register would require kernel intervention. Some special registers may be privileged (those controlling things like descriptor tables or protection levels, with which user-mode code could bypass system-mode protections) but general purpose registers can be changed freely without a kernel getting involved.

    When your code is running, the vast majority of instructions would be things like:

    inc  %eax
    movl $7,%ebx
    addl %eax,%ebx
    

    As an aside, I’m just imagining how slow my code would run if it required a system call to the kernel every time I incremented a counter or called a function 🙂

    The only thing I can think of would be if you thought your execution thread wasn’t allowed to change registers arbitrarily since that may affect those registers for other threads. But the kernel would take care of that when switching threads – all your registers would be packed away somewhere for later and the ones for the next thread would be loaded in.


    Based on your comments, you seem to think that the time of adding is when the CPU protection mechanism should step in. In fact, it can’t at that point because it has no idea what you’re going to use the register for. You may just be using it as a counter.

    However, if you do use it as an address to access memory, and that memory is invalid somehow (outside of your address space, or swapped to disk), the kernel will step in at that point to rectify the situation (toss your application out on its ear, or bring in the swapped-out memory).

    However, even that is not a privileged instruction, it’s just the CPU handling page faults.

    A privileged instruction is something that you’re not allowed to do at all, like change the interrupt descriptor table location registers or deactivate interrupts.

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

Sidebar

Related Questions

I have a homework assignment, and i am finished other then one question (see
Just finished reading Jon Skeet's article about events and delegates and got a question.
Hi I got a little question here. I am doing my C++ homework and
Just finished reading this blog post: http://www.skorks.com/2010/03/an-interview-question-that-prints-out-its-own-source-code-in-ruby/ In it, the author argues the case
Just finished up my first mvc4 app. Everything is working great until I deploy
Already finished my application which multiplies CRS matrix and vector (SpMV) and the only
I just finished an issue in my homework, the purpose of this is to
I finished my course on Oracle databases and have been playing with it since
I finished some of the steps in http://framework.zend.com/manual/en/learning.quickstart.create-project.html and got it to work to
I finished my short file for a homework assignment which uses IO.popen(command).readlines to grab

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.