OS Revision Questions Week 1-6 PDF
Document Details
Tags
Related
Summary
This document contains revision questions and answers for operating systems. It covers various topics such as operating system features, user interfaces, and scheduling algorithms.
Full Transcript
OS revision questions week 1-6 ============================== Week 1 -- Questions: 1. Briefly describe the three main features of an operating system 2. Present 3 characteristics of having an Operating System on a PC 3. Briefly describe 3 characteristics (features) of the Unix Operating...
OS revision questions week 1-6 ============================== Week 1 -- Questions: 1. Briefly describe the three main features of an operating system 2. Present 3 characteristics of having an Operating System on a PC 3. Briefly describe 3 characteristics (features) of the Unix Operating System Answers: 1. An operating system manages both the system hardware and software resources 2. 3 Characteristics of a typical operating system are **Concurrency, Sharing, Long term storage.** 3. A Unix system has **Open-Source Code, Multitasking and Portability** Week 2 -- 1. Compare a Graphical User Interface and a Command Line Interface under each of these headings a. Ease of use b. Functionality c. Demand for processing power 2. In the context of user interfaces, indicate the class of user each of the following people belongs to a. A man ordering books online from an Amazon website b. A NCI IT helpdesk person re-configuring a student account c. A student writing Java application code for the Tesco Online Store 3. Provide 3 examples of tasks a person may do to be classified as: programmer, end-user or operational user. One example for each type of user 4. What does GUI stand for? Describe three characteristics of the GUI 5. What type of user interface each of the following users would use to perform the following tasks a. An NCI IT technician sending an email about the condition of the NCI Network b. An author using dir command to see the chapter files he wrote for the book c. A flight passenger that uses the self-service check in terminal d. An accountant editing a.bat file to schedule regular backups of his hard drive e. Game developer writing code for a game Answers: 1. Comparisons between GUI and CLI -- a. A GUI is visually much easier to use for a standard user as it is not just lined code, instead it can be pictures for example instead of text and you can use a mouse as well as a keyboard as an input device b. A GUI may restrict advanced CLI users from being as efficient. An advanced CLI user will have greater control and knowledge of the computer itself. c. As a GUI is Graphical it will require more power to use compared to CLI which would be very efficient when it comes to performance of the machine. 2. In the context of user interfaces, indicate the class of user each of the following people belongs to a. A man ordering amazon books would be the End-User b. A Helpdesk Person would be the Operational User c. A student writing Java Code would be the Programmer 3. A programmer would write code, and user would order something on a website and an operational user would be a network admin for example. 4. GUI stands for Graphical User Interface, a GUI allows pictures and images to be displayed on screen instead of just lines, it allows users to use a mouse and keyboard on the machine. You can run multiple programs simultaneously on screen. 5. What type of user interface each of the following users would use to perform the following tasks a. GUI b. CLI c. GUI d. CLI e. CLI/GUI Week 3- 1. Present the environment Subsystems part of the Windows architecture 2. Present the main role of the Kernel subsystem, part of the UNIX architecture 3. Present the Memory Manager subsystem part of the Unix Kernel Structure 4. You are using the Ubuntu command line interface. You are currently located under your home folder. The file named examquestions.txt exists in your home folder. Write the command you would use to create a new file named copyexamquestions.txt that represents an identical copy of the examquestions.txt file Answers -- 1. The Subsystems of the Wind are as follows: a. Environment subsystems b. Integral Subsystems c. Executive Subsystems 2. The Kernel Subsystem abstracts and mediates access to hardware resources, Including the CPU 3. The memory manager subsystem of the Unix Kernel Structure is responsible for controlling process access to the hardware memory resources 4. To copy a file in Ubuntu you use CP for copy, (cp examquestions.txt copyexamquestions.txt Week 4- 1. **Illustrate through a diagram a case when a set of two processes (P1 and P2) and two resources (R1 and R2) are in a deadlock stage.** 2. Briefly describe the conditions that must exist for a deadlock to occur in a system. 3. **Consider the below resource allocation graph that indicates the current stage of the system. Is the system in a deadlocked situation? If so, explain why the system is in a deadlock situation.** A diagram of a diagram Description automatically generated 4. **Draw the resource allocation graph to model the Operating System stage considering that** a. **Process D is waiting to get resource T.** b. **Resource T was allocated to process C.** c. **Process C is waiting to get resource U.** d. **Resource U was allocated to process D** 5. Discuss briefly the difference between a mechanism and a policy in relation to resource allocation. 6. Present and describe briefly the idea behind the four options for handling a deadlock situation. Answers- 1..... 2. Deadlock is a set of processes that interact is deadlocked if and only if each process in the set is blocked. 3.... 4.... 5. Policy is for example what rules are applied for the resource allocation; a mechanism is how are those rules applied in reality 6. 4 approaches to handle a Deadlock situation a. Deadlock prevention -- attempts to deny one of the 4 conditions b. Deadlock Detection and Recovery- allow deadlock to occur and then deal with it c. Deadlock avoidance -- use an algorithm to anticipate deadlock and deny the resource request d. Ignore the problem -- hope deadlock never occurs Week 5- 1. In terms of the Shortest Process First scheduling algorithm outline the following: a. The principle used by the algorithm. b. When the algorithm is activated. c. The actions taken by the algorithm when it is activated. 2. Briefly present how the First Come First Served scheduling algorithm works. Answers- 1. First come first served algorithm (FCFS) a. Each process is put at the end of a Process Ready Queue, when It is ready to start b. When the cpu is available (not used) and a (new) process is ready to start c. The oldest process in the ready queue is selected as the next process to run 2. First Come First Served (FCFS) an example is the First in First Out, The person with the smallest demand may have to wait the longest Week 6- 1. Briefly present how come the First Come First Served scheduling algorithm works 2. In terms of the Shortest Process First Scheduling Algorithm outline the following a. The principle used by the algorithm b. When the algorithm is activated c. The actions taken by the algorithm when it is activated Answers- 1. Each process ready to start is put at the end of a Ready Queue. When a process is finished the First-In process in the ready queue is selected (First come first served) 2. Shortest Process First Scheduling algorithm process a. The length of the running time (Burst Time) of each process is used to determine which process should start and use the CPU b. When the current running process has finished, the process with the shortest running time is selected first, from the ready queue c. A short process jumps ahead of the longer processes, regardless of the time when it became ready