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

Question 1. 1. (TCO 7) In which of the four I/O software layers is each of the f

ID: 3551146 • Letter: Q

Question

Question 1.1. (TCO 7) In which of the four I/O software layers is each of the following done? a. Computing the track, sector, and head for a disk read. b. Writing commands to the device registers. c. Checking to see if the user is permitted to use the device. c. Converting binary integers to ASCII for printing.
Question 2.2. (TCO 1) What is the purpose of a system call in an operating system? List and describe the purpose of at least three Linux system calls.
Question 3.3. (TCO 3) Can a system be in a deadlock that is neither deadlock nor safe? If so, give an example. If not, prove that all states are either deadlocked or safe.
Question 4.4. (TCO 2) Explain how, if the wait() and signal() semaphore operations are not executed atomically, the principal of mutual exclusion may be violated.
Question 5.5. (TCO 4) Which of the following scheduling algorithms could result in starvation? Explain your answer. a. First Come First Served b. Shortest Job First c. Round Robin d. Priority
Question 1.1. (TCO 7) In which of the four I/O software layers is each of the following done? a. Computing the track, sector, and head for a disk read. b. Writing commands to the device registers. c. Checking to see if the user is permitted to use the device. c. Converting binary integers to ASCII for printing. Question 2.2. (TCO 1) What is the purpose of a system call in an operating system? List and describe the purpose of at least three Linux system calls. Question 3.3. (TCO 3) Can a system be in a deadlock that is neither deadlock nor safe? If so, give an example. If not, prove that all states are either deadlocked or safe. Question 4.4. (TCO 2) Explain how, if the wait() and signal() semaphore operations are not executed atomically, the principal of mutual exclusion may be violated. Question 5.5. (TCO 4) Which of the following scheduling algorithms could result in starvation? Explain your answer. a. First Come First Served b. Shortest Job First c. Round Robin d. Priority Question 1.1. (TCO 7) In which of the four I/O software layers is each of the following done? a. Computing the track, sector, and head for a disk read. b. Writing commands to the device registers. c. Checking to see if the user is permitted to use the device. c. Converting binary integers to ASCII for printing.
Question 2.2. (TCO 1) What is the purpose of a system call in an operating system? List and describe the purpose of at least three Linux system calls.
Question 3.3. (TCO 3) Can a system be in a deadlock that is neither deadlock nor safe? If so, give an example. If not, prove that all states are either deadlocked or safe.
Question 4.4. (TCO 2) Explain how, if the wait() and signal() semaphore operations are not executed atomically, the principal of mutual exclusion may be violated.
Question 5.5. (TCO 4) Which of the following scheduling algorithms could result in starvation? Explain your answer. a. First Come First Served b. Shortest Job First c. Round Robin d. Priority

Explanation / Answer

Answers:


Ques 1.1:      (a) Device Driver.

                         (b) Device Driver.

                       (c) Device-Independent Software.

                         (d) User-level Software.



Ques 2.2:        System calls allow user-level processes to request services of the

                          operating system.It provides an essential interface between a process

                          and the operating system.System call instruction is an instruction

                          that generates an interrupt that cause the operating system to gain

                          control of the processor.


                          Following are the three System Calls of Linux.:


                                  1. sys_exit: The Syntax of this system call is

                                 int sys_exit(int status)

                      

                                 Its source is Kernel/exit.c.

                                 The purpose of this system call is

                                 to terminate the current process.


                   2.sys_fork: The Syntax of this system call is

                                                          int sys_fork()

                        

                                                          Its source is arch/i386/kernel/process.c.

                                 The purpose of this system call is

                                 to create a child process.

               

                   3.sys_read: The Syntax of this system call is

                                                          ssize_t sys_write(unsigned int fd, const char * buf,

                                                   size_t count)

                        

                                                          Its source is fs/read_write.c.

                                 The purpose of this system call is

                                 to read from a file descriptor .

                                



Ques 3.3:       There are states that are neither safe nor deadlocked, but which lead

                         to deadlocked states. As an example, suppose we have four resources:

                         tapes, plotters, scanners, and CDROMs, as in the text, and three

                         processes competete for them. We could have the following situation:


                              Has   Needs Available

                         A: 2000 1020 0121

                         B: 1000 0131

                         C: 0121 1010


                         This state is not deadlocked because many actions can still occur,

                         for example, A can still get two printers. However, if each process

                         asks for its remaining requirements, we have a deadlock.



Ques 4.4:   A wait operation atomically decrements the value associated with a

Suppose that the value of semaphore S = 1 and processes P1 and P2 execute wait(S) concurrently according to the following timeline:

Here we can see that the above scenario violates the mutual exclusion principle.So we can say that if the wait() and signal() semaphore operations are not executed atomically, the principal of mutual exclusion may be violated.



Ques 5.5:    Both the Shortest Job First and Priority Scheduling Algorithms can lead

                        to starvation.

                       

                        Since the Shortest Job first selects the waiting process with the

                        smallest execution time to execute next, It has the potential for

                  process starvation for processes which will require a long time to

                        complete if short processes are continually added.


                       In Priority Scheduling Algorithm,a priority is associated with each process,

                       and the CPU is allocated to the process with the highest priority.

                       Equal-priority processes are scheduled in FCFS order.

                       Due to this feature,a priority scheduling algorithm can leave some low

                       priority processes waiting indefinitely.In a heavily loaded computer system,

                       a steady stream of higher-priority processes can prevent a low-priority

                       process from ever getting the CPU.This is he reason why Priority

                       Scheduling Algorithms leads to starvation.


                  


                    

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