Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi! I need code for this function please C Programming, with explain bestes!. Function Allocate memory for TCB Set deadline in TCB Set the TCB's

Hi!

I need code for this function please C Programming, with explain

bestes!.

image text in transcribed

Function Allocate memory for TCB Set deadline in TCB Set the TCB's PC to point to the task body Set TCB's SP to point to the stack segment IF start-up mode THEIN exception create task(void(*task body)0, uint deadline) This function creates a task. If the call is made in start- up mode, i.e. the kernel is not running, only the necessary data structures will be created. However, if the call is made in running mode, it will lead to a rescheduling and possibly a context switch Argument "task_body: A pointer to the C function holding the code of the task deadline: The kernel will try to schedule the task so it will meet this deadline Return parameter Insert new task in Readylist Return status ELSE Disable interrupts Save context IF "first execution" THEN Set: "not first execution any more" Insert new task in Readylist Load conte)xt Description of the function's status, i.e. FAIL/OK ENDIF ENDIF Return status

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions