Question

In: Computer Science

The title of the course is OS. All answers should be based on that. Please do...

The title of the course is OS. All answers should be based on that. Please do not copy and paste answers on chegg or on google for me. All answers should be based on your understanding on the course. Please try as much to answer the questions based on what is asked and not setting your own questions and answering them. Let it be if you want copy and paste answers.

**********************************************************************************************************************************************************************************************************************

(1)
Operating systems protect the computer hardware and its
components. They also perform many responsibilities
and/or provide services to manage various resources of
the computer system as well as promote the efficiency of
use of the computer systems.

(i). In your own words, distinguish between user-visible registers and control and status registers
in the context of computer systems and
embedded systems used in organizations; and
draw a table of comparison to illustrate your
answer.

(ii). Identify two examples of each the above
categories of registers and explain, in your own
words, the functions that each of them performs
in a computer system.

(iii). Discuss how an operating system protects
computer hardware, processor, main memory,
and input-output devices of a computer system;
and provide appropriate practical examples to
illustrate your answer.

(iv). Explain practical issues that an operating
system may encounter in its attempt to
accomplish the protections you discussed in
(iii) above.

(v). In your own words, explain the services that an
operating system provides for either process
management or file management in computer
systems and/or embedded systems used in
hospitals.

Thanks

Solutions

Expert Solution

(i)

User-Visible Registers

A user-visible register is one that may be referenced by means of the machine language that the processor executes and that is generally available to all programs, including application programs as well as system programs. The following types of registers are typically available: data, address, and condition codes.

General Purpose Register
The general-purpose registers detain both the addresses or the data. Although we have separate data registers and address registers. The general purpose register also accepts the intermediate results in the course of program execution.

Well, the programmers can restrict some of the general-purpose registers to specific functions. Like, some registers are specifically used for stack operations or for floating-point operations. The general-purpose register can also be employed for the addressing functions.

Data registers

Data registers can be assigned to a variety of functions by the programmer. In some cases, they are
general purpose in nature and can be used with any machine instruction that performs operations on data.
Often, however, there are restrictions. For example, there may be dedicated registers for floating-point
operations.


Address registers

Address registers contain main memory addresses of data and instructions, or they contain a portion
of the address that is used in the calculation of the complete address. These registers may themselves be
somewhat general purpose, or they may be devoted to a particular addressing mode. Examples include:
Index register:

Indexed addressing is a common mode of addressing that involves adding
an index to a base value to get the effective address.
Segment pointer:

With segmented addressing, memory is divided into variable-length
blocks of words called segments. A memory reference consists of a reference to a particular
segment and an offset within the segment; this mode of addressing is important in memory
management. In this mode of addressing, a register is used to hold the address of the base
(starting location) of the segment. There may be multiple registers; for example, one for the
operating system (i.e., when operating-system code is executing on the processor) and one
for the currently executing application.
Stack pointer:

If there is user-visible stack addressing, then typically the stack is in main
memory and there is a dedicated register that points to the top of the stack. This allows the
use of instructions that contain no address field, such as push and pop.

Conditional Code
A final category of registers, which is at least partially visible to the user, holds condition codes (also
referred to as flags). Condition codes are bits set by the processor hardware as the result of operations. For
example, an arithmetic operation may produce a positive, negative, zero, or overflow result. In addition to
the result itself being stored in a register or memory, a condition code is also set. The code may subsequently be tested as part of a conditional branch operation.
Condition code bits are collected into one or more registers. Usually, they for m part of a control register. Generally, machine instructions allow these bits to be read by implicit reference, but they cannot be
altered by the programmer.

Control and Status Registers

There are a variety of processor registers that are employed to control the operation of the processor. Most of these, on most machines, are not visible to the user. Some of them may be accessible by machine instructions executed in a control or operating-system mode. Of course, different machines will have different register organizations and use different terminology. We will list common register types, with a brief description.
In addition to the MAR, MBR, IOAR, and IOBR registers mentioned earlier, the following are essential to instruction execution:


Program counter (PC): Contains the address of an instruction to be fetched.
Instruction register (IR): Contains the instruction most recently fetched.

