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

10 15 20 5. 1. When the scheduler overlooks a process that is runnable, this sit

ID: 3917879 • Letter: 1

Question

10 15 20 5. 1. When the scheduler overlooks a process that is runnable, this situation is called (A) Deadlock (B) Livelock (C) 2. Which of the following condition will cause the final result depending on the order of execution of instructions? 3. Which of the following is not a hardware approach to mutual exclusion? (A) Interrupt disabling (B) Compare 4. Which of the following statement regarding semaphore is untrue? (A) A binary semaphore may be initialized Race (D) Starvation (E) This situation cannot happen. (A) Deadlock (B) Livelock (C) Mutual Exclusion (D) Race (E) Starvation and Swap instruction (C) Spin waiting (D) Exchange instruction (E) Semaphores to any nonnegative integer value. (B) Mutex must be unlocked by the same process that locks it. (C) Both semWait and semSignal are atomic. (D) A semaphore that does not specify the order in which processes are removed from the waiting queue is a weak semaphore. (E) None of the above 5. A programming-language construct that provides equivalent functionality to that of semaphores is called (A) 6. Which type of the deadlock below may never delay process initiation? (A) Deadlock Prevention (B) Deadlock 7. In Android systems, which of the following is used to mediate all interaction between two processes? (A) 8. In Android systems, which of the following is typically used to perform background operations? (A) Activity 9. Which of the following mechanism is used to convert a blocking system call into a non-blocking system call? Monitor (B) Broadcast (C) Message (D) Addressing (E) None of the above Avoidance (C) Deadlock Detection (D) Integrated Deadlock (E) None of the above Binder (B) ioctl calls (C) RPC (D) IPC (E) None of the above (B) Service (C) Broadcast (D) Content provider (E) None of the above (A) KLT (B) API (C) Jacketing (D) ULT (E) Spawn Page I of 2

Explanation / Answer

There are way too many questions to answer here. I have done first 10 please put one more post for rest of the questions. Please leave a comment in case of any doubt:

1. Answer: Starvation:

Starvation is the process in which the some process doesnt get the chance because some higher priority processes keep on getting chance. The OS overlooks it keep on giving chance to some other process.

2. Answer : Race

In case of Race condition the output is dependent on the sequence of other uncontrollable events. It can result into problems if the sequence of instructions are not followed in the correct order.

3 Answer: Semaphores

All the other options are actually harware solutions for implementing mutal Exclusion: Interrupts that can be turned off or compare & Swap atomically swaps contents of two words. While other options are for hardware Semaphore is actually an integer value that is passed between between independent threads or processes. A process can wait on a semaphore until some other process signals the semaphore. Its for mutal exlucision between process

4. Answer : A binary semaphore may be intialized to any non negative integer value :

It is false statement because a binary semaphore can take any BINARY value i.e. 0 or 1 . It can not have a negative values.

Even counting semaphores can take non-negative integer values

5. Answer: Monitor:

Monitor is programming language construct that provides equivalent functionality as semaphore. Monitor is a synchronization construct that allows processes to have mutual exclusion. Monitor helps the process/thread to wait for a certain condition to become true. So that other process/thread can use it

6. Answer: DeadLock Detection

In case of deadLock two or more processes are waiting for the same resource and they keep on waiting for each other and rest of the program can't continue properly. Deadlock detection helps in finding the deadlock before hand and therefore never delay proces initiation. The program on continoues intervals checks for the deadLocks and in case a deadlock is found system takes care of it in a proper way e.g all the deadlock processes are aborted and restarted properly again.

7.Answer IPC:

Inter process communication (IPC) handles the communication between apps and system services , which uses TCP/IP for communication.

8: Answer: services

In android System a Service is an application component that can perform long running operations in the background.

It doesn't provide a user interface. It starts from the main thread and it always stays in the background even if the user is not using that application at that moment. It can consume lot of resources so you should be careful while make a service.

9. Answer: Jacketing:

Jacketing converts a blocking system call into a non-blocking system call.

Basically there are two types of threads user level threads (ULT ) and kernel level thread (KLT )

If a ULT executes a blocking system call,all the threads of process are blocked. We can use jacketing to convert a blocking system call to a non blocking system call.

10: Answer: Blocked/Suspended

Because when a running process needs to wait for a certain event to continue, the process will be placed from the Running state to Block state. If a process needs to wait for a resource or event, it is assigned the "blocked" state. The process state is changed back to "waiting" when the process no longer needs to wait

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