Effective scheduling and Timeout
PSY 115 Week 3 Discussion Time Out
PSY 115 Week 3 Discussion Time Out
PSY 115 Week 3
“Time Out” Please respond to the following:
- Please read this MindTools article, “Effective Scheduling”, grab a weekly planner, and then respond to the following questions:
- How much available time do you need to schedule for work each week? What are your typical work hours?
- How much available time do you need to schedule for school each week (completing course work, attending class, etc.)? When do you do your class work each week?
- How much available time do you need to schedule for home or personal activities each week? (Be sure to include sleep and other must-do activities)
- How do you prioritize your time each week and how do these time priorities align with your goals?
PSY 115 Discussion Sleep On It
“Sleep On It” Please respond to the following:
- Please read this NIH News in Health article, “Sleep On It”, then respond to the following questions:
- According to the article, why is sleep so important for memory?
- How much sleep did you get last night? And about how much sleep do you get each night on average?
- What tends to interfere with your ability to get the recommended 7-8 hours of sleep each night?
- What recommendations do you have for getting a good night’s sleep? What has worked for you?
PSY 115 Discussion Supporting Your Juggling Act
“Supporting Your Juggling Act” Please respond to the following:
- Please listen to or read this NPR story, “Moms Head Back-To-School To Pursue College Dreams”, and then respond to the following questions:
- In the NPR interviews, most of the women pointed out the need for support from family and friends when going back to school. What kinds of support from family and friends have been most helpful to you in your own experience of going to school?
- In what ways do you need more support from family and friends? What tips do you have for asking for help?
- What social networks have you found to be helpful outside of your family and personal friends (classmates, mentors, work colleagues, etc.)?
SAMPLE ANSWER
Effective scheduling and Timeout
Introduction
There are several ways to schedule your threads, including preemptive scheduling and basic timeouts. In this article, I’ll explain the different strategies and how they work together to make your code more efficient.
Programmable Timeout
Programmable Timeout
The timeout is the maximum amount of time that a thread can run before being preempted. The default value for all threads is 10 seconds, but you can set it to whatever you want, either in milliseconds or in seconds (or both). If there’s no activity on your program, your threads will automatically be stopped after their default timeout expires. This means that if you want to keep running your program until something happens, such as another process takes over CPU time or network traffic reaches its limit, then this feature lets you do so without any manual intervention by yourself.
Preemption
Preemption is a mechanism that allows the operating system to interrupt a thread. It’s used by the OS to switch between threads, and it can be preempted when it needs to handle an interrupt or if the thread is running too long.
You can use this in your code by adding preemption points:
-
An initialisation function that runs immediately before main() begins running (or whatever else you want). You’ll probably want to call some functions at this point, but don’t worry about them for now – just make sure they’re called!
-
A wait loop which waits until there’s no more work left in any other thread before continuing with yours.
Scheduling Strategies
The operating system schedules threads by the priority of the thread and its current state. The scheduling strategy is the way that the OS decides which thread to run next, based on these factors.
The OS uses a scheduling algorithm to decide which thread to run next, such as round-robin or shortest-first.
Exchange of Tasks
Exchange of tasks is useful to avoid deadlock, but it can be done in many different ways. The exchange of tasks can be done by a single thread or multiple threads. In the case of multiple threads, there are three options: round robin (which allows one task to be run before another), priority based (which assigns each task a priority that determines its order of execution) and windowed (a variation on round robin where some number of threads wait for an object before proceeding with their own work). In all cases, it is important for each worker thread to know when it has received all objects from its predecessor so that no more than one new object will arrive at any given moment in time unless everything goes wrong!
Having a good understanding of the scheduling and timeout mechanisms helps to make good decisions about how you plan your threads.
Having a good understanding of the scheduling and timeout mechanisms helps to make good decisions about how you plan your threads.
Scheduling is used to control when a thread will run on a processor. The scheduler determines which instructions will be executed in which order and for how long. It makes use of an algorithm called “priority queuing”, which ranks instructions from highest to lowest priority based on their timestamp value (the time they were issued). A lower priority instruction can preempt another higher priority instruction that has been running longer than it should have been allowed to run so long as there are no other threads waiting for execution time slots or processors that need them before those higher priority threads finish executing theirs; this means that if there are other processes running in parallel with ours then we may not get our turn at being scheduled!
Conclusion
The next time you have to write a program, it is good to know how these mechanisms work. The best way to learn is by doing experiments and making mistakes. But if you are not sure about your understanding of the scheduling and timeout mechanisms, then don’t hesitate to ask for help from others who have more experience with this subject.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.