Math, asked by raghav6800, 1 year ago

Describe two kernel data structures in which race conditions are possible. Be sure to include a description of how a race condition can occur.

Answers

Answered by ankurbadani84
7

Answer:

Step-by-step explanation:

2 kernels are as follows:-

1) Preemptive kernels

2) Nonpreemptive kernels

Only one process is active in the kernel at a time in Nonpreemptive kernels. Hence there is no scenario of race condition in Nonpreemptive kernels. Preemptive is race free if it is designed properly, to ensure shared kernel data is free of race conditions.

Example of a race condition :- if a data structure maintains a list open files in a system and this list is modified when a new file is closed / opened. In this case if 2 files where opened at the same time there will be 2 separate updates to the list this could result in race conditions.

Similar questions