Original Post
I'm asking for a homework tip (not [color="#ff0000"]help, emphasizing the word "help".) on how to complete this assignment.
I would rather be asking my professor why would you do this to a computer, and not take this assignment, but unfortunately he's out of state. Even unfortunately, it's for 5 grade points in his Operating System Concept class added to the entire semester. (That means, if you finish this assignment, you will earn 5 grade points on your total class grade. If you have 55 grade points, add 5 to it, and pass the class. I don't know what people called them, but the principles are the same.)
I was thinking of using a simple while loop, to allocate all of the RAMs given on an average computer and then try multithreading to achieve a busy 100% stable CPU, as according to the assignment tasks. But then, a classmate of mine said multithreading won't work that way, and was considering on idling the CPU to the maximum. But he doesn't know how to do it from there.
Usually, professors and other developers will try to avoid these programming tasks as much as possible. To be honest, I have no clue why he wanted to do this. So, I supposed it wouldn't hurt anybody to ask for help on this problem.
Yes, yes, all of you. I know to consequences of writing such a terrible terrible program, even if the program is the homework of our assignment here. But please do forgive me.
I would rather be asking my professor why would you do this to a computer, and not take this assignment, but unfortunately he's out of state. Even unfortunately, it's for 5 grade points in his Operating System Concept class added to the entire semester. (That means, if you finish this assignment, you will earn 5 grade points on your total class grade. If you have 55 grade points, add 5 to it, and pass the class. I don't know what people called them, but the principles are the same.)
I was thinking of using a simple while loop, to allocate all of the RAMs given on an average computer and then try multithreading to achieve a busy 100% stable CPU, as according to the assignment tasks. But then, a classmate of mine said multithreading won't work that way, and was considering on idling the CPU to the maximum. But he doesn't know how to do it from there.
Usually, professors and other developers will try to avoid these programming tasks as much as possible. To be honest, I have no clue why he wanted to do this. So, I supposed it wouldn't hurt anybody to ask for help on this problem.
Yes, yes, all of you. I know to consequences of writing such a terrible terrible program, even if the program is the homework of our assignment here. But please do forgive me.