Memory Address Register (MAR): Memory address register holds the address of a memory location.

Memory Buffer Register (MBR): The memory buffer register holds the data that has to be written to a memory location or it holds the data that is recently been read.

The memory address registers (MAR) and memory buffer registers (MBR) are used to move the data between processor and memory.

All processor designs also include a register or set of registers, often known as the program status
word (PSW)
, which contains status information. The PSW typically contains condition codes plus other
status information. Common fields and flags include the following:
Sign: Contains the sign bit of the last arithmetic operation.
Zero: Set when the result of an arithmetic operation is zero.
Carry: Set if an operation resulted in a carry (addition) into or borrow (subtraction) out of a
high-order bit. Used for multi-word arithmetic operations.
Equal: Set if a logical compare result is equality.
Overflow: Used to indicate arithmetic overflow.
Interrupt Enable/Disable: Used to disable or enable interrupts. When interrupts are disabled, the processor ignores them. This is often desirable when the operating system is in
the midst of dealing with another interrupt.
Supervisor: Indicates whether the processor is executing in supervisor or user mode. Certain privileged instructions can be executed only in supervisor mode, and certain areas of
memory can be accessed only in supervisor mode.

(ii)

(iii)

An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.

Time-sharing operating systems schedule tasks for efficient use of the system and may also include accounting software for cost allocation of processor time, mass storage, printing, and other resources.

For hardware functions such as input and output and memory allocation, the operating system acts as an intermediary between programs and the computer hardware, although the application code is usually executed directly by the hardware and frequently makes system calls to an OS function or is interrupted by it. Operating systems are found on many devices that contain a computer – from cellular phones and video game consoles to web servers and supercomputers.

The dominant desktop operating system is Microsoft Windows with a market share of around 82.74%. macOS by Apple Inc. is in second place (13.23%), and the varieties of Linux are collectively in third place (1.57%). In the mobile (including smartphones and tablets) sector, Google Android's share is up to 70% in the year 2017. According to third quarter 2016 data, Android's share on smartphones is dominant with 87.5 percent with also a growth rate of 10.3 percent per year, followed by Apple's iOS with 12.1 percent with per year decrease in market share of 5.2 percent, while other operating systems amount to just 0.3 percent. Linux distributions are dominant in the server and supercomputing sectors. Other specialized classes of operating systems, such as embedded and real-time systems, exist for many applications.

(iv)

A threat is a program that is malicious in nature and leads to harmful effects for the system. Some of the common threats that occur in a system are −

Virus
Viruses are generally small snippets of code embedded in a system. They are very dangerous and can corrupt files, destroy data, crash systems etc. They can also spread further by replicating themselves as required.

Trojan Horse
A trojan horse can secretly access the login details of a system. Then a malicious user can use these to enter the system as a harmless being and wreak havoc.

Trap Door
A trap door is a security breach that may be present in a system without the knowledge of the users. It can be exploited to harm the data or files in a system by malicious people.

Worm
A worm can destroy a system by using its resources to extreme levels. It can generate multiple copies which claim all the resources and don't allow any other processes to access them. A worm can shut down a whole network in this way.

Denial of Service
These type of attacks do not allow the legitimate users to access a system. It overwhelms the system with requests so it is overwhelmed and cannot work properly for other user.

(v)

Deadlock Recovery

hospital intensive care monitoring, etc.) where something disastrous can happen if the deadlock is not detected and corrected quickly. Thus another reason to check for deadlock is that a process has been blocked on a resource request “too long.” The definition of “too long” can vary widely from process to process. It depends both on how
long the process can reasonably expect to wait for the request, and how urgent the response is. If an overnight run deadlocks at 11pm and nobody is going to look at its output until 9am the next day, it doesn't matter whether the deadlock is detected at 11:01pm or 8:59am. If all the processes in a system are sufficiently similar, it may be adequate simply to check for deadlock at periodic intervals (e.g., one every 5 minutes in a batch system; once every millisecond in a realtime control system).


Related Solutions

