OS - 2. The following figure shows a multilevel priority...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2. The following figure shows a multilevel priority queue scheduler, where there are N FCFS queues. The jobs in Queue 3' have a higher priority than those in Queue j ifz' <j. (a) Give the disadvantages of the scheduler. (b) Please modify the scheduler so as to overcome the previous disadvantages you mentioned in (a). -(c) Please explain the reasons why the modified scheduler in (b) can overcome the disadvantages. 2. (15%) Prior to version 2.6 , Linux was a non-preemptive kernel . With version 2.6 the Linux kernel became fully preemptive; so a task can now be preempted when it is running in the kernel. (21) Describe what is the meannng of non-preemptive and pre-emptive kernel. (b) For single processor and multiple processors , Linux kernel 2.6 provides what mechanism for locking in the kernel ? (c) It provides two system calls —preempt_disable( ) and preempt__enable( ) — for disabling and enabling kernel preemption . However, in addition, the kernel is not pre—emptible if a kemel~mode task is holding a lock. To enforce this rule, what data inforrnations of task are need to indicate the kernel can safely be interrupted, assuming there are no outstanding calls to preempt_disable( ). (d) By disabling interrupts(or using spinlock) during a critical Section, the kernel guarantees that it can proceed without the risk of concurrent access of shared data structures. However, there is a penalty for disabling interrupts to force any 110 device waiting for service. How Linux implements the interrupt service routine to let the kernel can complete any complex processing that has to be done in response to an interrupt without worrying about being interrupted itself. 4. The following figure shows a multilevel-feedback-queue scheduler, where R stands for Round Robin, FCFS stands for First Come First Serve and SJF stands for Shortest Job First. Please rearrange the queue blocks shown in the scheduler to overcome the disadvantages existing in the current scheduler. Note that you have to justify your answer. (20%) Foreground Process - it}; auantum -= 16 : Background Process R with ouantum =._4 5. (25%) The following figure shows a multilevel-feedback—queue scheduler, where R stands for Round Robin and F CF S stands for First Come First Serve. (a) What happens for the scheduler? Please give the disadvantages of the scheduler. (b) Please modify the scheduler so as to overcome the disadvantages. (c) Please explain the reasons why the modified scheduler can overcome the disadvantages. R with quantum = 32 3. (IUpts) a.Descrihing what are spinlocks ? Explain why Spinlocks are not appropriate for uniprocessar systems yet may be sutihle for multiprocessor systems ? b.Describing what arehdiepateheeaohgeets and the states of them. to explain it with the state chaging in a mutex lock example. ...
View Full Document

This note was uploaded on 03/23/2010 for the course LAD lad taught by Professor 0531 during the Spring '10 term at National Taiwan University.

Page1 / 5

OS - 2. The following figure shows a multilevel priority...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online