Uniprocessor
Scheduling
Csci 430, Spring 2018
Texas A&M University – Commerce
Derek Harter
Introduction
to Operating
System
Concepts
Types of Processor
Scheduling
Objective: Be able to explain the
differences between long-, medium- and
short-term scheduling policies.
Processor Scheduling
Aim is to assign processes to be executed by
the processor in a way that meets system
objectives, such as response time, throughput,
and processor efficiency
Broken down into three separate functions:
– Long-term
– Medium-term
– Short-term
Table 9.1
Types of Scheduling
Scheduling and Process State
Transitions
Figure 9.2
Nesting of
Scheduling
Functions
(Referencing figure 3.9b)
Queuing
Diagram
Long-Term Scheduler
Determines which programs are admitted to the system for
processing
Controls the degree of multiprogramming
the more processes that are created, the smaller the
percentage of time that each process can be executed
may limit to provide satisfactory service to the current set
of processes
Medium-Term
Scheduling
Part of the swapping function
Swapping-in decisions are based on the need
to manage the degree of
multiprogramming
considers the memory requirements of the
swapped-out processes
Short-Term Scheduling
Known as the dispatcher
Executes most frequently
Makes the fine-grained decision of which process to
execute next
Invoked when an event occurs that may lead to the
blocking of the current process or that may provide an
opportunity to preempt a currently running process in favor
of another
Scheduling Algorithms
Objective: Be able to assess the
performance of different scheduling policies
(for the short term scheduler or dispatcher).
Short Term Scheduling
Criteria
Main objective is to allocate
processor time to optimize certain
aspects of system behavior
A set of criteria is needed to
evaluate the scheduling policy
– User vs. system oriented
criteria
Short-Term Scheduling
Criteria: Performance
- Performance related criteria are quantative (can be measured)
- Examples: response time and throughput
- Not performance related are qualitative or not readily measured
- Predictability
Table 9.2
Scheduling
Criteria
Priority
Queuing
Alternative Scheduling
Policies
Selection Function
Determines which process, among ready processes, is selected
next for execution
May be based on priority, resource requirements, or the execution
characteristics of the process
If based on execution characteristics then important quantities
are:
w = time spent in system so far, waiting
e = time spent in execution so far
s = total service time required by the process, including e;
generally, this quantity must be estimated or supplied by the
user
Decision Mode
Specifies the
instants in time
at which the
selection
function is
exercised
Two
categories:
Nonpreemptive
Preemptive
N ...
CPU Scheduling is a process of determining which process will own CPU for execution while another process is on hold. The main task of CPU scheduling is to make sure that whenever the CPU remains idle, the OS at least select one of the processes available in the ready queue for execution.
LEARNING SCHEDULER PARAMETERS FOR ADAPTIVE PREEMPTIONcscpconf
An operating system scheduler is expected to not allow processor stay idle if there is any
process ready or waiting for its execution. This problem gains more importance as the numbers
of processes always outnumber the processors by large margins. It is in this regard that
schedulers are provided with the ability to preempt a running process, by following any
scheduling algorithm, and give us an illusion of simultaneous running of several processes. A
process which is allowed to utilize CPU resources for a fixed quantum of time (termed as
timeslice for preemption) and is then preempted for another waiting process. Each of these
'process preemption' leads to considerable overhead of CPU cycles which are valuable resource
for runtime execution. In this work we try to utilize the historical performances of a scheduler
and predict the nature of current running process, thereby trying to reduce the number of
preemptions. We propose a machine-learning module to predict a better performing timeslice
which is calculated based on static knowledge base and adaptive reinforcement learning based
suggestive module. Results for an "adaptive timeslice parameter" for preemption show good
saving on CPU cycles and efficient throughput time.
CPU Scheduling is a process of determining which process will own CPU for execution while another process is on hold. The main task of CPU scheduling is to make sure that whenever the CPU remains idle, the OS at least select one of the processes available in the ready queue for execution.
LEARNING SCHEDULER PARAMETERS FOR ADAPTIVE PREEMPTIONcscpconf
An operating system scheduler is expected to not allow processor stay idle if there is any
process ready or waiting for its execution. This problem gains more importance as the numbers
of processes always outnumber the processors by large margins. It is in this regard that
schedulers are provided with the ability to preempt a running process, by following any
scheduling algorithm, and give us an illusion of simultaneous running of several processes. A
process which is allowed to utilize CPU resources for a fixed quantum of time (termed as
timeslice for preemption) and is then preempted for another waiting process. Each of these
'process preemption' leads to considerable overhead of CPU cycles which are valuable resource
for runtime execution. In this work we try to utilize the historical performances of a scheduler
and predict the nature of current running process, thereby trying to reduce the number of
preemptions. We propose a machine-learning module to predict a better performing timeslice
which is calculated based on static knowledge base and adaptive reinforcement learning based
suggestive module. Results for an "adaptive timeslice parameter" for preemption show good
saving on CPU cycles and efficient throughput time.
Learning scheduler parameters for adaptive preemptioncsandit
An operating system scheduler is expected to not al
low processor stay idle if there is any
process ready or waiting for its execution. This pr
oblem gains more importance as the numbers
of processes always outnumber the processors by lar
ge margins. It is in this regard that
schedulers are provided with the ability to preempt
a running process, by following any
scheduling algorithm, and give us an illusion of si
multaneous running of several processes. A
process which is allowed to utilize CPU resources f
or a fixed quantum of time (termed as
timeslice for preemption) and is then preempted for
another waiting process. Each of these
'process preemption' leads to considerable overhead
of CPU cycles which are valuable resource
for runtime execution. In this work we try to utili
ze the historical performances of a scheduler
and predict the nature of current running process,
thereby trying to reduce the number of
preemptions. We propose a machine-learning module t
o predict a better performing timeslice
which is calculated based on static knowledge base
and adaptive reinforcement learning based
suggestive module. Results for an "adaptive timesli
ce parameter" for preemption show good
saving on CPU cycles and efficient throughput time.
Optimal Round Robin CPU Scheduling Algorithm using Manhattan Distance IJECEIAES
In Round Robin Scheduling the time quantum is fixed and then processes are scheduled such that no process get CPU time more than one time quantum in one go. The performance of Round robin CPU scheduling algorithm is entirely dependent on the time quantum selected. If time quantum is too large, the response time of the processes is too much which may not be tolerated in interactive environment. If time quantum is too small, it causes unnecessarily frequent context switch leading to more overheads resulting in less throughput. In this paper a method using Manhattan distance has been proposed that decides a quantum value. The computation of the time quantum value is done by the distance or difference between the highest burst time and lowest burst time. The experimental analysis also shows that this algorithm performs better than RR algorithm and by reducing number of context switches, reducing average waiting time and also the average turna round time.
Process management is one of the important tasks performed by the operating system. The performance of
the system depends on the CPU scheduling algorithms. The main aim of the CPU scheduling algorithms is
to minimize waiting time, turnaround time, response time and context switching and maximizing CPU
utilization. First-Come-First-Served (FCFS) Round Robin (RR), Shortest Job First (SJF) and, Priority
Scheduling are some popular CPU scheduling algorithms. In time shared systems, Round Robin CPU
scheduling is the preferred choice. In Round Robin CPU scheduling, performance of the system depends on
the choice of the optimal time quantum. This paper presents an improved Round Robin CPU scheduling
algorithm coined enhancing CPU performance using the features of Shortest Job First and Round Robin
scheduling with varying time quantum. The proposed algorithm is experimentally proven better than
conventional RR. The simulation results show that the waiting time and turnaround time have been reduced
in the proposed algorithm compared to traditional RR.
An Improved Round Robin CPU Scheduling Algorithm with Varying Time QuantumIJCSEA Journal
Process management is one of the important tasks performed by the operating system. The performance of the system depends on the CPU scheduling algorithms. The main aim of the CPU scheduling algorithms is to minimize waiting time, turnaround time, response time and context switching and maximizing CPU utilization. First-Come-First-Served (FCFS) Round Robin (RR), Shortest Job First (SJF) and, Priority Scheduling are some popular CPU scheduling algorithms. In time shared systems, Round Robin CPU scheduling is the preferred choice. In Round Robin CPU scheduling, performance of the system depends on the choice of the optimal time quantum. This paper presents an improved Round Robin CPU scheduling algorithm coined enhancing CPU performance using the features of Shortest Job First and Round Robin scheduling with varying time quantum. The proposed algorithm is experimentally proven better than conventional RR. The simulation results show that the waiting time and turnaround time have been reduced in the proposed algorithm compared to traditional RR.
AN IMPROVED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH VARYING TIME QUANTUMIJCSEA Journal
Process management is one of the important tasks performed by the operating system. The performance of
the system depends on the CPU scheduling algorithms. The main aim of the CPU scheduling algorithms is
to minimize waiting time, turnaround time, response time and context switching and maximizing CPU
utilization. First-Come-First-Served (FCFS) Round Robin (RR), Shortest Job First (SJF) and, Priority
Scheduling are some popular CPU scheduling algorithms. In time shared systems, Round Robin CPU
scheduling is the preferred choice. In Round Robin CPU scheduling, performance of the system depends on
the choice of the optimal time quantum. This paper presents an improved Round Robin CPU scheduling
algorithm coined enhancing CPU performance using the features of Shortest Job First and Round Robin
scheduling with varying time quantum. The proposed algorithm is experimentally proven better than
conventional RR. The simulation results show that the waiting time and turnaround time have been reduced
in the proposed algorithm compared to traditional RR.
TEMPORALLY EXTENDED ACTIONS FOR REINFORCEMENT LEARNING BASED SCHEDULERSijscai
Temporally extended actions have been proved to enhance the performance of reinforcement learning
agents. The broader framework of ‘Options’ gives us a flexible way of representing such extended course of
action in Markov decision processes. In this work we try to adapt options framework to model an operating
system scheduler, which is expected not to allow processor stay idle if there is any process ready or waiting
for its execution. A process is allowed to utilize CPU resources for a fixed quantum of time (timeslice) and
subsequent context switch leads to considerable overhead. In this work we try to utilize the historical
performances of a scheduler and try to reduce the number of redundant context switches. We propose a
machine-learning module, based on temporally extended reinforcement-learning agent, to predict a better
performing timeslice. We measure the importance of states, in option framework, by evaluating the impact
of their absence and propose an algorithm to identify such checkpoint states. We present empirical
evaluation of our approach in a maze-world navigation and their implications on "adaptive timeslice
parameter" show efficient throughput time.
1. Is a smile a universal nonverbal form of communication Why or wh.docxcorbing9ttj
1. Is a smile a universal nonverbal form of communication? Why or why not? Provide specific examples in your answer.
2.
What are some of the ways that you, as an American or an international student, have been taught, or unconsciously learned, to synchronize your nonverbal behaviors?
Part B: Verbal
Instructions:
There are five interrelated sets of rules that combine to create a verbal code or language. In the middle column, define the five verbal rules that create the verbal code in a minimum of two sentences for each rule. In the last column, provide an example from both American culture and an international culture for each of the five rules of verbal codes. Then answer the questions on the following page.
Rule set
Definition
(2 or more sentences)
Examples
(1 American culture example and
1 international culture example)
(1) Phonology
(rules for word sounds)
(2) Morphology
(units of meaning in a word)
(3) Semantics
(distinct meaning of words)
(4) Syntax
(relationship of words to each other)
(5) Pragmatics
(effect on human perception)
1. What is one possible drawback of phonology if a nonnative speaker has poor accuracy? What might be done to master a new phonology?
2. What happens in the course of conversation when semantics causes confusion between you and the receiver? Provide a recent example.
3. what do you think Ludwig Wittgenstein meant when he said that “the limits of my language are the limits of my world”?
.
1. IntroductionWritten and Narrated by Professor Deni ElliottThe.docxcorbing9ttj
1. Introduction
Written and Narrated by Professor Deni Elliott
There are so many considerations in making ethical decisions, but what consideration is most important? Different cultures and ethical systems have produced theories that favor one consideration over others. The consideration that a theory favors is called a Fundamental Moral Unit, or FMU.
Many of the classical Western philosophers from the Greek and roman traditions favor the individual as the Fundamental Moral Unit. In these theories, the primary dictate is a negative statement: Don’t get in an individual’s way in his or her pursuit of the good life.
Feminist theories tend to determine the best choice based on how well those choices strengthen the connections among people and how well the needs of the most vulnerable are addressed. The fundamental moral unit here is relationship between people and is based on the belief that care should be given to those who can’t take care of themselves.
Some Eastern theories promote the overall good of the community first and foremost. And some indigenous theories stress human’s connection with the world as a whole, with all natural systems and species having an equal right to co-exist. People who grow up in these traditions expect that they and others will sacrifice individual self-interest for the good of the group and the environment. The Fundamental Moral Unit here is called "aggregate good."
Let’s consider a decision you might encounter if you were a member of your local city council. There is a 50 acre parcel of land in your city’s jurisdiction that was designated a hundred years ago to remain open space. Now the area contains some ancient Native burial grounds, but the tribe members a hundred years and tribe members today are happy with the designated use as long as the woodlands around the burial mounds stay intact. A developer would like to build a shopping mall there. As a city council member, you get to decide how that land will be used today: should it remain a park or become a shopping mall?
If you make your choice based only on the good that comes to individuals, you might be tempted to go with the shopping mall. The mall will provide jobs for many of the people in the community who are out of work and the additional income from the taxes from the new property owner and the businesses will allow the city to reduce taxes for individual home owners.
Which choice best advances the overall good of the community in which I live? The policy choice made previously to protect the land respected human connections to natural systems and was sensitive to the culture and history of a minority group. Affirming that decision helps all people in the community maintain trust in government.
We can see how the teachings from all of these traditions can help us in analyzing an important choice. And they can help us answer one more question: Can I find a choice that doesn’t cause harm to anyone or anything? If a shopping mall is a good idea for the .
More Related Content
Similar to Uniprocessor SchedulingCsci 430, Spring 2018Texas A&
Learning scheduler parameters for adaptive preemptioncsandit
An operating system scheduler is expected to not al
low processor stay idle if there is any
process ready or waiting for its execution. This pr
oblem gains more importance as the numbers
of processes always outnumber the processors by lar
ge margins. It is in this regard that
schedulers are provided with the ability to preempt
a running process, by following any
scheduling algorithm, and give us an illusion of si
multaneous running of several processes. A
process which is allowed to utilize CPU resources f
or a fixed quantum of time (termed as
timeslice for preemption) and is then preempted for
another waiting process. Each of these
'process preemption' leads to considerable overhead
of CPU cycles which are valuable resource
for runtime execution. In this work we try to utili
ze the historical performances of a scheduler
and predict the nature of current running process,
thereby trying to reduce the number of
preemptions. We propose a machine-learning module t
o predict a better performing timeslice
which is calculated based on static knowledge base
and adaptive reinforcement learning based
suggestive module. Results for an "adaptive timesli
ce parameter" for preemption show good
saving on CPU cycles and efficient throughput time.
Optimal Round Robin CPU Scheduling Algorithm using Manhattan Distance IJECEIAES
In Round Robin Scheduling the time quantum is fixed and then processes are scheduled such that no process get CPU time more than one time quantum in one go. The performance of Round robin CPU scheduling algorithm is entirely dependent on the time quantum selected. If time quantum is too large, the response time of the processes is too much which may not be tolerated in interactive environment. If time quantum is too small, it causes unnecessarily frequent context switch leading to more overheads resulting in less throughput. In this paper a method using Manhattan distance has been proposed that decides a quantum value. The computation of the time quantum value is done by the distance or difference between the highest burst time and lowest burst time. The experimental analysis also shows that this algorithm performs better than RR algorithm and by reducing number of context switches, reducing average waiting time and also the average turna round time.
Process management is one of the important tasks performed by the operating system. The performance of
the system depends on the CPU scheduling algorithms. The main aim of the CPU scheduling algorithms is
to minimize waiting time, turnaround time, response time and context switching and maximizing CPU
utilization. First-Come-First-Served (FCFS) Round Robin (RR), Shortest Job First (SJF) and, Priority
Scheduling are some popular CPU scheduling algorithms. In time shared systems, Round Robin CPU
scheduling is the preferred choice. In Round Robin CPU scheduling, performance of the system depends on
the choice of the optimal time quantum. This paper presents an improved Round Robin CPU scheduling
algorithm coined enhancing CPU performance using the features of Shortest Job First and Round Robin
scheduling with varying time quantum. The proposed algorithm is experimentally proven better than
conventional RR. The simulation results show that the waiting time and turnaround time have been reduced
in the proposed algorithm compared to traditional RR.
An Improved Round Robin CPU Scheduling Algorithm with Varying Time QuantumIJCSEA Journal
Process management is one of the important tasks performed by the operating system. The performance of the system depends on the CPU scheduling algorithms. The main aim of the CPU scheduling algorithms is to minimize waiting time, turnaround time, response time and context switching and maximizing CPU utilization. First-Come-First-Served (FCFS) Round Robin (RR), Shortest Job First (SJF) and, Priority Scheduling are some popular CPU scheduling algorithms. In time shared systems, Round Robin CPU scheduling is the preferred choice. In Round Robin CPU scheduling, performance of the system depends on the choice of the optimal time quantum. This paper presents an improved Round Robin CPU scheduling algorithm coined enhancing CPU performance using the features of Shortest Job First and Round Robin scheduling with varying time quantum. The proposed algorithm is experimentally proven better than conventional RR. The simulation results show that the waiting time and turnaround time have been reduced in the proposed algorithm compared to traditional RR.
AN IMPROVED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH VARYING TIME QUANTUMIJCSEA Journal
Process management is one of the important tasks performed by the operating system. The performance of
the system depends on the CPU scheduling algorithms. The main aim of the CPU scheduling algorithms is
to minimize waiting time, turnaround time, response time and context switching and maximizing CPU
utilization. First-Come-First-Served (FCFS) Round Robin (RR), Shortest Job First (SJF) and, Priority
Scheduling are some popular CPU scheduling algorithms. In time shared systems, Round Robin CPU
scheduling is the preferred choice. In Round Robin CPU scheduling, performance of the system depends on
the choice of the optimal time quantum. This paper presents an improved Round Robin CPU scheduling
algorithm coined enhancing CPU performance using the features of Shortest Job First and Round Robin
scheduling with varying time quantum. The proposed algorithm is experimentally proven better than
conventional RR. The simulation results show that the waiting time and turnaround time have been reduced
in the proposed algorithm compared to traditional RR.
TEMPORALLY EXTENDED ACTIONS FOR REINFORCEMENT LEARNING BASED SCHEDULERSijscai
Temporally extended actions have been proved to enhance the performance of reinforcement learning
agents. The broader framework of ‘Options’ gives us a flexible way of representing such extended course of
action in Markov decision processes. In this work we try to adapt options framework to model an operating
system scheduler, which is expected not to allow processor stay idle if there is any process ready or waiting
for its execution. A process is allowed to utilize CPU resources for a fixed quantum of time (timeslice) and
subsequent context switch leads to considerable overhead. In this work we try to utilize the historical
performances of a scheduler and try to reduce the number of redundant context switches. We propose a
machine-learning module, based on temporally extended reinforcement-learning agent, to predict a better
performing timeslice. We measure the importance of states, in option framework, by evaluating the impact
of their absence and propose an algorithm to identify such checkpoint states. We present empirical
evaluation of our approach in a maze-world navigation and their implications on "adaptive timeslice
parameter" show efficient throughput time.
1. Is a smile a universal nonverbal form of communication Why or wh.docxcorbing9ttj
1. Is a smile a universal nonverbal form of communication? Why or why not? Provide specific examples in your answer.
2.
What are some of the ways that you, as an American or an international student, have been taught, or unconsciously learned, to synchronize your nonverbal behaviors?
Part B: Verbal
Instructions:
There are five interrelated sets of rules that combine to create a verbal code or language. In the middle column, define the five verbal rules that create the verbal code in a minimum of two sentences for each rule. In the last column, provide an example from both American culture and an international culture for each of the five rules of verbal codes. Then answer the questions on the following page.
Rule set
Definition
(2 or more sentences)
Examples
(1 American culture example and
1 international culture example)
(1) Phonology
(rules for word sounds)
(2) Morphology
(units of meaning in a word)
(3) Semantics
(distinct meaning of words)
(4) Syntax
(relationship of words to each other)
(5) Pragmatics
(effect on human perception)
1. What is one possible drawback of phonology if a nonnative speaker has poor accuracy? What might be done to master a new phonology?
2. What happens in the course of conversation when semantics causes confusion between you and the receiver? Provide a recent example.
3. what do you think Ludwig Wittgenstein meant when he said that “the limits of my language are the limits of my world”?
.
1. IntroductionWritten and Narrated by Professor Deni ElliottThe.docxcorbing9ttj
1. Introduction
Written and Narrated by Professor Deni Elliott
There are so many considerations in making ethical decisions, but what consideration is most important? Different cultures and ethical systems have produced theories that favor one consideration over others. The consideration that a theory favors is called a Fundamental Moral Unit, or FMU.
Many of the classical Western philosophers from the Greek and roman traditions favor the individual as the Fundamental Moral Unit. In these theories, the primary dictate is a negative statement: Don’t get in an individual’s way in his or her pursuit of the good life.
Feminist theories tend to determine the best choice based on how well those choices strengthen the connections among people and how well the needs of the most vulnerable are addressed. The fundamental moral unit here is relationship between people and is based on the belief that care should be given to those who can’t take care of themselves.
Some Eastern theories promote the overall good of the community first and foremost. And some indigenous theories stress human’s connection with the world as a whole, with all natural systems and species having an equal right to co-exist. People who grow up in these traditions expect that they and others will sacrifice individual self-interest for the good of the group and the environment. The Fundamental Moral Unit here is called "aggregate good."
Let’s consider a decision you might encounter if you were a member of your local city council. There is a 50 acre parcel of land in your city’s jurisdiction that was designated a hundred years ago to remain open space. Now the area contains some ancient Native burial grounds, but the tribe members a hundred years and tribe members today are happy with the designated use as long as the woodlands around the burial mounds stay intact. A developer would like to build a shopping mall there. As a city council member, you get to decide how that land will be used today: should it remain a park or become a shopping mall?
If you make your choice based only on the good that comes to individuals, you might be tempted to go with the shopping mall. The mall will provide jobs for many of the people in the community who are out of work and the additional income from the taxes from the new property owner and the businesses will allow the city to reduce taxes for individual home owners.
Which choice best advances the overall good of the community in which I live? The policy choice made previously to protect the land respected human connections to natural systems and was sensitive to the culture and history of a minority group. Affirming that decision helps all people in the community maintain trust in government.
We can see how the teachings from all of these traditions can help us in analyzing an important choice. And they can help us answer one more question: Can I find a choice that doesn’t cause harm to anyone or anything? If a shopping mall is a good idea for the .
1. IntroductionThe objective of this video is to introduce studen.docxcorbing9ttj
1. Introduction:
The objective of this video is to introduce students to the fundamental attribution error and its implications. One implication is that we often have a tendency to judge others unfairly because we do not take into account the situational factors that may have caused them to make unethical decisions. We jump to the conclusion that they are bad people because they did a bad thing. That said, it is important to remember that situational factors are usually explanations for while people err, they are not excuses. The best way to avoid this error, experts say, it to put ourselves in the shoes of others and try to envision the pressures they might have faced.
The other implication of the fundamental attribution error is that we may be too easy on ourselves, if we are not careful. We may too readily find situational factors, organizational pressures and the like and then simply excuse our own conduct.
The fundamental attribution error is the tendency to attribute "causes of behavior to actors (i.e., internal, dispositional factors) rather than the situation (i.e., external, environmental factors." We see that other people have done bad things, and we assume that it is because of their character rather than the fact that they were, perhaps, striving so hard to please their superiors that they did not even notice the ethical issue that they flubbed.
According to some psychologists, the other side of the coin from the fundamental attribution error is the actor-observer bias which is people’s tendency to over-emphasize the role of the situation in their own behaviors. They insist there’s nothing wrong with their character, because their errors are accounted for by some situational factor—the boss’s pressure, the need to feed their families, etc.
Francesca Gino writes: "In particular, one mistake we systematically make is known as the correspondence bias. When making attributions as we evaluate others, we tend to ascribe too little influence to the situation and too much to their dispositions. In simpler terms, we tend to believe that people’s behavior reflects their unique dispositions and skills, when many times it actually reflects aspects of the situation in which they find themselves." This sounds a lot like a different name for the fundamental attribution error.
2. Task – Watch the videos:
https://www.youtube.com/watch?v=mDhiyPAD6NQ
3. Activities:
1. If you met a famous white-collar criminal, what would you expect him (or, occasionally, her) to be like?
2. Why do you think it is so common to hear white collar criminals described by their neighbors as "the nicest guy," "a real family man," etc.?
3. Can you think of things that you have done in the past that you wish you hadn’t and that you do not believe represent your true character?
4. How can we endeavour to judge people’s character more accurately?
.
1. In the following sentence, which words are used as adjectivesT.docxcorbing9ttj
1. In the following sentence, which words are used as adjectives?
The golden rays of the bright sun reflected off the clear waters of the calm lake.
A. The, of, in, clear, and calm
B. Golden, rays, clear, and waters
C. The, rays, the, sun, the, waters, the, and lake
D. The, golden, the, bright, the, clear, the, and calm
2. In the following sentence, identify the prepositional phrase, and tell whether it acts as an adjective or
adverb.
The children found the pictures in the book interesting.
A. The children; adjective
B. in the book; adjective
C. found the pictures; adverb
D. the pictures in; adjective
3. In the following sentence, which words are nouns?
During their vacation, Sarah and Matthew read the same book.
A. vacation, Sarah, Matthew, and book
B. their and book
C. vacation and book
D. Sarah, Matthew, the, and book
4. A common term for photographs, cartoons, advertisements, illustrations, drawings, PowerPoint slides,
and graphics used to help present information is
A. representers.
B. sight perks.
C. ocular enhancements.
D. visuals.
5. Which of the following is not a common sentence error?
A. Mixed construction
B. Prepositional phrase
C. Fragment
D. Run-on
6. Which of the following words would require the article a, instead of an?
A. Hotel
B. Honest
C. Elderly
D. Igloo
7. Which of the following correctly describes connotation?
A. An implied meaning of word understood by language users
B. The meaning of a word that has never changed
C. A new word added to the dictionary
D. The pronunciation of a word
8. What is the difference between abstract nouns and concrete nouns?
A. Abstract nouns describe something, but concrete nouns don't.
B. Concrete nouns can be identified by the senses, but abstract nouns can't.
C. There is no difference.
D. Abstract nouns are specific, but concrete nouns aren't.
9. Which of the following is an antonym of the word happy?
A. Joyful
B. Miserable
C. Jovial
D. Blissful
10. Which of the following is a false statement about a basic dictionary?
A. In a basic dictionary, pictures are provided of every word.
B. Various types of words are included a basic dictionary.
C. The pronunciation of words is provided in a basic dictionary.
D. A basic dictionary is organized in alphabetical order.
11. Which of the following is not a synonym of the word beautiful?
A. Gorgeous
B. Attractive
C. Gritty
D. Stunning
12. In the following sentence, to which antecedent is the pronoun referring?
After Denise went to the grocery store, she stopped at the gas station.
A. store
B. Denise
C. she
D. station
13. Which of the following is an example of a third-person pronoun?
A. Ourselves
B. Yourselves
C. Them
D. Us
14. Which of the following is a correct statement about punctuation?
A. Each direct question should end with a period.
B. Punctuation marks show pauses, inflection, and emphasis.
C. Punctuation is usually an extra, unnecessary part of a sentence.
D. The two types of punctuation are beginning and external.
15. Which of the following is.
1. In the song Tonight from the musical West Side Story, the compo.docxcorbing9ttj
1. In the song "Tonight" from the musical West Side Story, the composer distributed two basic melodies
among different characters to create a kind of _______, in which nothing disappears but new layers are
constantly introduced.
A. dissonant form
B. layered presence
C. additive form
D. consonant counterpoint
2. The type of music that blended the musical styles of jump blues and honky-tonk was
A. rock 'n' roll.
B. hip hop.
C. jazz.
D. Motown.
3. _______ works are often playful in spirit, a reaction against the unrelenting seriousness of much
modernist art.
A. Postmodern
B. Neoclassical
C. Minimalist
D. Concerto
4. A modern-day retelling of Shakespeare's Romeo and Juliet is carried out in the musical
A. My Fair Lady.
B. The Mikado.
C. H.M.S. Pinafore.
D. West Side Story.
5. Which of the following musicals was the first to tackle the issue of racism?
A. Show Boat
B. My Fair Lady
C. Rent
D. South Pacific
6. A musical style that combines traditional and modern elements is called
A. exhibitionism.
B. postmodernism.
C. minimalism.
D. modernism.
7. Minimalist techniques have been applied in many different kinds of music, including
A. reggae.
B. hip-hop.
C. rock ‘n' roll.
D. techno.
8. Aaron Copland varies the _______ throughout his movement "Hoe-Down" to create variety.
A. theme
B. scene
C. movements
D. orchestration
9. Public Enemy's abrasive rap recording "Fight the Power" has a basic pulse of _______ beats per minute.
A. 60
B. 120
C. 106
D. 86
10. The _______ were interested in the hypnotic quality of the repeated melodic fragments and interlocked
patterns created by the gamelan.
A. minimalists
B. nationalists
C. impressionists
D. neoclassicists
11. Which of the following composers wrote the music for West Side Story?
A. Cole Porter
B. George M. Cohan
C. Jerome Kern
D. Leonard Bernstein
12. A chromatic scale consists entirely of
A. whole steps.
B. quarter steps.
C. half steps.
D. tonal centers.
13. Notes that begin a phrase before a downbeat are known as pick-up notes, or a/an
A. anacrusis.
B. shuffle groove.
C. call and response.
D. duck walk.
14. Which composer engaged in scholarly studies that focused on the social dimension of music and the
ways it's used within and between cultures?
A. John Williams
B. Béla Bartók
C. Leonard Bernstein
D. John Cage
15. Debussy's Voiles was inspired by a Javanese ensemble known as a
A. gong.
B. wave.
C. quartet.
D. gamelan.
16. On whose show did Elvis Presley make his famous debut?
A. Dick Clark
B. Ed Sullivan
C. Milton Berle
D. Steve Allen
17. Which composer's work has been likened to Brahms and Dvořák?
A. John Cage
B. Austin Wintory
C. John Williams
D. Philip Glass
18. Which of the following works can be likened to program music?
A. Sonata II
B. Concerto for Orchestra
C. "Nascence"
D. Concertino for Harp and Orchestra
19. What does the word kebyar mean?
A. Explosive
B. Ensemble
C. Shimmering
D. Interlocking
20. Which of the following is used in Sonata II's prepared piano?
A. Small pieces of rubber
B. Copper w.
1. IT Diffusion Models Please respond to the followingReview th.docxcorbing9ttj
1. "IT Diffusion Models" Please respond to the following:
Review the IT diffusion models, select two models, then compare and contrast how these models would facilitate a company in the country and business sector of your choice. Be sure to state your business sector. Then, explain how the IT diffusion models may affect it.
Describe the process of how a non-IT senior manager would arrive at the decision to support one IT diffusion model over another. List the factors that would have to be considered. Determine which model you would choose and explain why.
.
1. In many ways the underworld was considered dangerous, but there w.docxcorbing9ttj
1. In many ways the underworld was considered dangerous, but there were also benefits for the deceased. Explain how it was important for kings to build their funeray toms as part of the sun god's cycle.
2. explain how king hatsheput came into rule during the 18th dynasty
3. which king had the largest funerary complex at thebes?
a. KING THUTMOSEIII B KING HATSHEPSSET C KING AMENHOTEP D KING THUTMOSEI
4. red quartzite shrines were build into temples to ser down the sacred_________ caarying the cult statue of the deity.
5, Red graniti was used in status as a symbolic statement about the kings connections to deities and the sun. a True B False
6. King amenhotep's depictions underwent a phyical change after his first sed--------festival at the temple of luxor. what was different about his characteristic, and what did he own wear?
7. Both palaces and temples were built as microcosms of the world fromits very beggining A True B False
8. In contrast to the temples, there was little decorating relating directly to the deites instead, what type of images would your find in a palace?
9. durinf the festival of the wadi the living crossed to the west bank to visit their tombs of their relatives during this cisit, they would share meals and drink, hunt and fish perform the openning of the mouth ceremony manufacture jewelry and other precious objects.
10. often the store in rock-cut tombs was too poor in quality to create reliefs.describe the decoration technique used in these situations.
11. pleasted garments, such as those shown on this wooden statue, became fashion able in the late ________dynasty
a. 16th
b 18th
c 20th
d 21st
12. this eye symbol called a______ is associated with the god hours and was often depicted on amulets on coffins. the drop and spiral imitate the making of a falcon, and represents healing and making whole.
13. the goddess_______ is represented as a vuhiere with outstretched wings and included in funerary at the temple of king hatsheppsut basket, nekhbet, ma'at, sekment
14. many time statues would be holding nujars, and the hieroglyph of the nu-jar generally meantr what? protection, re-birth, to offer, sacred sun
15. why does king hat shepsut generally dissapear from sources, even after her reign was considered succeeeful?
16. describe what a stelophorous statue looks like.
17. due to king, amenhotp's increased on the solar aspects of deites, large open,________ counts were now individual in many temple complexes.
18. On stela depictions in the 18th dynasty only royal and divine figures would be placed below the sun disk a True B False
Please anser each question and send it back by each question
.
1. In Jules Henry’s view, how are values and drives related to e.docxcorbing9ttj
1.
In Jules Henry’s view, how are values and drives related to each other? (Points : 1)
Values determine how people behave, while drives are ways of acting that are required by circumstances.
Values are what people care enough to follow through on, while drives are followed out of necessity.
Values are ideals that people do not necessarily pursue, while drives are the motives people actually pursue.
They are synonyms.
Question 2.
2.
Which of the following best characterizes culture? (Points : 1)
A culture is a homogeneous system.
A culture can best be described as a simple listing of various characteristics.
A culture is a dynamic system.
Some cultures are dynamic, while others are stable.
Question 3.
3.
Which of the following theoretical perspectives distinguishes cultural anthropology from other disciplines? (Points : 1)
Humanism
Holism
Materialism
Ethnocentrism
Question 4.
4.
Which of the following is true of a belief system’s influence on how people think? (Points : 1)
Beliefs have no relationship to feelings.
In every culture, some beliefs are set forth as proper ways of thinking.
Beliefs are controlled by reality, not by culture.
Individuals may freely deviate from others in their beliefs with no likelihood of punishment.
Question 5.
5.
Sir Edward Burnett Tylor’s concept of survivals is best defined by which of the following? (Points : 1)
Cultural traits change the least because they are the means by which a society copes with its environment.
Primitive cultures have avoided extinction as more complex ways of life developed.
Evidence of major catastrophic events in the past.
Remnants of earlier social customs and ideas aid in reconstructing the evolutionary past of societies.
Question 6.
6.
Which of the following best defines culture? (Points : 1)
Learned system of beliefs, feelings, and rules that organize people’s lives
The pattern of a people’s customs
A people’s rules for living, based on a pattern of legal concepts
Biologically predetermined behavior patterns
Question 7.
7.
Ruth Benedict’s major contribution to the history of anthropology was which of the following ideas? (Points : 1)
Cultural traits have functions.
Ways of life are integrated wholes.
Cultures are dynamic.
Not all customs are functional.
Question 8.
8.
Values are (Points : 1)
descriptions of what is true or false.
feelings about what is true or false about the world.
feelings about what should or should not be considered good or bad.
feelings about personal likes and dislikes.
Question 9.
9.
Which of the following is NOT true of how children learn their culture? (Points : 1)
Acceptable behavior is often contrasted with unacceptable behavior.
Children observe and imitate others.
A sense of cooperation with.
1. If I wanted to test a certain chemical to see if it made mice run.docxcorbing9ttj
1. If I wanted to test a certain chemical to see if it made mice run faster. What steps would I take to test that? What would be my control? Form a hypothesis.
2. Which requires more energy? A reaction with an enzyme or a reaction without an enzyme?
3.Which has more energy? ATP or ADP?
4. Which has more potential energy? A ball on the ground or a ball at the top of a slide?
5. If I had an unknown liquid, how could I test to see if it was polar or non polar?
6. What are three characteristics of water that are
essential
to life on earth? And what makes them essential to life?
7. Which has more calories? 1 gram of carbohydrate, 1 gram of protein, or 1 gram of lipids?
8. If a scientist asks you to have "faith" in his science, what would you tell them?
9. Which requires more energy? Passive transport or active transport?
10. If cells lacked cholesterol, what would be the consequences to the cell membrane?
11. If I wanted to make a bean plant with a gene from a apple tree in it- What would be the first few steps I would have to take in the lab?
12. If I was given an unknown liquid and asked to find it's density, how could I do that?
13. If I put pure water into a bag made of a semi permeable membrane and place it into salt water. What will happen to the volume of the water in the bag and why?
14. What is the highest level of protein folding?
15. Why is the lipid bilayer referred to as a fluid and mosaic?
16.How many bonds can carbon make?
17. How many protons are in a Helium atom? And where in the atom are the protons?
18. If something is acidic, does it have a high or low pH? A high or low H+ concentration? Name an acidic liquid in your house.
19. What is something that has some of the characteristics of life, but, is not alive. Describe it and what characteristics of life it might have.
20.Why is it important to test insecticides and chemicals before releasing them into the environment?
.
1. Identify a community or aggregate you are currently involved wi.docxcorbing9ttj
1.
Identify a community or aggregate you are currently involved with at home (personal life) or at work. Cite some major value, major strengths, and health needs of your community or aggregate. How could a nurse work collaboratively with a community to build on these strengths and facilitate community empowerment? Keep in mind the different methods of community outreach the nurse could utilize.
2. Assurance is one of the three core functions of public health. Knowing what resources are available is part of this function. Find a resource in your community that could be used as a referral source and share information about the services provided. Who is eligible for the services? What could be done in order to improve the accessibility, acceptability, affordability, or availability of this resource in your community? Make sure to address all four of the A’s.
3. Spend time either walking around or sitting and watching people in a very busy public place. Look for things that you associate with people from race/ethnic, cultural, gender, and social-class backgrounds that are different from your own. Look for the kinds of common interactions or behaviors between different groups and those like your own. For example, do they acknowledge the other's presence if eye contact happens to occur? Do any behaviors change in the presence of other groups?
Consider what you expect to see based on your assumptions and understandings about persons of different backgrounds (how you expect them to dress, walk, talk, interact with each other, interact with others, etc). Make note of those things that catch your attention. Pay special attention to what you don't see as well. In two to three paragraphs, share your observations with the class. Please begin with, "In my observation..."
4. When traveling to other countries for business, it is important to know the male/female roles in each country. Not knowing these roles could cause problems in discussions and negotiations. If you were traveling to Saudi Arabia, New Zealand, Brazil, Thailand, the Czech Republic, Russia, or Rwanda, what would you need to know about the traditional male/female roles? Search the Internet for one or more of the above countries to find out about male/female roles. Share your findings with the class.
.
1. Identify and describe the steps of the scientific method. Which o.docxcorbing9ttj
1. Identify and describe the steps of the scientific method. Which observations do you think the scientists made leading up to this research study? Given your understanding of the experimental design, formulate a specific hypothesis that is being tested in this experiment. Describe the experimental design including control and treatment group(s), and dependent and independent variables. Summarize the results and the conclusion
.
1. How many time zones are there across the world2. Which map wou.docxcorbing9ttj
1. How many time zones are there across the world?
2. Which map would have the largest scale? a) city b) continent c) state d) world
3. Which method of data acquisition is not considered to be in the class of remote sensing? a) aerial photography b) weather satellite data c) landsat satellite data d) rain gauge data
4. Lines of latitude run (N/S or E/W) around the globe and are measured (N/S or E/W) of the Equator. Lines of longitude run (N/S or E/W) around the globe and are measured (N/S or E/W) of the Prime Meridian.
5. The world soil map has strong resemblance to the world climate map. Discuss the reasons for the similarities and differences between the two.
6. What is the external fuel that drives the atmosphere?
7. At the Tropic of Cancer the Sun is directly overhead at noon on the a) vernal equinox b) summer solstice c) autumnal equinox d) winter solstice
8. Which area receives the most seasonal variation in incoming radiation? a) equator b) high latitudes c) low latitudes d) tropics
9. What is word that means "the maximum amount of water vapor the air can hold"?
10. What is an urban heat island?
11. Precipitation occurs because air is warmed adiabatically as it rises. (True or False)
12. Periods of increasing glacier mass would likely be accompanied by decreasing ocean levels. (True or False)
13. Describe the greenhouse effect in terms of radiant energy exchanges.
14. What is "an extremely long ocean wave created by an underwater earthquake"?
15. Earthquakes are most likely to occur: a) in the center of tectonic plates b) at the equator c) where two tectonic plates meet d) none of the above
16. The place where the Earth's crust actually moves is the ____________ of an earthquake.
17. Most rivers have relatively gentle gradients in the headwaters and steep gradients in their downstream portions. (True or False)
18. Would one expect to find more soluble materials in the soil of an arid region or the soil of a humid region? Why?
19. What is the difference between mass movement and erosion?
20. What type of vegetation is dominant in savannas? (Be specific.)
.
1. How has society responded to coastal changes initiated by sand tr.docxcorbing9ttj
1. How has society responded to coastal changes initiated by sand transportation, and have these responses been wise environmentally and economically?
2.
What is the major danger of hurricanes to coastal areas and how has the federal government historically responded? Explain.
******Answers must be in APA format. Please cite reference(s) and page number for each question. Thanks
.
1. How has the economic geography of this region changed over the .docxcorbing9ttj
1. How has the economic geography of this region changed over the past few decades? Please discuss how globalization and outsourcing has impacted this entire region in terms of geography.
PART I: MAP ACTIVITY
Use the map below to identify all numbered areas.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
PART II: SHORT ESSAY
Please answer the following question in a 1-2 page short essay using APA Format.
Please be sure to use the course readings and/or other outside documented research to support all of your ideas, facts, and opinions.
Pick any individual country in
South, East, or Southeast Asia Realms and Regions
and then describe and explain its individual physical, historical, economic, political, cultural/human, and religious/spiritual geography.
How and why is it different than the countries it borders?
What future challenges do you see for this country?
Have you ever visited this country before?
Would you like to if you have not?
Why or why not?
PART III: GEOGRAPHY JOURNAL
Task #1.
Please utilize LIRN (you may visit the Academic Resource Center for a guide on how to utilize LIRN successfully) and search for one peer reviewed research article that covers any of the following:
identify the defining criteria for geographic realms and regions.
analyze geography’s spatial perspective as it applies to human activity.
differentiate among the major elements of the natural environment and their general geographic characteristics.
name and locate the three largest world population clusters.
examine the concept of cultural landscape.
explain the meaning of state.
analyze the spatial dimensions of economic development and the World Bank’s global classification scheme.
Then write a 1-2 page review/reaction/reflection paper describing that article using APA format (please visit the Academic Resource Center for a concise guide on APA format).
Be sure to include the following:
Goals/Objectives
: What is the purpose of the article?
What does it attempt to solve, determine, or demonstrate?
Data
: Which data are assessed or analyzed to determine if the goals/objectives are met?
Methods
: What specific methodology is used to analyze the data in the context of the goals?
Analysis/Conclusion
: What resulted from methods being applied to the data?
What do the author(s) conclude from the analysis or how do they interpret the analysis/results?
Your critical review of the article must include the following:
Assessment
: Were the goals and objectives clearly stated?
Did the goals match the methods and results?
Was the article easy to follow?
Importance
: What, in your view, is the importance of this research?
What impact
does
knowing this have on geography?
Improvement
: What, if anything, could the author(s) have done to impro.
1. Important nurses of the 19th century are often overshadowed by Ni.docxcorbing9ttj
1. Important nurses of the 19th century are often overshadowed by Nightingale’s prominence. Select one 19th century nurse other than Nightingale and describe his/her contributions to the profession.
2. Usability and interoperability are major issues to consider in the development of healthcare information systems (HIS). How does your organization address these issues? Does the transfer of information occur smoothly, or do you need to re-enter data from one application to the next—such as patient information from the emergency room that does not transfer—along with the patient who is admitted to the critical care unit? Or what happens when the patient is discharged and the home care nurses have to start from scratch as they prepare the patient’s plan of care?
3. This week's lesson points out key concepts in searching the National Library of Medicine's PubMed/MEDLINE database, your schools Library's EBSCO/CINAHL database, and Google Scholar. This week’s lesson directs you to links and resources on the basics of searching these three information sources. The tutorials are very helpful. You are strongly urged to view them prior to posting.
Locate one article in each of the data sources and briefly summarize each article.
.
1. In what ways did the Columbian Exchange impact the Americas, .docxcorbing9ttj
1. In what ways did the Columbian Exchange impact the Americas, Europe, and Africa?
2. The Puritans of Massachusetts Bay fled an established church and religious persecution in England. Why, then, did they promptly establish their own church and persecute dissenters?
3. What role did the colonies play in the British mercantilist system?
4. In what ways did “Salutary Neglect” influence future calls for independence?
Need at least 270 words and at least 2 citations
.
1. How did the conditions of life among descendants of African Slave.docxcorbing9ttj
1. How did the conditions of life among descendants of African Slaves in post-colonial Jamaica contribute to the origins of the Rastafarian tradition?
2. Mention and describe into details two ritual processes associated with the Rastafarian tradition.
3. In what ways are the Rastafarians counter-hegemonic?
Each question needs to be no less than 500 words each for a total of 1,500 words.
***Assignment is due Sunday April 19th, 2015 at 10:00pm EASTERN TIME***
.
1. If you adopt the _______ perspective, youll reject an emphasis o.docxcorbing9ttj
1. If you adopt the _______ perspective, you'll reject an emphasis on what goes on in people's minds in
favor of focusing on measurable behaviors that can be objectively measured.
A. psychodynamic
B. cognitive
C. behavioral
D. neuroscience
2. Among his oil-field buddies, Conrad was known as a cheerfully profane hard drinker who was seldom
averse to a barroom scrap. But, after he suffered a head injury in a car accident he returned to work as a
docile, timid man who could no longer deal with the violent activity of a drill rig platform. His physicians
determined that damage to his __________ was the likely cause of his changed behavior.
A. amygdala
B. cerebellum
C. thalamus
D. hippocampus
3. The left hemisphere of the cerebral cortex is more specialized in language functions and processing
information sequentially. The right hemisphere tends to specialize in spatial perception and distinguishing
patterns. These are examples of cortex
A. lateralization.
B. adaptation.
C. neuroplasticity.
D. evolution.
4. Among the advanced technologies used to study the brain's structure and functions, which one provides
detailed three-dimensional images of the brain's structures and activities?
A. Positron emission tomography
B. Functional magnetic resonance imaging
C. Electroencephalogram
D. Transcranial magnetic stimulation
5. A reflex, like automatically removing your hand from a hot stove, involves pain messages sent to the
spinal cord by way of _______ neurons, while the movement of your hand is controlled by _______
neurons.A. somatic; sensory
B. somatic; sympathetic
C. motor; sensory
D. sensory; motor
6. I study a sample of 100 high school students and find that student IQ scores increase significantly as the
level of reported parental income increases. I can conclude from this that
A. there's a negative relationship between parental income and children's IQ scores.
B. there's a positive correlation between parental income and children's IQ scores.
C. higher parental income causes an increase in children's IQ scores.
D. students get smarter when their parents earn more money.
7. Regarding the association areas of the cerebral cortex, which of the following statements is most
accurate?
A. Changes in personality may indicate damage to the association areas.
B. Most association areas are located in the left cerebral hemisphere.
C. The association areas are largely responsible for neurogenesis.
D. Association areas are to thinking as neuroplasticity is to language.
8. Under Weber's law, we'll notice a stimulus difference such that it will be a constant proportion of the
intensity of the initial stimulus. Thus, for weight, we'll notice a one-ounce difference in a weight of 50
ounces. Weber's law applies most directly to the concept of
A. perceived stimulus.
B. difference threshold.
C. absolute threshold.
D. sensory adaptation.
9. Agatha maintains that people are capable of freely making voluntary choices. Constance is mainly
focused on .
1. How are information systems transforming business and what is the.docxcorbing9ttj
1. How are information systems transforming business and what is their relationship to globalization? Give examples to illustrate your answer.
2. How do enterprise applications, collaboration and communication systems, and intranets improve organizational performance? Give examples to illustrate your answer
.
1. How can Fiedlers theory of the least preferred coworker help man.docxcorbing9ttj
1. How can Fiedler's theory of the least preferred coworker help managers become more effective? Provide specific examples.
2. Understanding Work Team
3. Power and Politics
4. Conflict and Negotiation
No more than 150 words for each topic - reference please
Due Date 4/18/15
Thanks!
.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
Uniprocessor SchedulingCsci 430, Spring 2018Texas A&
1. Uniprocessor
Scheduling
Csci 430, Spring 2018
Texas A&M University – Commerce
Derek Harter
Introduction
to Operating
System
Concepts
Types of Processor
Scheduling
Objective: Be able to explain the
differences between long-, medium- and
short-term scheduling policies.
Processor Scheduling
the processor in a way that meets system
objectives, such as response time, throughput,
and processor efficiency
2. unctions:
– Long-term
– Medium-term
– Short-term
Table 9.1
Types of Scheduling
Scheduling and Process State
Transitions
Figure 9.2
Nesting of
Scheduling
Functions
(Referencing figure 3.9b)
Queuing
Diagram
Long-Term Scheduler
3. ermines which programs are admitted to the system for
processing
percentage of time that each process can be executed
ervice to the current set
of processes
Medium-Term
Scheduling
-in decisions are based on the need
to manage the degree of
multiprogramming
swapped-out processes
Short-Term Scheduling
-grained decision of which process to
execute next
4. blocking of the current process or that may provide an
opportunity to preempt a currently running process in favor
of another
Scheduling Algorithms
Objective: Be able to assess the
performance of different scheduling policies
(for the short term scheduler or dispatcher).
Short Term Scheduling
Criteria
processor time to optimize certain
aspects of system behavior
evaluate the scheduling policy
– User vs. system oriented
criteria
Short-Term Scheduling
Criteria: Performance
- Performance related criteria are quantative (can be measured)
- Examples: response time and throughput
- Not performance related are qualitative or not readily
6. generally, this quantity must be estimated or supplied by the
user
Decision Mode
instants in time
at which the
selection
function is
exercised
categories:
Nonpreemptive vs
Preemptive
Nonpreemptive
running state, it will
continue until it
terminates or blocks
itself for I/O
7. Preemptive
process may be
interrupted and moved
to ready state by the OS
when new process
arrives, on an interrupt,
or periodically
Alternative Scheduling
Policies
Process Scheduling
Example
Comparison of
Scheduling
Policies
Table 9.5
Comparison of
Scheduling
8. Policies
First-Come-First-
Served (FCFS)
-in-first-
out (FIFO) or a strict
queuing scheme
ceases to execute, the
longest process in the
Ready queue is selected
long processes than short
ones
-
bound processes over I/O-
bound processes
FCFS: Penalizes Short
Jobs
● FCFS performs much better for long processes
than short ones.
9. Round Robin
clock
because each process is
given a slice of time before
being preempted
length of the time quantum,
or slice, to be used
general-purpose time-
sharing system or
transaction processing
system
treatment of processor-
bound and I/O-bound
processes
Round Robin
Effect of
Size of
Preemption
Time
10. Quantum
Figure
9.6a
Figure 9.6b
Effect of Size of Preemption Time
Quantum
Virtual Round
Robin (VRR)
Shortest Process Next
(SPN)
icy in
which the process with the
shortest expected processing
time is selected next
the head of the queue
longer processes
know, or at least estimate,
the required processing
11. time of each process
estimate is substantially
under the actual running
time, the system may abort
the job
Calculating Service Time Interactively
● One difficulty with SPN is need to know or estimate required
processing time (service time)
● For batch job, can be supplied by programmer.
● For interactive jobs, OS can keep average of each “burst”
Rewrite summation:
Exponential averaging:
Exponential Smoothing
Coefficients
Use Of Exponential Averaging
Use Of Exponential Averaging
12. Shortest Remaining
Time (SRT)
the process that has the
shortest expected
remaining processing time
processes
ld give superior
turnaround time
performance to SPN
because a short job is
given immediate
preference to a running
longer job
Highest Response
Ratio Next (HRRN)
the greatest ratio
accounts for the age of the
process
13. favored, aging without
service increases the ratio
so that a longer process
will eventually get past
competing shorter jobs
Feedback Scheduling
) of
processes, we
can’t use SPN, SRT or HRRN.
jobs
that run longer.
spent so
far.
duling with a
dynamic
priority mechanism.
priority. Thus longer running processes “age” and become low
priority, and new short processes don’t age enough before they
finish execution.
Feedback
Scheduling
14. Feedback
Performance
Performance Comparison
Objective: Introduction to queuing theory
and modeling to comparative analysis of
scheduling (and other) algorithms.
Performance
Comparison
oses the next item to be
served independent of service time obeys the relationship:
Normalized Turnaround Time as a
Function of Processor Utilization
Table 9.6
Formulas for
Single-Server
Queues with
Two Priority
Categories
15. Overall Normalized Response
Time
Normalized Response Time for
Shorter Processes
Normalized Response
Time for Longer Processes
Results
Simulation
Alternative Scheduling
Policies
Fair-Share Scheduling
Objective: Look at scheduling pools
(processes organized as threads).
Fair-Share Scheduling
16. sets
processor
resources to users who have had more
than their fair share and more to those
who have had less than their fair share
Fair-Share Scheduling
Fair-Share
Scheduler
Traditional UNIX
Scheduling
Objective: Understand the scheduling
technique used in traditional UNIX systems.
Traditional UNIX
Scheduling
-sharing
17. interactive environment
users while ensuring that low-priority background jobs do
not starve
Employs multilevel feedback using round robin within each
of the priority queues
-second preemption
Scheduling Formula
Bands
access to block
devices and to allow
the operating
system to respond
quickly to system
calls
of priority, the
bands are:
Example of
18. Traditional
UNIX Process
Scheduling
Summary
decisions with respect to the execution of processes:
-term – determines when new processes are admitted to
the system
-term – part of the swapping function and determines
when a program is brought into main memory so that it may be
executed
-term – determines which ready process will be
executed
next by the processor
most
important characteristic of a system; from a system point of
view,
throughput or processor utilization is important
Chapter 9 Uniprocessor SchedulingSlide 3Processor
SchedulingTable 9.1 Types of SchedulingScheduling and
Process State TransitionsFigure 9.2 Nesting of Scheduling
FunctionsQueuing DiagramLong-Term SchedulerMedium-Term
SchedulingShort-Term SchedulingSlide 12Short Term
19. Scheduling CriteriaShort-Term Scheduling Criteria:
PerformanceTable 9.2 Scheduling CriteriaPriority
QueuingAlternative Scheduling PoliciesSelection
FunctionDecision ModeNonpreemptive vs PreemptiveSlide
21Table 9.4 Process Scheduling ExampleSlide 23Slide 24First-
Come-First-Served (FCFS)Slide 26Round RobinSlide 28Effect
of Size of Preemption Time QuantumFigure 9.6b Effect of Size
of Preemption Time QuantumVirtual Round Robin
(VRR)Shortest Process Next (SPN)Slide 33Exponential
Smoothing CoefficientsUse Of Exponential AveragingUse Of
Exponential AveragingShortest Remaining Time (SRT)Highest
Response Ratio Next (HRRN)Slide 39Feedback
SchedulingFeedback PerformanceSlide 42Performance
ComparisonSlide 44Slide 45Overall Normalized Response
TimeNormalized Response Time for Shorter
ProcessesNormalized Response Time for Longer
ProcessesResultsSlide 50Slide 51Fair-Share SchedulingSlide
53Fair-Share SchedulerSlide 55Traditional UNIX
SchedulingScheduling FormulaBandsExample of Traditional
UNIX Process SchedulingSummary
Chapter 10
Multiprocessor
and Real-Time
Scheduling
Seventh Edition
By William Stallings
Operating
Systems:
Internals
and Design
20. Principles
Classifications of
Multiprocessor Systems
● Loosely coupled or distributed multiprocessor,
or cluster
● Functionally specialized processors
● Tightly coupled multiprocessor
Synchronization Granularity
and Processes
Independent
Parallelism
synchronization among
processes
separate,
independent
application or job
-
sharing system
21. Coarse and Very
Coarse-Grained
Parallelism
level
for concurrent processes running on a
multiprogrammed uniprocessor
change to user software
Medium-Grained
Parallelism
collection of threads within a single process
of an application
interaction among the threads of an application, leading to
a medium-grain level of synchronization
frequently, scheduling decisions concerning one thread
may affect the performance of the entire application
Fine-Grained
22. Parallelism
parallelism than
is found in the use of threads
approaches
Design Issues
● Assignment of
processes to
processors
● Use of
multiprogramming on
individual processors
● Actual dispatching of
a process
depend on the degree
of granularity of
applications and the
number of processors
available
Assignment of
Processes to Processors
23. processes on demand (assume uniform/symmetric architecture)
– Static assignment: process stays on processor it is
assigned for lifetime
– Dynamic assignment: process can change processor.
t: less overhead, local caching,
gang scheduling
be
idle, with an empty queue, while another processor has a
backlog
n is dynamic load balancing
Assignment of
Processes to
Processors
require some way of assigning a process
to a processor
Master/Slave
24. Architecture
ays run on a particular processor
uniprocessor multiprogramming operating system
cause one processor has
control of all memory and I/O resources
Peer Architecture
-scheduling from the pool of
available processes
Process Scheduling
cated to processors
queues based on priority
-server queuing architecture
25. Thread Scheduling
on is separated from the rest of the definition
of a
process
execute
concurrently in the same address space
structuring aid
and to overlap I/O with processing
parallelism in an application
-
processor systems
have an
impact on applications that require significant interaction
among
threads
Approaches to
Thread Scheduling
a set of related thread
scheduled to run on a set of
processors at the same
time, on a one-to-one basis
26. processes are not
assigned to a particular
processor
provides implicit scheduling
defined by the assignment of
threads to processors
the number of threads in a process
can be altered during the course of
execution
● Load Sharing
● Gang Scheduling
● Dedicated (static) processor assignment
● Dynamic scheduling
Load Sharing
uniprocessor environment
– Load distributed evenly across processors
– No centralized schedule required
– Global queue can be organized and accessed using any
scheduling scheme (ch 9)
-come-first-served
27. Disadvantages of
Load Sharing
n of memory that must be
accessed in a manner that enforces mutual exclusion
same processor
ommon pool of threads, it is
unlikely that all of the threads of a program will gain access to
processors at the same time
performance
Gang Scheduling
that make up a
single process
– If closely related processes execute in parallel,
synchronization blocking may be reduced
– Scheduling overhead may be reduced since single
scheduling decision affects number of processors and
processes/threads
28. ful for medium-grained to fine-grained parallel
applications whose performance severely degrades when
any part of the application is not running while other
parts are ready to run
Figure 10.2
Example of Scheduling Groups
With Four and One Threads
Dedicated Processor
Assignment
assigned to a processor that remains dedicated to that thread
until the application runs to completion
thread of an application is blocked waiting for I/O or for
synchronization with another thread, then that thread’s
processor remains idle
or hundreds of
processors,
processor utilization is no longer so important as a metric for
effectiveness or performance
29. of a
program should result in a substantial speedup of that program
Figure 10.3
Application Speedup as a Function of Number of Threads
Dynamic Scheduling
system tools that permit the number of threads in the process
to be altered dynamically
uld allow the operating system to adjust the load to
improve utilization
making scheduling decisions
primarily limited to processor allocation
processor assignment for applications that can take advantage of
it
Real-Time Systems
perhaps the
30. most important component
result of the
computation but also on the time at which the results are
produced
take place
in the outside world
se events occur in “real time” and tasks must be able to
keep up
with them
Hard and Soft
Real-Time Tasks
Hard real-time
task
deadline
unacceptable damage or
a fatal error to the
system
Soft real-time
task
31. that is desirable but not
mandatory
schedule and complete the
task even if it has passed
its deadline
Periodic and
Aperiodic
Tasks
ed as:
finish time
Characteristics of
Real Time Systems
Determinism
ong an operating system delays
32. before acknowledging an interrupt
or within predetermined time intervals
processor time, no system will be fully deterministic
Responsiveness
to external events
-time systems that must meet timing
requirements imposed by individuals, devices, and data
flows external to the system
takes an operating system to service the interrupt
User Control
-time operating system
than in ordinary operating systems
ne-grained control over
task priority
tasks and to specify relative priorities within each class
33. Reliability
-time systems than non-real
time systems
-time systems respond to and control events in real
time so loss or degradation of performance may have
catastrophic consequences such as:
Fail-Soft Operation
such a way as to preserve as much capability and data as
possible
-time system is stable if the system will meet the
deadlines of its most critical, highest-priority tasks even if
some less critical task deadlines are not always met
Real-Time
Scheduling
34. of
Process
Real-Time
Scheduling
Classes of Real-Time
Scheduling Algorithms
Deadline Scheduling
-time operating systems are designed with the
objective of starting real-time tasks as rapidly as possible
and emphasize rapid interrupt handling and task
dispatching
-time applications are generally not concerned with
sheer speed but rather with completing (or starting)
tasks at the most valuable times
requirement of completion (or initiation) at the most
valuable time
Information Used for
Deadline Scheduling
35. Table 10.2
Execution Profile of Two Periodic
Tasks
Figure 10.5 Scheduling of Periodic Real-Time Tasks With
Completion Deadlines (Based on Table 10.2)
Figure 10.6 Scheduling of Aperiodic Real-Time Tasks With
Starting Deadlines
Table 10.3
Execution Profile of Five Aperiodic
Tasks
Figure 10.7
Rate
Monoton
ic
Scheduli
ng
36. Periodic Task
Timing
Diagram
Figure 10.8
Value of
the RMS
Upper
Bound
Table 10.4
Priority Inversion
-based preemptive scheduling
scheme
y relevant in the context of real-time scheduling
-known instance involved the Mars Pathfinder mission
higher priority task to wait for a lower priority task
Unbounded Priority
Inversion
37. Priority Inheritance
Linux Scheduling
-in-first-out real-time
threads
-robin real-time threads
-real-time
threads
e
used
Linux
Real-Time
Scheduling
Non-Real-Time
Scheduling
the SCHED_OTHER class
did not scale well with
38. increasing number of
processors and processes
scheduling data structures
for each processor in the
system
priority scheduler known
as the O(1)
scheduler
appropriate process and
assign it to a processor is
constant regardless of the
load on the system or
number of processors
Linux
Schedul
ing
Data
Structur
es
Figure 10.11
UNIX SVR4
Scheduling
39. earlier UNIX
systems
and the
introduction of a set of 160 priority levels divided into three
priority
classes
SVR
Priori
ty
Class
es
Figure 10.12
SVR Priority Classes
SVR4 Dispatch Queues
Figure 10.13
UNIX FreeBSD
40. Scheduler
SMP and Multicore
Support
scheduling for a SMP or multicore system
multicore systems
– a scheduler that only
migrates a thread when necessary to avoid
having an idle processor
systems
so that it is no longer a function of the number of
threads in the system
Windows
Thread
Dispatching
Priorities
Figure 10.14
41. Interactivity Scoring
voluntary sleep time versus its runtime is below a certain
threshold
reshold is defined in the scheduler code and is
not configurable
lower half of the range of interactivity scores
upper half of the range of interactivity scores
Thread Migration
the
last processor that it ran on
processor
Windows
Scheduling
ities in Windows are organized into two bands or
classes:
43. scheduling algorithms are less significant in a multiprocessor
system
-time process is one that is executed in connection with
some
process or function or set of events external to the computer
system and
that must meet one or more deadlines to interact effectively and
correctly with the external environment
-time operating system is one that is capable of
managing real-
time processes
ing to
relative
deadlines are appropriate in this context
Chapter 10 Multiprocessor and Real-Time
SchedulingClassifications of Multiprocessor
SystemsSynchronization Granularity and ProcessesIndependent
ParallelismCoarse and Very Coarse-Grained
ParallelismMedium-Grained ParallelismFine-Grained
ParallelismDesign IssuesAssignment of Processes to
ProcessorsAssignment of Processes to ProcessorsMaster/Slave
ArchitecturePeer ArchitectureProcess SchedulingThread
SchedulingApproaches to Thread SchedulingLoad
SharingDisadvantages of Load SharingGang SchedulingSlide
21Dedicated Processor AssignmentSlide 23Dynamic
SchedulingReal-Time SystemsHard and Soft Real-Time
TasksPeriodic and Aperiodic TasksCharacteristics of Real Time
SystemsDeterminismResponsivenessUser
ControlReliabilityFail-Soft OperationReal-TimeReal-Time
SchedulingClasses of Real-Time Scheduling
AlgorithmsDeadline SchedulingInformation Used for Deadline
44. SchedulingTable 10.2 Execution Profile of Two Periodic
TasksSlide 40Slide 41Table 10.3 Execution Profile of Five
Aperiodic TasksSlide 43Periodic Task Timing DiagramValue of
the RMS Upper BoundPriority InversionUnbounded Priority
InversionPriority InheritanceLinux SchedulingLinux Real-Time
SchedulingNon-Real-Time SchedulingLinux Scheduling Data
StructuresUNIX SVR4 SchedulingSVR Priority ClassesSVR
Priority ClassesSVR4 Dispatch QueuesUNIX FreeBSD
SchedulerSMP and Multicore SupportWindows Thread
Dispatching PrioritiesInteractivity ScoringThread
MigrationWindows SchedulingWindows Priority
RelationshipLinux Virtual Machine Process
SchedulingSummary
Operating Systems, Stallings
Chapter 9 Notes
CSci 430 Spring 2019
Overview
In a multiprogramming system, multiple processes exist
concurrently in main
memory. As we have seen and discussed many times, it is
imperative that
we support multiple concurrent processes in main memory, so
that we can
maximize the utilization of the CPU and other peripherals and
devices in the
computing system. However, when we have (many) more
processes than we
have CPUs to execute them, this necessitates that we need to
periodically
45. switch between the processes in some manner. This is especially
true because
many processes perform operations that will cause them to have
to wait long
periods (from the CPUs point of view), and if the CPU does
nothing while
the process is waiting, the resource is wasted, and useful work
that could
be done will not be performed. We need advanced memory
management
techniques, as we studied in the previous 2 chapters, to ensure
that we have
a su�ciently large number of processes available and able to be
chosen from.
But, until now, we have not looked at the issues and methods we
should use
in order to select among available processes in an e�cient
manner in order
to utilize CPU and other resources wisely.
In this chapter we will begin examining processor scheduling
and man-
agement issues. In particular, we will break the issue up into 3
di�erent time
frames, short, medium and long-term scheduling concerns and
methods. In
chapter 9, which you are to read through this week and next, we
restrict our
discussion to systems with a single CPU in terms of the process
scheduling
issues. In chapter 10, we will look at some of the additional
complications
we need to consider when we are dealing with systems that have
2 or more
available CPUs for scheduling processes in the operating
system.
46. Learning Objectives
After studying this chapter, you should be able to:
1
� Explain the di�erences among long, medium and short-term
schedul-
ing.
� Assess the performance of di�erent scheduling policies.
� Be able to simulate di�erent preemptive, and non-preemptive
short-
term scheduling policies by hand, and understand the issues and
mech-
anisms involved with their implementation.
9 Uniprocessor Scheduling
9.1 Types of Processor Scheduling
The aim of processor scheduling is to assign processes to be
executed by the
processor(s) over time, in a way that meets system objectives.
We may have
many di�erent objectives in mind that we want to try and
optimize, and
as always in such design decisions, some are mutually exclusive
such that
optimizing one necessarily means performing worse in some
other measure.
Objectives might include response time or overall system
47. throughput, or
simply trying to maximize CPU utilization if there are processes
waiting
to execute. In many systems, the scheduling of processes are
broken down
into three separate functions: long, medium and short-term
scheduling. The
relative time scales of the activities performed change what the
system might
focus on, and what measures or features it can successfully try
and optimize.
Figure 9.2 is important in understanding the di�erent time
frames, and
how the scheduling of processes relate to each other on these
varying time
frames. We will discuss in a little more detail next, but
basically short-
term scheduling deals with the most basic of our state process
model con-
cepts (from chapter 3), the ready/running/blocked transitions.
Medium-
term scheduling involves decision about if and when to suspend
some pro-
cesses to memory. And generally, long-term scheduling has to
do with de-
cisions in large systems of when to allow processes to begin
running, and
possibly terminating processes early if needed.
2
3
48. Long-Term Scheduling
The long-term scheduler determines which programs are
admitted to the
system for processing. Thus it controls the degree of multi-
programming in
the system. When the long-term scheduler decides to admit a
new job to
the system, it can add it to the queue for short-term scheduler,
which causes
the program to immediately be loaded into memory once it is
scheduled. Or
it can start the process in a swapped-out condition, which might
allow the
system to create some structures for the process on disk, but
keeps memory
free for actively running processes. Most general purpose OS
will simply
start processes immediately. In big batching systems or HPC
computers,
a batching system may hold jobs as needed, and only create
them when
su�cient resources are available. In such a case, the long-term
scheduler
might admit/create new jobs on a �rst-come-�rst-served
(FCFS) basis, or it
could us information about the requirements of the jobs to
schedule them,
for example trying to keep a mix of processor-bound and I/O-
bound jobs in
the system.
Medium-Term Scheduling
49. Medium-term scheduling is part of the swapping function. We
have discussed
many of the issues involved with the swapping decision already.
Basically,
swapping in/out processes can be used to manage the
availability of primary
memory on the system. So if memory is tight, the swapper can
move some
processes completely out of memory for a short period. But if
CPU utiliza-
tion is becoming low and processes are swapped out, then the
medium-term
scheduler might attempt to swap back in some processes in
order to increase
the degree of multiprogramming and thus increase CPU and
resource uti-
lization.
Short-Term Scheduling
In terms of the frequency of execution, the long-term scheduler
usually ex-
ecutes rather infrequently, and the medium-term
scheduling/swapping deci-
sions are also going to be somewhat infrequent. The short-term
scheduler,
however, often needs to be invoked very frequently. For
example, every time
a process becomes blocked because of read or write activities,
the short-term
scheduler will be run to select the next process to get the CPU.
Also we
often want to allow the system to preemptively cause running
processes to
be switched, so that we can support the illusion of
multiprogramming in
50. the system. Without preemption, the system appears to hang
whenever it
4
executes a program that is CPU bound and runs for a long time
without
returning for I/O.
9.2 Scheduling Algorithms
The purpose of processes scheduling is to try and maximize
performance. In
order to successfully maximize performance, we have to have
some idea of the
criteria we want to measure, and thus try and improve by
selecting processes
in some speci�c manner. As the text mentions, there are many
di�erent cri-
teria we might try and maximize. The textbook breaks these
criteria into
two broad classes, user-oriented criteria and system-oriented
criteria. The
names should be fairly self explanatory. User-oriented criteria
are those mea-
sures that are visible to, and most e�ect user perceptions of
how the system
is performing. A classic example would be the response time of
the system,
how fast it appears to begin working on any command you ask it
to perform.
User-oriented criteria can be viewed from the perspective of a
human user of
the system, or from the view of a single process executing in the
51. system. Ex-
amples of system-oriented criteria would be throughput and
CPU utilization.
A user might just want their jobs or process to be completed as
quickly as
possible. But overall, from the system perspective, we want to
complete as
many jobs as possible in the shortest time possible. And, one
way to achieve
this, is to keep the CPU (and other resources) as busy as
possible, given the
current set of jobs we are managing. On single user type
systems, such as
your personal computer or smart phone, system level criteria are
probably
not important, it is only important that the user is getting the
performance
they expect from the system. System level performance criteria
are more
important on large shared-user systems, such as HPC
supercomputers and
large batching systems and server systems. Table 9.2 of our
textbook gives a
summary of some of the types of performance criteria you
should be familiar
with, in the context of the scheduling of processes.
Priorities
While it is �ne in theory to create scheduling algorithms that
only look at
particular criteria in order to try and �ne tune the scheduling,
in practice
we often need a more explicit and �ner level of control to be
available to the
system operators and designers to explicitly tell the system
52. which processes
to prefer over which others when scheduling. Priorities are used
in many
systems to allow this �ne-grained level of control. Priorities
can be explicitly
assigned to the entities being scheduled (e.g. processes), and the
level of the
5
priority can be taken into account when making scheduling
decisions. For
example, we could implement a strict priority based scheduler,
with round-
robin scheduling among processes of equal priority. In a strict
priority based
mechanism, we would always choose among the highest priority
processes
currently in the system, and schedule them �rst. As shown in
�gure 9.4 of
our textbook, one way this could be achieved is by using
separate priority
queues for each level in our priority scheme. Then, when a
process needs to be
scheduled, we would �rst see if any processes are in the highest
priority queue
(and select the one at the head of this queue, if using round-
robin scheduling
within the priority queuing scheme). Only if the highest priority
queue is
empty, would we then check the next highest queue for ready
processes.
One problem with this pure priority scheduling scheme we have
53. just de-
scribed is that lower priority processes may su�er starvation
(and thus this
scheme can be unfair in its scheduling policy). If there are
always high prior-
ity processes running or continually entering the system, low
priority process
will never be scheduled to run. Thus strict priority scheduling
policies are
rarely used. However, by adding a concept of aging, where the
priority of
a process can change dynamically, we can �x this problem. For
example,
the longer a process is in the system, the higher its priority
might become.
And conversely, the more a process executes, the lower we
might set its pri-
ority, for some time. Such modi�ed priority schemes are very
common in
modern operating systems. For example, Unix and windows
variants use
modi�cations of process priority, with dynamically changing
priorities, in
their implementations of their process scheduling mechanisms.
Alternative Scheduling Policies
In order to better understand the trades we need to make when
thinking
about process scheduling mechanisms, our textbook presents
and compares
several short-term scheduling policies in this section. I will
summarize some
of the important points made in this section, but you should
make sure you
understand all of the policies discussed in this section, how they
54. work, and
their e�ects on various criteria, such as throughput, response
time, etc. Table
9.3 in our text is an important summary of the basic
conclusion's about the
policies we discuss in this section.
6
First I will talk about the rows on this table, and then we will
summarize
brie�y the various scheduling policies. The selection function
determines
how the policy decides which process will be selected next from
among the
pool of available ready processes. For example, for the �rst-
come-�rst-serve
(FCFS) policy, we will select the process that has been waiting
the longest
as the next to be scheduled to run. The process that has been
waiting
the longest must have arrived �rst, before any other process
that might
be waiting. Thus, by selecting the process by max(w), the one
that has
waited the longest, we are selecting the �rst process to arrive
among the
currently waiting processes (FCFS). The selection functions for
all of the
other policies should make sense to you, if you understand what
the w (wait
time), e (execution time) and s (total service time needed)
parameters mean.
55. The decision mode is an important characteristics of process
scheduling
policies. Basically, non-preemptive policies are not really
suitable for multi-
user interactive systems. When the system schedules processes
in a non-
preemptive manner, this means that once the process is running,
it will
continue running until it is �nished. This is �ne in a batching
system, but in
an interactive user-based system, the system cannot fail to
respond to user
input if there is a long-running process currently scheduled and
running.
Thus we need to use preemptive scheduling processes for
interactive user
7
systems. In a preemptive system, the running process can be
halted and
returned back to the ready queue (or a wait queue), based on
some events.
As discussed in the text, we can support di�erent types of
preemption, such
as only preempting if needed when a new process arrives
(HRRN). However,
again if we are talking about a system that supports interactive
users, we
will need to support time quantum (and I/O blocking based)
preemption.
Throughput and response time represent two of the scheduling
criteria
56. that we might be interested in in�uencing. As we have
discussed, throughput
is a system-level criteria, where response time is more user-
level focused.
Overhead in this table is a judgment on how costly the
algorithm is to
implement. If the overhead is high for the policy, it may take a
lot of memory
and/or CPU cycles in order to implement the data structures and
calculate
the selection function of the given policy.
The e�ects on process description basically gives some ideas
about if the
policy is fair or not, and if it is not fair, which types of
processes are likely
to be favored or penalized by the policy. I/O bound processes
are those that
need to do a lot of I/O, such as reading or writing large amounts
of data
to/from disk. The opposite of an I/O bound process is a compute
(CPU)
bound process, which once loaded into memory does not need
additional
I/O, and will e�ectively crunch data at a high speed (and not
relinquish the
CPU voluntarily).
And �nally starvation can be a consideration for some process
selection
policies. As we mentioned, starvation is possible for strict
priority based
schedulers, as low priority processes may never be selected to
run if high
priority processes are always present. We have talked about
57. starvation in
previous chapters on concurrency, and starvation is always a
possible problem
when running concurrent processes. As we see in this table,
some process
selection policies can be created that are guaranteed to avoid
starvation,
such as the simple round robin policy.
I will now brie�y mention each of the short term scheduling
policies that
the textbook presents and analyzes in this section. Make sure
you understand
how these policies work and are implemented, and the trade-
o�s they make in
terms of the parameters they are optimizing. Also, we will
mention and use
the process �nish time, turnaround time (Tr) and the normalized
turnaround
ratio (Tr/Ts) when we discuss these policies. The start and
�nish times
should be obvious, the start time is when the process �rst enters
the system
(not the �rst time step when it is run), and the �nish time is the
time step
in which the process �nishes execution. The turnaround time,
also known
as the residence time Tr, is simply the total time the process
spent in the
system (e.g. �nish time minus start time Tf − Tb) The
turnaround times
8
58. is not very useful, as it can vary widely as a function of the
service time of
the process. The service time is how many time steps the
process needs to
execute in order to complete its task. This is not useful in
comparing the
relative performance of di�erent policies, because longer
processes will have
long turnaround times and short process may have short (or not)
turnaround
times. By dividing the turnaround time by the processes service
time, we get
a better understanding of the magnitude of time the process
spent waiting
(Tr/Ts), and we can better average and compare such ratios to
judge the
relative e�ects of scheduling policies on system
responsiveness.
First-Come-First-Served (FCFS)
FCFS is the simplest scheduling policy, and thus has (almost)
no overhead
in order to implement it on a system. FCFS can also be
described as (and
called) a strict �rst-in-�rst-out (FIFO) queuing scheme. FCFS
just requires
a simple queue, and it is non-preemptive in nature. When a
process arrives,
we just put it on the back of the queue. And when process
�nishes or we
need to schedule a new process to run, we take the one at the
head of the
queue and it will execute until it completes (or if we have a
blocked/wait
state, it executes until its next I/O request). Basic batching
59. systems use this
scheduling policy.
FCFS is not particularly good in terms of response time and
other char-
acteristics, and as mentioned it can be unfair to I/O bound
processes, as I/O
bound processes will get returned back to the end of the queue,
but compute
bound processes, once they get scheduled, since there is no
preemption, will
monopolize the CPU and �nish up, leaving the I/O bound
processes waiting
around longer than necessary.
Round Robin
Round robin is basically the FCFS, but where we add a
preemption mecha-
nism. We have 1 queue, and processes that block for I/O are
returned to the
queue as before. But we also cause the running process to be
periodically
preempted, when they exceed their time slice (called the time
slice quan-
tum). Because of this, the RR policy is also sometimes known
as a time
slicing policy.
By adding the ability to preempt, RR addresses the unfairness of
FCFS
for I/O bound processes. However, throughput and response
time may not
be very good with a strict RR preemptive scheduler.
9
60. Shortest Process Next (SPN)
The SPN policy is another nonpreemptive policy. Further, in
order to imple-
ment SPN, each process must state up front how long it will
need to execute.
The selection function for SPN is to take the policy that is the
shortest that
is currently waiting to be executed as the next process. There
are several
problems with this policy in regards to implementation in real
systems. As
we have already mentioned, since it is nonpreemptive, it is not
suitable for
most interactive systems. Also for most real systems we don't
often really
know how long a process will need to execute. Thus we can
require that
an estimate be given for the length of the process when it is
created and
submitted. However, then we need to decide what we want to do
to pro-
cesses that have exceeded their stated execution service time,
should the be
terminated? All of these considerations need to be tracked in a
real imple-
mentation, which can mean that SPN needs a fair amount of
overhead in
order to be implemented.
SPN is actually fairly good in terms of its throughput and
response time,
at least for short processes. However, SPN can penalize long
61. processes. This
should be intuitively obvious, as in a system where lots of short
processes
continually enter the system, longer processes may have to wait
a long time
before they get selected to be run. In extreme cases starvation is
possible,
where a long process is never selected because short processes
are continually
always available. So SPN can be unfair to long processes.
Shortest Remaining Time (SRT)
In order to implement the SRT policy, we need to keep track of
how much
execution time each process still has to do. In the version
discussed in our
textbook, the SRT policy is preemptive, but only at the time of
the cre-
ation/entry of a new process. Whenever a new process becomes
available,
the currently running process may be preempted if the new
process is shorter
than the remaining time on the currently running process. In
order to cal-
culate the remaining time of processes, we of course need to
know how much
total time the process needs to run, thus the shortcoming for
real implemen-
tations that we discussed for SPN are also present for SRT, and
it can also
need more overhead than other schedulers as well.
SRT can provide good throughput and response times, though it
still
might penalize long processes, for the same reasons as SPN
62. previously.
10
Highest Response Ratio Next (HRRN)
In order to understand HRRN, you must understand what the
normalized
turnaround time is and how it is calculated. If we can calculated
the current
normalized turnaround time for all of the processes currently in
our system,
HRRN simply says that we should select the process that has the
highest
(e.g. the worst) such measure to be the next to execute. This is
intuitive if
we are trying to maximize the turnaround time (and thus the
throughput)
of our system. By selecting the process that is doing badly on
this measure
next, we have a chance to improve its turnaround time, and thus
improve
our systems overall average. Basically, by calculating and
choosing processes
based on their turnaround time, we are adding a type of aging
mechanism.
HRRN is nonpreemptive. And as with the previous 2 policies,
we need to
know the expected service time in order to calculate the
response ratio. This
coupled with its nonpreemptive nature makes it unsuitable for
interactive
systems. However, HRRN does �x some of the de�ciencies that
SRT and
63. SPN have in their unfairness towards long processes, as long
processes will
have increasingly larger response ratios the longer they are in
the system,
and thus will be guaranteed to be selected at some point to be
executed,
thus avoiding starvation.
Feedback
The feedback policy as described in our book is basically a type
of priority
scheme. As discussed in this section, the feedback policy uses a
preemptive
(time-sliced) based mechanism, coupled with a dynamic priority
mechanism.
So basically, this is not a strict priority based policy, but a
priority sched-
uler with dynamic priority mechanism as we mentioned before.
Also as we
said previously, modern interactive OS systems basically use
some form of
dynamic priority based time-sliced scheduler, so this policy is
the most im-
portant to understand in order to comprehend how real OS
schedulers work.
The feedback policy schedules processes on a preemptive (at a
time quan-
tum) basis. Processes when they �rst enter the system have a
particular
priority assigned to them, usually of the highest priority. After
each pre-
emption of the process, its priority is lowered by 1 level (down
to some
minimum priority).
64. A short process will complete quickly, with migrating very far
down the
priority hierarchy. A longer process will gradually drift
downward. Thus
newer, shorter processes are favored over older, longer
processes.
The performance characteristics of a feedback/priority scheduler
will vary
11
with the time quantum parameter (as will RR). Also, the details
of the
dynamic priorities will have large e�ects on the performance
characteristics
as well. However, since this policy is preemptive it is suitable
for interactive
systems. And because of the priorities, it can be tuned in
various ways, to
try and avoid starvation, and to give fair treatment to di�erent
types of short
and long and I/O and compute bound processes, as needed.
12
Operating Systems, Stallings
Chapter 10 notes
65. CSci 430 Spring 2019
Overview
Though the addition of more than 1 CPU into a system does
introduce some
new issues to be considered when scheduling processes, the
basic mechanisms
and analysis of process scheduling are not so di�erent as you
might think.
Section 10.1 of our textbook covers 3 main categories of
multiprocessor sys-
tems:
1. Loosely coupled or distributed memory cluster systems
2. Functionally specialized processors
3. Tightly coupled, shared memory multiprocessors.
Of the three categories, the third category is the most familiar
one to
most of the students of this course. Modern general purpose
computing sys-
tems often have multi-core chips and/or 2 or more CPU chips as
part of the
system. However, all of the CPUs on such multi-core chips are
functionally
equivalent. Modern general purpose personal computers actually
often do
have a specialized CPU, di�erent from the general purpose
CPUs. This is
the CPU in your graphical processor or graphics card. However,
usually the
OS does not schedule work or processes to be run on this CPU,
instead the
66. video graphics drivers use this specialized CPU to perform
rendering and
display driver tasks. The �rst category, scheduling on a
distributed memory
cluster system, is an issue very important to modern
supercomputing clus-
ter systems. Most supercomputers used in scienti�c research are
what are
known as commodity computing clusters. They are basically a
collection of
large numbers of standard computers, connected together using
high-speed
networking connections. Unlike your personal computer or
laptop, all of the
computers in such a cluster computer have their own set of
memory, thus
1
they are often referred to as distributed memory systems, in
contrast to your
typical personal computer that has multiple CPUs sharing a
common pool of
RAM memory. In this course, we will concentrate on the issues
of processor
scheduling for shared memory multiprocessor systems, but you
should read
the materials about the other 2 categories of systems as well in
section 10.1
of our textbook.
One important consideration when scheduling processes on a
multi-processor
system, is how to assign processes to available processors. The
67. simplest ap-
proach is to treat all of the CPUs as an available pool of
processors, and
assign processes to processors on demand. The question arrises
at this point
of whether, when a process starts running on a CPU, the
assignment should
be static or dynamic.
The static vs. dynamic decision can have consequences. In a
multi-core
CPU chip, the cores have local cache memory that are often
separate, or not
shared, among the cores (The Level 1 L1 and/or L2 cache
levels). When a
process runs on a CPU, it begins using the cache memory local
to that CPU
core. So, if we use dynamic scheduling, the process could be
assigned and run
on a di�erent core at a later time. However, this has the
disadvantage that
all of the loaded cache data becomes invalid, once the process is
switched to
another core. This can be ine�cient, as all of the cache pages
will end up
being needed to be reloaded once again on the new core L1
cache. However,
static assignment has its own problems. In static assignment,
once a process
begins using a particular core, we don't switch it to use another
core. The
obvious problem occurs if you have 2 very long running
processes that get
assigned to the same core, they could end up competing to be
scheduled on
the same core, while other cores go idle, with no statically
68. assigned processes
running on them.
This, in a modern OS that handles multi-core scheduling, it is
common
to see a dynamic allocation implementation. However, normally
the pro-
cessor scheduler has built-in preferences that cause the
processes to greatly
prefer to be keep scheduling on the same CPU (known as
processor a�nity).
Some parameters can be set or tweaked for a running process, to
make this
a�nity for a particular core be stronger or weaker. This, with
this concept
of processor a�nity, processes tend to try to execute on the
same core they
begin working on, but can be switched over to a new core when
necessary.
2
ÑÐÛÎßÌ×ÒÙ ÍÇÍÌÛÓÍ
×ÒÌÛÎÒßÔÍ ßÒÜ ÜÛÍ×ÙÒ
ÐÎ×ÒÝ×ÐÔÛÍ
ÍÛÊÛÒÌØ ÛÜ×Ì×ÑÒ
É·´´·¿³ ͬ¿´´·²¹-
80. robin
* scheduling, where the time slice quantum can be specified a
s
* as a command line parameter. And we also implement shor
test
* remaining time (SRT) scheduling policy
*/
#include<stdlib.h>
#include<iostream>
#include<iomanip>
#include<fstream>
#include<string>
#include<list>
usingnamespace std;
// global constants
// I won't test your round robin implementation with more than 2
0 processes
constint MAX_PROCESSES =20;
constint NO_PROCESS =0;
// Simple structure, holds all of the information about processes,
their names
// arrival and service times, that we are to simulate.
typedefstruct
{
string processName;
int arrivalTime;
int serviceTime;
// holds running count of time slices for current time quantum,
when
// serviceTime == quantum, time slice is up
int sliceTime;
// holds total number of time steps currently run, when == to
// serviceTime process is done
81. int totalTime;
// holds time when process finishes, used to calculate final stats,
// like T_r, T_r/T_s
int finishTime;
// a boolean flag, we will set this to true when the process is co
mplete
bool finished;
}Process;
// Process table, holds table of information about processes we a
re simulating
typedefstruct
{
int numProcesses;
Process* process[MAX_PROCESSES];
}ProcessTable;
/** Create process table
* Allocate memory for a new process table. Load the process
* information from the simulation file into a table with the proc
ess
* information needed to perform the simulation. At the same ti
me we
* initialize other information in process table for use in the
* simulation. Return the newly created ProcessTable
*
* @param processFilanem The name (char*) of the file to open
and read
* the process information from.
* @param processTable This is actually a return parameter. Th
is
* should be a pointer to an already allocated array of
* Process structure items. We will fill in this structure
* and return the process information.
*
82. * @returns ProcessTable* The newly allocated and initialized P
rocessTable
* structure.
*/
ProcessTable* createProcessTable(char* processFilename)
{
ifstream simprocessfile(processFilename);
ProcessTable* processTable;
int pid;
string processName;
int arrivalTime;
int serviceTime;
// If we can't open file, abort and let the user know problem
if(!simprocessfile.is_open())
{
cout <<"Error: could not open process simulation file: "
<< processFilename << endl;
exit(1);
}
// Format of file is
// ProcessName1 ArrivalTime1 ServiceTime1
// ProcessName2 ArrivalTime2 ServiceTime2
// ...
// ProcessNameN ArrivalTimeN ServiceTimeN
//
// Where the name is any arbitray string identifier, and ArrivalT
ime
// and ServiceTime are integer values
pid =0;
processTable =new(ProcessTable);
while(simprocessfile >> processName >> arrivalTime >> servic
eTime)
{
// allocate a new process to hold information
83. Process* process =new(Process);
processTable->process[pid]= process;
// load information into process read from simulation file
process->processName = processName;
process->arrivalTime = arrivalTime;
process->serviceTime = serviceTime;
// initialize other process information for the simulaiton
process->sliceTime =0;
process->totalTime =0;
process->finishTime =0;
process->finished =false;
pid++;
}
// Set the number of processes we need to simulate information i
n
// the process table
processTable->numProcesses = pid;
return processTable;
}
/** Display process table
* Convenience method, dump all of the information about the p
rocesses
* in a process table to stdout.
*
* @param processTable The table, a pointer to type ProcessTab
le
* struct, with the information we are to display
*/
void displayProcessTable(ProcessTable* processTable)
84. {
cout <<"Process Table num = "<< processTable-
>numProcesses << endl;
cout <<"PID Name Arrv Srvc"<< endl;
cout <<"------------------"<< endl;
for(int pid=0; pid < processTable->numProcesses; pid++)
{
Process* p = processTable->process[pid];
cout << setw(2)<< right << pid <<") ";
cout << setw(4)<< left << p->processName <<" ";
cout << setw(4)<< right << p->arrivalTime <<" ";
cout << setw(4)<< right << p->serviceTime <<" ";
cout << endl;
}
}
/** Round robin scheduler simulator
* The main routine for performing the round robin preemptive
* scheduler simulator. We expect the time quantum to already
be
* specified and given to us as the first parameter. The file nam
e
* with the process arrival and service time information is given
as
* the second parameter. We simulate preemptive round robin
* scheduling of all of the processes until there are no longer an
y
* processes left in the system (all processes have exceeded thei
r
* service time and have exited).
*
* @param processTable A pointer to a ProcessTable structure h
olding
* information about the processes, arrival times and duratio
ns
85. * that we are simulating execution of.
* @param quantum An integer value holding the time slice qua
ntum we
* are using for this simulation.
*/
void roundRobinScheduler(ProcessTable* processTable,int quan
tum)
{
// Implement the round robin scheduler here
cout <<"<roundRobinScheduler> entered, quantum: "<< quant
um << endl;
}
/** shortest remaining time simulator
* The main routine for performing the shortest remaining time
* preemptive scheduler simulator. The file name with the proc
ess
* arrival and service time information is given as the first
* parameter. We simulate preemptive shortest remaining time
* scheduling of all of the processes until there are no longer an
y
* processes left in the system (all processes have exceeded thei
r
* service time and have exited).
*
* @param processTable A pointer to a ProcessTable structure h
olding
* information about the processes, arrival times and duratio
ns
* that we are simulating execution of.
*/
void shortestRemainingTime(ProcessTable* processTable)
{
// Implement the shortest remaining time policy here
cout <<"<shortestRemainingTime> entered"<< endl;
86. }
/** Main entry point of round robin scheduler
* The main entry point of the round robin scheduler simulator.
The main funciton
* checks the command line arguments, and calls the simulation
function if correct
* arguments were supplied. We expect two command line argu
ments, which are the
* time slice quantum value we are to use for this preemptive sc
heduler simulation,
* and the name of the simulation file holding the process arriva
l and service
* time information.
*
* @param argc The argument count
* @param argv The command line argument values. We expect
argv[1] to be the
* time slice quantum parameter (int format) and argv[2
] to be the
* name of the process simulation file (charcter string)
*/
int main(int argc,char** argv)
{
string policy;
ProcessTable* processTable;
int quantum =0;
// If not all parameters provides, abort and let user know of prob
lem
if(argc <3|| argc >4)
{
cout <<"Error: expecting process simulation file and scheduli
ng policy as command line parameters"
<< endl;
87. cout <<"Usage: "<< argv[0]<<" process-
file.sim [rr|srt] [quantum]"<< endl;
exit(1);
}
// load process table and parse command line arguments
processTable = createProcessTable(argv[1]);
// just to confirm that process table loaded correctly. You shoul
d
// comment out or remove this as it is not asked for as part of th
e
// output for the assignment simulation
displayProcessTable(processTable);
// determine policy to simulate
policy.assign(argv[2]);
// perform simulation of indicated scheduling policy
if(policy =="rr")
{
if(argc !=4)
{
cout <<"Error: time quantum must be provided for round ro
bin `rr` scheduling policy"<< endl;
exit(1);
}
quantum = atoi(argv[3]);
if((quantum <=0)||(quantum >1000))
{
cout <<"Error: received bad time slice quantum parameter:
"<< argv[1]<< endl;
cout <<" valid values are integers in range from 1 to 10
00"<< endl;
exit(1);
}
88. roundRobinScheduler(processTable, quantum);
}
elseif(policy =="srt")
{
shortestRemainingTime(processTable);
}
else
{
cout <<"Error: unknown process scheduling policy: "<< polic
y << endl;
}
}
prog-05.pdf
Programming Assignment #5
CSci 430, Spring 2019
Dates:
Assigned: Monday April 15, 2019
Due: Wednesday May 1, 2019 (before Midnight)
Objectives:
� Understand short-term process scheduling.
� Work with data structures to implement a round-robin
scheduler.
� Look at e�ects of di�erent time slice quantum sizes on the
round-robin scheduling algorithm.
89. � Use C/C++ to implement vector and matrix data structures,
get practice in creating and using
such data structures in C/C++.
Description:
Our textbooks chapter 9 discusses several possible short-term
process scheduling policies. In this
programming assignment exercise we will implement two of the
preemptive policies, the simple shortest
remaining time policy (SRT) and the round-robin scheduler with
preemptive time slicing. Your program
will be given a simple input �le, indicating the process name,
its arrival time and its total service time,
the same as the process scheduling examples from our textbook
in Table 9.4 and Figure 9.5. You will
simulate the execution of the required schedulers. As in
previous assignments, you program will need
to work non-interactively and be callable from the command
line. The program will be provided with
the �le name of a �le with process information, in the format
discussed below. Your program will also
be given the time slicing quantum parameter it is to use for the
simulation, if round-robin scheduling
is selected. Your program will need to output the results of
running the set of simulated processes
using the selected scheduling policy with the indicated time
slice for the round-robin scheduler. Your
program will have to output its results exactly as shown below
in the required output format. Your
program will also need to calculate some summary statistics for
the simulated processes, including the
turnaround time and Tr/Ts ratio for each process, and the mean
Tr and Tr/Ts values for the given
simulation.
90. Process simulation �le formats
The �les with the information about the processes to be
simulated are fairly simple, and have the same
information that our textbook uses to illustrate the process
scheduling examples. Each simulation �le
contains multiple rows of data, where each row consists of the
process name, its arrival time, and its
service time. Here is an example:
1
A 0 3
B 2 6
C 4 4
D 6 5
E 8 2
This �le is named process-01.sim in the zip archive of �les I
have given you to get started on this
assignment. This is also the same set of processes and
start/service times used for all of the examples
in table 9.4 and �gure 9.5.
Running Simulations
As with previous assignments you are required to support using
your simulation from the command
line. Your program will take the name of the �le containing the
process information �rst. The next
91. parameter will be either 'rr' to perform round-robin scheduling,
or 'srt' if shortest remaining time policy
is to be simulated. Finally, a 3rd parameter will be supplied for
the round-robin scheduler, the time
slice quantum to use. An example of running your �nished
program should look like this:
$ ./p3 process-01.sim rr 4
A A A B B B B C C C C D D D D B B E E D
Name Fnsh T_r T_r/T_s
----------------------
A 3 3 1
B 17 15 2.5
C 11 7 1.75
D 20 14 2.8
E 19 11 5.5
Here we are running the simulation using the set of process
information given in the previous section
and with a time slice quantum of 4.
Required Output
As shown above, your program must generate 2 bits of output.
First of all, while running the simulation
of the selected scheduling policy, you should display the
process names in the order they are run. In
the previous example, the sequence of scheduled/run processes
92. was:
A A A B B B B C C C C D D D D B B E E D
This indicates that process A ran �rst (times 0, 1 and 2),
followed by B running 4 times (times 3
to 7), etc. You are required to output the sequence of process
runs as the �rst line of output, with a
single space in between each process name as shown.
After the processes have run, you need to calculate and display
the statistics for the processes that
you just simulated. In our previous example, the statistics for
our round-robin simulation with a time
quantum of 4 time slices were:
Name Fnsh T_r T_r/T_s
----------------------
A 3 3 1
B 17 15 2.5
C 11 7 1.75
2
D 20 14 2.8
E 19 11 5.5
For each process, you need to output the time when it �nished,
the turnaround time (Tr) and the
93. ratio of the turnaround time to the service time (Tr/Ts).
I have provided a zip �le with a �le named p3-start.cpp as a
template to get you started. In addition,
I have provided you with two process simulation �les, named
process-01.sim and process-02.sim, with
2 sets of process information you can simulate. There are
several examples of correct results generated
for the two sets of inputs, named things like process-01-q1.res,
process-01-q4.res, process-01-srt.res, etc.
These are the correct results you should get for running your
simulation with round-robin scheduling
for various time quantums or for shortest remaining time
scheduling.
3
processtable-01.sim
A 0 3
B 2 6
C 4 4
D 6 5
E 8 2
processtable-02.sim
A 0 4
B 1 7
C 4 5
D 4 5
E 7 2
F 8 5
G 10 1
H 10 4
I 12 6
94. processtable-03.sim
A 0 3
B 2 4
C 3 5
D 3 8
E 3 2
F 5 6
G 7 9
H 7 4
I 8 3
J 8 5
K 8 4
L 10 6
Makefile
all: p5sol
p5: p5-start.cpp
g++ -g $< -o [email protected]
p5sol: p5-solution.cpp
g++ -g $< -o p5
debug: p5-solution.cpp
g++ -DDEBUG_BUILD=1 -g $< -o p5
p5test:
./p5 processtable-01.sim rr 1 > sim-01-rr-1.tst
@diff -s -q sim-01-rr-1.tst sim-01-rr-1.res
./p5 processtable-01.sim rr 4 > sim-01-rr-4.tst
@diff -s -q sim-01-rr-4.tst sim-01-rr-4.res
./p5 processtable-01.sim srt > sim-01-srt.tst