TASK: ( answers should be computerized and in details - please do not copy and paste...
TASK: ( answers should be computerized and in details - please do not copy and paste - about 1500 words ) Select an organization of your choice and carry out the following tasks. Conduct a research on the marketing and promotional strategies of the organization selected. Your Report should include the following: 1. Introduction 2. Summarize the various promotional strategies used by the organization in implementing an Integrated Marketing Strategy. Identify the risks associated with promotional campaigns and discuss how...
Please provide all the calculation steps and answers should either be exact or given to 4...
Please provide all the calculation steps and answers should either be exact or given to 4 decimal places. The ED mointor SO2 emission of XYZ powerplant every hour. Assume the concentration of SO2 from XYZ powerplant is normal distributed. The powerplant claims that the average SO2 emission is 75 ppb (parts per billion) and the standard deviation is 0.75 ppb. The ED set the standard of SO2 concentration for all powerplants is 77 ppb. (a) Find the probability that the...
This is based on LinkedLists. Avneet Pandey, please do not answer this. Both your previous answers...
This is based on LinkedLists. Avneet Pandey, please do not answer this. Both your previous answers were wrong. Please complete the methods max() and threshold(). I'd greatly appreciate it. There is a type mismatch in my first method and I dont know how to get around it. I've commented on the line with the type mismatch. Please write a correct method in the answer so I can compare it to my wrong method public class Node {    public T...
please, the answers must be in computer form the name of the course is maternal and...
please, the answers must be in computer form the name of the course is maternal and child health Q1. (a) Discuss about perinatal mortality rates, still birth rates and neonatal mortality rates among India, China, Japan and France. (b) What intervention can be done to improve perinatal health in developing countries? Q2. Discuss major challenges for the health systems in improving maternal and child health
Instructions: Please write all answers in java Each problem should be completed as a single separate...
Instructions: Please write all answers in java Each problem should be completed as a single separate .java file, each with its own main(). Inputs should be read using a Scanner object and output should be printed using System.out.println. As you finish each question, submit your code to the autograder at: http://162.243.28.4/grader/homework2.html Make sure to include your name at the top as a single word. The submission utility will test your code against a different input than the sample given. When...
Please solve all of the question using R and do clarify the answers. Using the (SATGPA)...
Please solve all of the question using R and do clarify the answers. Using the (SATGPA) data set in (Stat2Data) package. Test by using ?= .01. 1) Create the following three variables and then print out all the six variables. A) Create new variable "SAT", which is the sum of (MathSAT) and (VerbalSAT). B) Create second new variable ("SATLevel"), and assign the value of( "SATLevel") as 1 when SAT<=1100, 2 when 1100<SAT<=1200, 3 when 1200<SAT<=1300, and 4 when SAT>1300. C)Create...
(Please provide references for answers) Q5. Goods are transported all over the world. To do that...
(Please provide references for answers) Q5. Goods are transported all over the world. To do that different kinds of modalities are used. a) Give at least 5 different modalities b) What kind of different characteristics of a modality is decisive for the final choice of a modality? Give at least 5 characteristics. (Please provide references for answers)
Please post all code in Pseudo code. Please post ORIGINAL answers do not copy from similar...
Please post all code in Pseudo code. Please post ORIGINAL answers do not copy from similar questions. Please post in a format that can be directly copied. Reasoning on answers would be most helpful but not required. Thank you in advance for your help. 1. List the following functions according to their order of growth from the lowest to the highest: (n−2)!, 5lg(n+100)10, 22n, 0.001n4 +3n3 +1, ln2 n, √3 n, 3n. 2. The range of afinite nonempty set of...
Please analyze and summarize the accomplishing tasks with Mac OS X network commands and Mac OS...
Please analyze and summarize the accomplishing tasks with Mac OS X network commands and Mac OS X commands in a paragraph or two.
In C++ Please comment in all-new lines of code, thank you DO NOT USE ANSWERS THAT...
In C++ Please comment in all-new lines of code, thank you DO NOT USE ANSWERS THAT ALREADY BEEN POSTED, please use code from the assignment Copy-paste will be reported Write a program to compare those two searching algorithms and also compare two sorting algorithms. You need to modify those codes in the book/slides to have some counters to count the number of comparisons and number of swaps. In the main function, you should have an ordered array of 120 integers...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT