tailieunhanh - Lecture Operating system concepts - Lecture 10

All these strategies have the same goal: to keep many processes in memory simultaneously to allow multiprogramming. However, they tend to require that an entire process be in memory before it can execute. Virtual memory is a technique that allows the execution of processes that are not completely in memory. In this chapter, we discuss virtual memory in the form of demand paging and examine its complexity and cost. | CSC 322 Operating Systems Concepts Lecture - 11: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. (Chapter-2) Ahmed Mumtaz Mustehsan, CIIT, Islamabad 1 Round robin Priority Multiple Queues Shortest Process Next Guaranteed Scheduling Lottery Scheduling Fair Share Scheduling Scheduling in Interactive Systems Lecture-11 Ahmed Mumtaz Mustehsan, CIIT, Islamabad 2 Run jobs according to their priority Priority can be static or can be changed dynamically Typically combine RR with priority. Each priority class uses RR inside Priority Scheduling Lecture-11 Ahmed Mumtaz Mustehsan, CIIT, Islamabad 3 4 Priority Scheduling Have to decide on a priority number (o to n) 0 can be highest or lowest Priorities can be: Internal: Set according to O/S factors (., memory requirements or other resources ) External: Set as a user policy; ., User importance, . | CSC 322 Operating Systems Concepts Lecture - 11: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. (Chapter-2) Ahmed Mumtaz Mustehsan, CIIT, Islamabad 1 Round robin Priority Multiple Queues Shortest Process Next Guaranteed Scheduling Lottery Scheduling Fair Share Scheduling Scheduling in Interactive Systems Lecture-11 Ahmed Mumtaz Mustehsan, CIIT, Islamabad 2 Run jobs according to their priority Priority can be static or can be changed dynamically Typically combine RR with priority. Each priority class uses RR inside Priority Scheduling Lecture-11 Ahmed Mumtaz Mustehsan, CIIT, Islamabad 3 4 Priority Scheduling Have to decide on a priority number (o to n) 0 can be highest or lowest Priorities can be: Internal: Set according to O/S factors (., memory requirements or other resources ) External: Set as a user policy; ., User importance, proposed by administerator Static: Fixed for the duration of the process Dynamic: Changing during processing ., as a function of amount of CPU usage, or length of time waiting (a solution to starvation) Lecture-11 Ahmed Mumtaz Mustehsan, CIIT, Islamabad 4 Increasing the time quantum of of higher-priority tasks: 5 Starvation Problem Priority scheduling algorithms can suffer from starvation (indefinite waiting for CPU access) In a heavily loaded system, a steady stream of higher priority processes can result in a low priority process never receiving CPU time, ., it can starve for CPU time One solution: aging: Gradually increasing the priority of a process that waits for a long time Lecture-11 Ahmed Mumtaz Mustehsan, CIIT, Islamabad 5 You see starvation not only in CPU scheduling but also in various other contexts in operating systems. Resource starvation in general is an issue. CPU starvation can also occur in