Premium Resources

We know the secret of your success

207SE - Operating Systems, Security and Networks | 2018

$28.00

207SE – Operating Systems, Security and Networks | 2018 Past paper solutions
Question 1

1 (a) With regards to multi-processing computer systems, explain what time slicing is. Explore how the size of this time slice can impact on how well the system is able to perform (7 marks)

Answer (Purchase past paper to get the full solution)

    • The period of time for which a process is allowed to run in a preemptive multiprocessing system is generally called the time slice.
    • The scheduler is run once every time slice to choose the next process to run. The length of each time slice can be critical to balancing system performance vs process responsiveness
    • if the time slice is too short then the scheduler will consume too much processing time, but if the time slice is too long, processes will take longer to respond to input.

1(b) Consider a system with 4 processes PA, PB, PC and PD. The CPU burst times of each process are below:

PA  8
PB   2
PC  10
PD  7

(i) If the processes arrive in the order shown, using a first-come-first-served scheduler approach, calculate the average turnaround time and average waiting time (4 Marks)


Answer (Purchase past paper to get the full solution)

Average Turn Around Time = (8+10+20+27)/4= 16.25
Average Waiting Time = (0+8+10+20)/4 = 9.5


(ii) Another non-preemptive scheduling approach is the Shortest-Job-First. What is the
main benefits of such an approach and why is it difficult to implement this approach in
the real world ? (5 marks)

Answer (Purchase past paper to get the full solution)
Benefits


• This is the best approach to minimize waiting time.
• This is used in Batch Systems.
• This scheduling algorithm is optimal if all the jobs/processes are available at the same time.
(either Arrival time is 0 for all, or Arrival time is same for all)


Why is it difficult to implement ?


• If the arrival time for processes are different, sometimes process with short burst time
have to wait for the current process's execution to finish, because in Non-Pre-emptive SJF,
on arrival of a process with short duration, the existing job/process's execution is not
halted/stopped to execute the short job first. This leads to the problem of Starvation, where
a shorter process has to wait for a long time until the current longer process gets executed.
This happens if shorter jobs keep coming, but this can be reduced using the concept
of aging.
• It is practically infeasible to implement SJF because Operating System may not know burst
time and therefore may not sort them.
• While it is not possible to predict execution time, several methods can be used to estimate
the execution time for a job, such as a weighted average of previous execution times. SJF
can be used in specialized environments where accurate estimates of running time are
available.

(iii) Using the Round Robin Scheduler, what are the average turnaround times and average waiting times for the processes when quantum lengths are:

2 units
3 units

Which quantum length gives the lowest average waiting time? (9 marks)

Question 2

(a) 

(i) How many pipes and processes are used as a result of the following Linux  command? What does this command do and how would you redirect the results to a file called result.txt.

grep *id* /proc/cpuinfo |sort –u| wc –l

(ii) Given the directory structure below. The sales administrator has mistakenly put the Christmas sales file (christmas_sales.txt) in the January subdirectory. If your current directory is the January subdirectory, what Linux command would you use to move the christmas_sales.txt to the Christmas subdirectory

(b) Describe the steps involved when an I/O device communicates with the CPU by using an interrupt

(c) In what circumstances would a programmer choose to program in assembly code rather than using a high-level language?

(d) Outline the relationship between the bootloader and operating system in standard desktop PC. Why would the system when booting up be in real-mode and then switch to protected-mode when running applications?

Question 3

(a) For a memory paging system, what needs to be considered when determining the page that is to be removed from the RAM?

 

(b) 

(i) Outline how a physical memory address differs from a virtual memory address

(ii) With the aid of a diagram, explain in detail how a virtual memory address is converted into a physical memory address

(c) A computer has a RAM that has room for 3 pages.  A process makes the follow page references 7, 1, 4, 3, 2, 2, 3, 1, 6, 7, 7, 3, 1, 4.  Create the page table for the first-in-first-out replacement approach and the least-recently-used approach, and calculate the number of page faults for both approaches.

Question 4

a) Describe what a process is and compare it with a program. Outline 3 pieces of information stored about processes by the operating system and why this information is held

(b) Draw the five state process model. Describe what transition are valid between the five states. Give one reason why a process would go from running to blocked and one reason why a process would go from blocked to ready.

(c) Explore the similarities and differences between batch processing and real time processing. Give one example when you would use batch processing and one example when you would use real-time processing

(d) Often operating systems employ the concept of locality to achieve better performance in the computer system. With the use of an example describe how operating systems use this concept.

Question 5

b) Examine the following code
int main()

{

    int loop =0;

    printf("%d\n",loop);

    while (loop<3){

        loop++;

        fork();

        printf("%d\n",loop);

    }

    return 0;

}

(i) What might the output be?

(ii) Why is it not possible to be certain about this?

c) Describe the salted-hash approach to password creation in an operating system and outline how it improves security of the system

d) Describe the common access control method to access control lists (ACL). Give an example how it is applied in a Linux environment.

Question 6

a) What is a critical region? Describe the mechanism that can be used to maintain mutual exclusivity amongst critical regions when programming using multiple processes

.b)
(i) What is shared memory?

 

(ii) Outline the problems that need to be considered when using shared memory for inter process communication.

 

(iii) Compare shared memory with another approach for interprocess communication. Which of the two approaches would you recommend?

 

c) What are the main differences between the client and server in the client/server model of interprocess communication?

NB: Purchase 207SE – Operating Systems, Security and Networks, 2018 paper answer and solution by adding to cart

 

Last updated: Sep 20, 2019 06:04 AM

Can't find a resource? Get in touch

AcademicianHelp

Your one-stop website for academic resources, tutoring, writing, editing, study abroad application, cv writing & proofreading needs.

Get Quote
TOP