Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

April 2020

5004CEM

Operating Systems and Security

1      a)     You are listening to music, playing online chess and word processing, and you suddenly discover that your operating system has stopped working.  Describe three functions      that the operating system no longer supplies and the         impact of these being missing on what you are doing.

b)    i) Given the file directory structure below.  If you are in the CW subdirectory where there is a file called                       5004CEM_score.txt, what Linux command would you use to move the 5004CEM_score.txt to the 5004CEM             subdirectory.

Teaching

 

 

      5000CEM      

CW

ii) How many pipes and processes are used as a result of the following Linux command?

grep R "ab0774" /etc/ |tail -4 |head -3

c)     i) Linux is said to make use of a macrokernel approach. Consider the main elements of a macrokernel and the  advantages offered compared to a microkernel.

ii) Explore the main benefits and limitations of kernels that make use of loadable modules.

2.     a)   Your colleague has invented a new scheduling algorithm     and is seeking your advice on it. The scheduling algorithm   uses two queues: queue one is for interactive processes      and queue two is for batch processes.  When an interactive process enters the system, the operating system allocates it to the end of queue one. When a batch process enters the  system or an interactive process is on queue one longer      than 10ms, it is transferred to the end of queue two.  The     operating system will randomly choose between queue one and queue two when scheduling processes.

i) Does this algorithm give higher priority to any processes?     (3 marks)

ii) Is it likely that any processes will suffer starvation?               (3 marks)

iii) Discuss whether this algorithm is fair to all processes.         (3 marks)

b)   Name two approaches that you could use to evaluate this scheduling algorithm.  How is the algorithm likely to

perform using these two approaches?                                       (8 marks)

c)    Given the following processes and burst times.

Process Number

Burst time

P1

7

P2

5

P3

10

P4

6

P5

4

Calculate the average waiting time and average turnaround time for the First-Come-First-Served Scheduling approach  and the Round-Robin approach with a quantum of 2.

3.     a)   i) Describe what the assembly code segment below does

and state what value ends up in result.  Outline how the

interrupt (int 80h) works in assembly code.

section .text

global _start

_start:

mov sub mov sub sub add

rax,

rax,

rbx,

rbx,

rax,

rax,

[level1]

'0'

[level2]

'0'

rbx

'0'

mov [result], rax

mov eax, 4

mov ebx, 1

mov ecx, result

mov edx, 5

int 80h

ii) Why do programmers need to learn assembly code? Given two real-world examples where assembly code is used.

b)   i) Give two of the main advantages that are offered by using multitasking in a computer system.  When would you not     use multitasking?

ii) Describe the main differences between multiprogramming and multitasking.

4.     a)     An operating systems developer is considering using a     random page replacement approach for memory systems. Advise him related to the suitability of such an approach.  As well as considering the strengths and weaknesses of   this approach, you should recommend an alternative         approach that is consistently likely to create less page

errors.                                                                                       (7 Marks)

b)     A computer has 3 page frame spaces in RAM.  A process makes the following page references 1, 2, 4, 8, 1, 2, 3, 1, 5, 5, 4, 2, 8.

Create the page frame tables for the first-in-first-out

replacement approach and least-recently-used

replacement approach, and the calculate the number of

page faults.  Which approach gives the best

performance?

c)      i) What are cache hits and cache misses? Describe the implications if cache misses outnumber cache hits?

ii) What is cache-coherency?

5.   a)    i) Describe the CIA triad model for maintaining security.

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

b)   List the states that the processes can be in.  Select two of the states and give a reason how a process can move      from one state to the other.

c)   Give three items of information found in a Process Control

Block (PCB). Explain the reasons for this information

being stored?

6.   a)   i) Describe the strengths and weakness of using kernel-level threads.

ii) Discuss the two main differences between threads and processes.

b)   Interprocess communication is critical for the successful running of modern computer system.  Explain what is interprocess          communication? Compare how this is achieved using shared      memory and signals.  Describe which of the two approaches you would use and why.

c)   What is busy waiting?  How can it be used in the synchronisation of processes? Why with synchronisation would you ensure busy waiting is kept to a minimum?