chap 08-2019F.pdf - Context Switching Chapter 8 Introduction Context switch When \u03bcC\/OS-III decides to run a different task it saves the current

chap 08-2019F.pdf - Context Switching Chapter 8...

This preview shows page 1 - 8 out of 8 pages.

Context Switching Chapter 8
Image of page 1
Introduction } Context switch } When μ C/OS-III decides to run a different task, it saves the current task’s context, which typically consists of the CPU registers, onto the current task’s stack and restores the context of the new task and resumes execution of that task. } Context switching adds overhead. } The more registers a CPU has, the higher the overhead. } The time required to perform a context switch is generally determined by how many registers must be saved and restored by the CPU. } Two types of context switches } from a task } from an ISR. Fall 2018 Context Switching 2
Image of page 2
Introduction } A fictitious 32-bit CPU is assumed. } 16 registers, a separate ISR stack pointer, and a status register. Fall 2018 Context Switching 3 CPU register stacking order of ready task
Image of page 3
8-1 OSCtxSw() } OSCtxSw() is called when the task level scheduler ( OSSched() ) determines that a new high priority task needs to execute. Fall 2018 Context Switching 4
Image of page 4
Image of page 5
Image of page 6
Image of page 7
Image of page 8

You've reached the end of your free preview.

Want to read all 8 pages?

  • Fall '19
  • kim

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors