Click here to Skip to main content
15,890,995 members
Please Sign up or sign in to vote.
1.00/5 (6 votes)
See more:
i want the code of priority based operating system made in C++ language
make the use of scheduling algorithms
Posted
Updated 7-Aug-10 22:46pm
v2
Comments
Sandeep Mewara 8-Aug-10 7:41am    
Reason for my vote of 1
GimmeCode, No effort
Smithers-Jones 8-Aug-10 8:44am    
Reason for my vote of 1
demanding request for code
Christian Graus 9-Aug-10 2:54am    
Reason for my vote of 1
OP wants people to do his work for him.
Richard MacCutchan 9-Aug-10 3:44am    
I was almost tempted to give you a 5 for the sheer entertainment value of your question.
Ankur\m/ 19-Aug-10 9:30am    
Reason for my vote of 1
I voted 5 by mistake which the post doesn't deserve.
Must correct it with what it deserves. Reasons already stated by so many people.

#include "libraryLoader.h"
#include < iostream>
using namespace std;

typedef bool(*PFNOS)(bool);

class priorityBasedOperatingSystem
{
public:
    priorityBasedOperatingSystem(bool bUseSchedulingAlgorithms)
        :m_bUseSchedulingAlgorithms(bUseSchedulingAlgorithms)
    {
        m_handleToTheLibraryModulesThatContainTheRealCode = libraryLoader::load("realCodeForMyDreamOS");
    }

    // returns false if couldn't run
    bool run()
    {
        if(0 == m_handleToTheLibraryModulesThatContainTheRealCode) 
            return false;
		
	PFNOS pfn = (PFNOS)m_handleToTheLibraryModulesThatContainTheRealCode;
		return pfn(m_bUseSchedulingAlgorithms);
    }
private:
    bool m_bUseSchedulingAlgorithms;
    long m_handleToTheLibraryModulesThatContainTheRealCode;
};

void main()
{
    priorityBasedOperatingSystem pbos;
    if(!pbos.run())
        cout << "StupidHelpersOnCodeProject, we got a problem" << endl;
    else
        cout << "T-A-D-A...I guess you already heard that, doh" << endl;
}


EDIT : I am adding this edit to mention that earlier I edited a few bugs and typos from original post. That must make that a total of 3 edits.
 
Share this answer
 
v5
Comments
TheIdleProgrammer 9-Aug-10 6:19am    
Reason for my vote of 5
Brilliant.
ThatsAlok 10-Aug-10 0:00am    
Haha ha thats great! that should be motto for all CP Lurkers :-)
Nuri Ismail 19-Aug-10 8:49am    
Reason for my vote of 5
Superb! :D
Yusuf 19-Aug-10 9:33am    
Reason for my vote of 5
brilliant
Search for rentacoder[^] on google. This is not the forum you are looking for.
 
Share this answer
 
Comments
AspDotNetDev 8-Aug-10 4:48am    
*does Jedi hand wave*
ThatsAlok 10-Aug-10 0:01am    
hummm.. not here
It does not work like this here. :doh:

Here is what is expected by enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
If you still want code then I would suggest you another forum: CP Jobs[^]
 
Share this answer
 
In which college are you studying
 
Share this answer
 
v2
Sounds a bit like linux to me.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900