Question: 1. Explain real-time scheduling (XV6) with Rate Monotonic Scheduling. 2. OS xv6 context switching - how to understand hand crafted routine swtch: # Context switch

1. Explain real-time scheduling (XV6) with Rate Monotonic Scheduling.

2. OS xv6 context switching - how to understand hand crafted routine swtch:

# Context switch

#

# void swtch(struct context **old, struct context *new);

#

# Save current register context in old

# and then load register context from new.

.globl swtch

swtch:

movl 4(%esp), %eax

movl 8(%esp), %edx

# Save old callee-save registers

pushl %ebp

pushl %ebx

pushl %esi

pushl %edi

# Switch stacks

movl %esp, (%eax)

movl %edx, %esp

# Load new callee-save registers

popl %edi

popl %esi

popl %ebx

popl %ebp

ret

~

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!