🔒 Locked
impossible execution!
Advertisement
Original Post
Suppose a job waiting to begin execution has a storage requirement that can be fulfilled there and then. Should the job be loaded and begin execution immediately? What other factors/issues should the system first consider?
Until the requested job actually begins execution, it should not consume any "storage space" (you mean "memory," right?)--other than what is required to maintain it's position in the waiting line--so as to allow any previous jobs to complete. Some previous job may require that extra bit of memory in order to finish, but if you assign some new job that memory instead, the previous job will fail.
If you know with some degree of certainty that there will be enough memory available to execute the requested job, then whether or not you start the job immediately is up to you. You may want to allow multiple jobs to run simultaneously, depending on what you're doing, or you might restrict this to one job at a time. With multiple jobs, you run the risk of getting into simultaneous memory access conditions where two or more jobs are trying to read and/or modify a resource at the same time; here you have to decide which job has priority, which job gets what type of access (read and/or write), if and how long a job should wait to gain access, and so on.
Multiple jobs running in parallel has the advantage of completing more jobs in a lower amount of time yet may involve managing certain security routines, while one job at a time is slower but guarantees a more orderly execution phase.
Not sure if that answers your question, but it's a start, right?
If you know with some degree of certainty that there will be enough memory available to execute the requested job, then whether or not you start the job immediately is up to you. You may want to allow multiple jobs to run simultaneously, depending on what you're doing, or you might restrict this to one job at a time. With multiple jobs, you run the risk of getting into simultaneous memory access conditions where two or more jobs are trying to read and/or modify a resource at the same time; here you have to decide which job has priority, which job gets what type of access (read and/or write), if and how long a job should wait to gain access, and so on.
Multiple jobs running in parallel has the advantage of completing more jobs in a lower amount of time yet may involve managing certain security routines, while one job at a time is slower but guarantees a more orderly execution phase.
Not sure if that answers your question, but it's a start, right?
Quote:
Original post by Nypyren
The original question is phrased almost identically to a homework question. Is this homework or can you provide a few more principles of your system that we could use to formulate better answers?
Hrm, now that you mention it, that does sound like homework. Do your own work, samwise! (if this is homework, that is)
If by "homework" you mean "Take-Home Operating Systems final" then yes, my lad, it is homework.
This is where I deactivate this account, after taking you back to my kitchen, and in true Prince fashion, serve you pancakes as he did to Charlie Murphy.
bitches.
This is where I deactivate this account, after taking you back to my kitchen, and in true Prince fashion, serve you pancakes as he did to Charlie Murphy.
bitches.
In all honesty though, why does everybody make such a big deal about answering homework problems?
One could reasonably argue that answering posted homework is unethical and touches - aptly - on plagiarism. But let us consider a scenario where posted replies/answers are not merely regurgitated back to the professor; that instead, the responses facilitate the students understanding of some abstract computing subject:
In this scenario, there are no losers.
Life has its way of "sorting everybody out." Obviously, if I don't take the time to read my 1,000-page OS textbook, and understand this stuff inherently, my knowledge base becomes limited.
In turn, my future salary becomes impeded as my lack of true understanding creates a ceiling over which I cannot rise (unless I go back and actually learn these things).
Thus, posting answers to homework questions is mutually beneficial: To the original poster, his/her questions get answered. A good grade results. As I pointed, out life will take care of the rest. But to the good sameritan responder, he/she gains several benefits in the process as well:
(1) perhaps their vague or "rusty" understanding of the subject will be refined or re-learned
(2) they have contributed to a humane cause in helping out a complete stranger in a way that will benefit that stranger without harming anyone else*
(3) they raise their perceived wisdom-status amongst other peers on the forums
* = Do not argue that this act harms other students in the class; they have access to these forums like anyone else
So whats the big deal? Twenty-years from now I'll be working some job that pays half of what you guys make, because you *took the time* to learn this stuff cold. Lighten up
One could reasonably argue that answering posted homework is unethical and touches - aptly - on plagiarism. But let us consider a scenario where posted replies/answers are not merely regurgitated back to the professor; that instead, the responses facilitate the students understanding of some abstract computing subject:
In this scenario, there are no losers.
Life has its way of "sorting everybody out." Obviously, if I don't take the time to read my 1,000-page OS textbook, and understand this stuff inherently, my knowledge base becomes limited.
In turn, my future salary becomes impeded as my lack of true understanding creates a ceiling over which I cannot rise (unless I go back and actually learn these things).
Thus, posting answers to homework questions is mutually beneficial: To the original poster, his/her questions get answered. A good grade results. As I pointed, out life will take care of the rest. But to the good sameritan responder, he/she gains several benefits in the process as well:
(1) perhaps their vague or "rusty" understanding of the subject will be refined or re-learned
(2) they have contributed to a humane cause in helping out a complete stranger in a way that will benefit that stranger without harming anyone else*
(3) they raise their perceived wisdom-status amongst other peers on the forums
* = Do not argue that this act harms other students in the class; they have access to these forums like anyone else
So whats the big deal? Twenty-years from now I'll be working some job that pays half of what you guys make, because you *took the time* to learn this stuff cold. Lighten up
Gamedev has a strict policy against answering homework questions. That in and of itself should be reason enough not to do so.
Furthermore most homework questions are not related to game programming and therefore should be considered offtopic on any of these forums - except arguably the lounge.
However ignoring those two points - you say
This is not unreasonable and in general the moderators here allow questions about homework so long as they don't feel people are being spoon-fed answers.
Your initial post however was:
Which sounds as though it was copied verbatim off of a test (and your replies seem to indicate that it was). In this case you are not asking for help about a homework problem, you are asking for the answer to a homework problem.
Furthermore most homework questions are not related to game programming and therefore should be considered offtopic on any of these forums - except arguably the lounge.
However ignoring those two points - you say
Quote:
But let us consider a scenario where posted replies/answers are not merely regurgitated back to the professor; that instead, the responses facilitate the students understanding of some abstract computing subject:
This is not unreasonable and in general the moderators here allow questions about homework so long as they don't feel people are being spoon-fed answers.
Your initial post however was:
Quote:
Suppose a job waiting to begin execution has a storage requirement that can be fulfilled there and then. Should the job be loaded and begin execution immediately? What other factors/issues should the system first consider?
Which sounds as though it was copied verbatim off of a test (and your replies seem to indicate that it was). In this case you are not asking for help about a homework problem, you are asking for the answer to a homework problem.
We do actually allow help with homework questions if the poster is putting in an effort themselves and asks specific questions. This generally involves showing your own attempt at solving the problem and then asking about areas you're confused about, asking for criticism of your method, etc. and is not evident in your post which honestly looks more like you're looking to be spoon-fed a response. //EDIT: HERE is an excellent example of someone who appears to be asking a homework question the right way; note he's posted his own thoughts and is asking a specific question rather than having someone solve the whole problem for him. He's also attempted to answer the second question himself and has again asked for pointers rather than being given an answer.
We do not allow people to come here and get complete answers, and there are a couple of reasons for this:
You by all appearances do not fall into the category outlined in your own scenario, or you would have shown us your own attempt and asked for pointers rather than simply typing the question varbatim and waiting for a response.
Thread closed.
We do not allow people to come here and get complete answers, and there are a couple of reasons for this:
- The majority of users who post a homework question will simply take the given answer and submit it, learning little or nothing in the process.
- Learning to research a problem by yourself is an extremely important skill which is bypassed by being given an answer even if you do then consider and learn from that answer.
- If we give answers to one person others will come, and the majority will be one-shot posters who take thier answer (learning nothing from it) and add no value back to the community. The time of our users is valuable, and while they don't mind volunteering it to help others we don't feel that they should be using it to do someone else's work rather than helping out someone who is putting in effort and will appreciate the advice.
Quote:That scenario almost never arises, and it's an unfortunate truth that giving a response in such a scenario will increase the amount of similar occurances where the user in question does not learn from the answer.
But let us consider a scenario where posted replies/answers are not merely regurgitated back to the professor
You by all appearances do not fall into the category outlined in your own scenario, or you would have shown us your own attempt and asked for pointers rather than simply typing the question varbatim and waiting for a response.
Thread closed.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement