Operating System
Operating System
Table of Contents
Text Page No
1
Name: Nkosinathi Nkosi ICAS: 117164 Module: Operating System 600
Introduction
A computer system typically consists of software (programs) and hardware (the tangible machine
and its electronic components).
2
Name: Nkosinathi Nkosi ICAS: 117164 Module: Operating System 600
Question One
3
Name: Nkosinathi Nkosi ICAS: 117164 Module: Operating System 600
4
Name: Nkosinathi Nkosi ICAS: 117164 Module: Operating System 600
Quota controls
CPU allocation controls
After the system call returns, what happens if the application of the buffer
changes the content of the buffer? With copy semantic, the version of the
data written to the disk is guaranteed to be the version at the time of the
application system call.
Caching
A cache is a region of fast memory that holds copy of data. Access to the cached
copy is much easier than the original file. For instance, the instruction of the
currently running process is stored on the disk, cached in physical memory, and
copies again in the CPU’s secondary and primary cache. The main difference
between a buffer and a cache is that a buffer may hold only the existing copy of data
item, while cache, by definition, holds a copy on faster storage of an item that
resides elsewhere.
5
Name: Nkosinathi Nkosi ICAS: 117164 Module: Operating System 600
A spool is a buffer that holds the output of a device, such as a printer that cannot
accept interleaved data stream. Although a printer can serve only one job at a time,
several applications may wish to print their output concurrently, without having
their output mixes together. The OS solves this problem by preventing all output
continuing to the printer. The output of all application is spooled in a separate disk
file. When an application finishes printing then the spooling system queues the
corresponding spool file for output to the printer.
Error Handling
An Operating System that uses protected memory can guard against many kinds of
hardware and application errors, so that a complete system failure is not the usual
result of each minor mechanical glitch, Devices, and I/O transfers can fail in many
ways, either for transient reasons, as when a network becomes overloaded or for
permanent reasons, as when a disk controller becomes defective.
I/O Protection
Errors and the issue of protection are closely related. A user process may attempt to
issue illegal I/O instruction to disrupt the normal function of a system. We can use
the various mechanisms to ensure that such disruption cannot take place in the
system. To prevent illegal I/O access, we define all I/O instruction to be privileged
instructions. The user cannot issue I/O instruction directly.
4. Explain ‘File Concept’. What are the different operations performed on files?.
As we know that Computers are used for storing the information for a Permanent Time or
the Files are used for storing the Data of the users for a Long time Period. And the files can
contains any type of information means they can Store the text, any Images or Pictures or
any data in any Format. So that there must be Some Mechanism those are used for Storing
the information, Accessing the information and also Performing Some Operations on the
files.
Files are not made for just reading the Contents; we can also perform some other
operations on the Files those are explained below as:
Read Operation: Meant To Read the information which is Stored into the Files.
Write Operation: For inserting some new Contents into a File.
Rename or Change the Name of File.
Copy the File from one Location to another.
Sorting or Arrange the Contents of File.
Move or Cut the File from One Place to Another.
Delete a File.
Execute Means to Run Means File Display Output.
6
Name: Nkosinathi Nkosi ICAS: 117164 Module: Operating System 600
Question Two
a) BITNET, one of the predecessors of the Internet, was launched in 1981. What does
BITNET stand for?
Because It's Time NETwork
2. Assume OS1 is a normal Linux system (e.g., Ubuntu 12.04). What types of system
calls does it have? (Give at least 4 broad categories, and broadly describe each).
Process Control
A running program needs to be able to stop execution either normally or
abnormally. When execution is stopped abnormally, often a dump of
memory is taken and can be examined with a debugger.
File Management
Some common system calls are create, delete, read, write, reposition,
or close. Also, there is a need to determine the file attributes – get
and set file attribute. Many times the OS provides an API to make these
system calls.
Device Management
7
Name: Nkosinathi Nkosi ICAS: 117164 Module: Operating System 600
Information Management
Some system calls exist purely for transferring information between the user
program and the operating system. An example of this is time, or date.
Communication
There are two models of inter-process communication, the message-passing
model and the shared memory model.
3. Suppose Bob rents another virtual machine, VM2, running on the same hardware
machine with Alice. What problems may affect the applications of Alice and Bob
simultaneously?
Every time you virtualize something, you get penalty over running it on the
bear hardware. That means operating system running in virtual machine will
run slower than if it would run directly on that same machine without
virtualization layer.
4. Describe the necessary condition for dead lock occurrence? How can u prevent a system
from deadlock?
Deadlock Prevention
8
Name: Nkosinathi Nkosi ICAS: 117164 Module: Operating System 600
Eliminate No Preemption
Preempt resources from the process when resources required by other high
priority processes.
9
Name: Nkosinathi Nkosi ICAS: 117164 Module: Operating System 600
References
M. Accetta, R. B. (1986). ANew Kernel Foundation for UNIX Development (Vol. 3rd). (W. B. Baron,
Ed.)
M. Accetta, R. B. (1986). ANew Kernel Foundation for UNIX Development (Vol. 3rd). (W. B. Baron,
Ed.)
10