Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ASAP. Please answer this questions. Thanks in advance. 1. Are semaphores devices

ID: 3600152 • Letter: A

Question

ASAP. Please answer this questions. Thanks in advance. 1. Are semaphores devices, hardware, cores, memory, functions or registers? (very briefly, explain or describe)

2. When should semaphores be used: all programs, in multi-process code, in multi-threaded code, in deadlock code, in grids? (very briefly, explain or describe)

3. When processes are “swapped”, a. Where are they before they are swapped and where are they swapped to? b. Why are they swapped (what benefit)?

4. What performs better: a swap file, a swap partition, a swap disk, a very large swap file, or no swap file? Why?

Explanation / Answer

Solution:

1.)

A semaphore is none of what is mentioned in the question, the semaphore is a value which is stored in the memory in the operating system and it is manipulative, it helps operating system to a lot the critical system and achieves synchronization.

2)

semaphore should be used in the multi-process code when the different processes are using the CPU to utilize there can be a deadlock or starvation for resources, in order to avoid that semaphore is required.

3)

a)

Before swapping the processes are in the ready queue.

b)

When there are so many processes requesting for resources in the ready state it is better to preempt them and send them into the suspended ready state.

4)

the swap partition is better compared to the other 3, it is recommended.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote