We know the secret of your success
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)
1(b) Consider a system with 4 processes PA, PB, PC and PD. The CPU burst times of each process are below:
PA 8PB 2PC 10PD 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)
Average Turn Around Time = (8+10+20+27)/4= 16.25Average Waiting Time = (0+8+10+20)/4 = 9.5
(ii) Another non-preemptive scheduling approach is the Shortest-Job-First. What is themain benefits of such an approach and why is it difficult to implement this approach inthe 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 timehave 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 nothalted/stopped to execute the short job first. This leads to the problem of Starvation, wherea 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 conceptof aging.• It is practically infeasible to implement SJF because Operating System may not know bursttime and therefore may not sort them.• While it is not possible to predict execution time, several methods can be used to estimatethe execution time for a job, such as a weighted average of previous execution times. SJFcan be used in specialized environments where accurate estimates of running time areavailable.
(iii) Using the Round Robin Scheduler, what are the average turnaround times and average waiting times for the processes when quantum lengths are:
2 units3 units
Which quantum length gives the lowest average waiting time? (9 marks)
(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?
(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.
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.
b) Examine the following codeint main()
{
int loop =0;
printf("%d\n",loop);
while (loop<3){
loop++;
fork();
}
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 systemd) Describe the common access control method to access control lists (ACL). Give an example how it is applied in a Linux environment.
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
Your one-stop website for academic resources, tutoring, writing, editing, study abroad application, cv writing & proofreading needs.