Professional Documents
Culture Documents
Operating Systems
December 2015 Past Paper
a) i) In general terms what are the four distinct actions that a machine instruction can
specify? [3 marks]
● Processor- Memory: Data may be transferred from processor to memory or from
memory to processor.
● Processor – I/O: Data may be to or from a peripheral device by transferring
between the processor and an I/O module.
● Data processing: The processor may perform some arithmetic or logical operation
on data.
● Control: An instruction may specify that the sequence of execution be altered.
iii) What is an Instruction Trace? What events lead to the creation of a process?
[2marks]
An instruction trace for a program is the sequence of instructions that execute for that
process.
Events that lead to the creation of a process:
✔ New batch job.
✔ Interactive logon.
iii) What are the fundamental requirements addressed by the computer security? [2
marks]
● Confidentiality: This has to do with unauthorized disclosure of information.
Therefore the maintenance of privacy.
● Integrity: This has to do with the system and data being accurate.
● Availability: the system should work promptly and services should not be denied.
ii) List and briefly define three techniques for performing I/O. [2 marks]
● Programmed I/O: The processor issues an I/O module; that process busy-waits for
the operation to be completed before proceeding.
● Interrupt Driven I/O: The processor issues I/O command on behalf of a processor,
continues to execute subsequent instructions, and is interrupted by the I/O module
when the latter has completed its work.
● Direct Memory Access (DMA): It controls the exchange of data between the
main memory and an I/O module.
a) i) List and briefly define four classes of real – time scheduling algorithms. [2 marks]
COMP3101
Operating Systems
December 2015 Past Paper
ii) What is the difference between Soft and Hard real – time tasks? [1 mark]
● A hard real-time task is one that must meet its deadline; otherwise it will cause
undesirable damage to the system.
● A soft real-time task has an associated deadline that is desirable but not
mandatory, it still makes sense to schedule and complete the task even if it has
passed its deadline.
iii) List and briefly define three version of load sharing. [2 marks]
● FCFS (FIFO): when jobs arrive, each of its threads is placed consecutively at the
end of the share queue.
● Smallest number of threads first (SJF): The queue is organized as a priority queue
with highest priority given to threads with the smallest number of unscheduled
threads.
● Preemptive smallest number of threads first (PSJF): The highest priority is given
to jobs with the smallest number of unscheduled threads. An arriving job with a
smaller number of threads will preempt threads belonging to the scheduled job.
b) i) What are the distinctions between logical, relative and physical addresses? [2
marks]
● A logical address is a reference to a memory location. A translation must be made
to a physical address before the memory can be achieved.
● A relative address is a particular example of logical address, in which the address
is expressed as a location relative to some known point, usually the beginning of
the program.
● A physical address or absolute address is the actual location in main memory.
ii) What is the difference between the active and the passive security threat? [1
mark]
COMP3101
Operating Systems
December 2015 Past Paper
a) i) What does it mean to preempt a process, and why are two modes needed? [2
marks]
Process preemption occurs when an executing process is interrupted by the processor o that
another process can be executed.
● The User Mode: Has restrictions on the instructions that can be executed and the
memory areas that can be accessed. This is to protect the O.S from damage or
alteration.
● The Kernel Mode: The O.S does not have these restrictions, so that it can perform its
task.
ii) Distinguish between a competing process and a cooperating process. Hence, list
the control problems associated with competing process. [2 marks]
● Competing processes need access to the same resources at the same time, such as
a disk, file or printer.
● Cooperating processes either share access to a common object such as a memory
buffer or able to communicate with each other to perform some activities.
● Problems with competing process:
✔ Mutual Exclusion.
✔ Deadlock.
✔ Starvation.
COMP3101
Operating Systems
December 2015 Past Paper
b) i) What are the typical access rights that may be granted or denied to a particular
user for a particular file? [2 marks]
● None
● Knowledge of
● Read
● Write
● Execute
● Change protection
● Delete
ii) List and briefly define three file allocation methods. [2 marks]
● Contiguous Allocation: A single contiguous set of blocks is allocated to a file at
the time of file creation.
● Chained Allocation: This type of file allocation is on an individual block basis.
Each block contains a pointer to the next block in the chain.
● Indexed Allocation: The file allocation table contains a separate one level index
for each file. The index has one entry for each portion allocated to the file.
ii) How is the logical I/O different from the device I/O? [2 marks]
● Logical I/O: Deals with the device as a logical resource and is not
concerned with the details of actually controlling the device. The logical
I/O module is concerned with managing general I/O functions on behalf of
user processes e.g. Open, close, read and write.
● Device I/O: The requested operations and data are converted into
appropriate sequences of I/O instructions, channel commands and
controller orders.
● First Generation:
✔ 1945 – 1955.
✔ No operating systems.
✔ Based on transistors.
● Third Generation:
✔ 1965 – 1980
✔ Spooling possible.
ii) List and briefly define four main elements of a computer. [2 marks]
● Processor – It controls the operations of the computer and performs its
data processing functions.
● Main Memory – It stores both data and instructions.
● I/O Modules – Moves data between the computer and its external
environment.
● System Bus – It provides for communication among processor, memory
and the I/O modules.
iii) Give the distinction between Spatial Locality and Temporal Locality. [1 mark]
COMP3101
Operating Systems
December 2015 Past Paper
iii) What is a Page Fault? A page fault is a virtual address miss which occurs when a
process makes reference to a logical page that is not in physical memory.
Or
This is when a data block cannot be located in the page table so it must be retrieved from
the disk.