6 Replies Latest reply: Sep 19, 2007 4:28 AM by 807592 RSS

    scheduling algorithms

    807590
      I need help with how implement cpu scheduling algorithms in java, using class methods??
        • 1. Re: scheduling algorithms
          796440
          That is a very vague and poorly phrased question. Please try again. Be more specific about what you're trying to accomplish and what parts in particular are giving you trouble, and try to be more clear in what you say.

          Given that you say you want to do something in Java "using class methods," I can only suggest you start from the very beginning:


          Sun's basic Java tutorial

          Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.

          http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.

          jGuru. A general Java resource site. Includes FAQs, forums, courses, more.

          JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.

          Bruce Eckel's Thinking in Java (Available online.)

          Joshua Bloch's Effective Java

          Bert Bates and Kathy Sierra's Head First Java.

          James Gosling's The Java Programming Language. Gosling is
          the creator of Java. It doesn't get much more authoratative than this.
          • 2. Re: scheduling algorithms
            807590
            To be more precise, I have been asked to implement cpu scheduling algorithms in a java program, were the different algorithms have been implemented via a 2 dimensional array. We must use class methods to implement each algorithm and finally output the reuslts and sort the data.
            • 3. Re: scheduling algorithms
              807590
              To be more precise, I have been asked to implement
              cpu scheduling algorithms in a java program, were
              the different algorithms have been implemented via a
              2 dimensional array. We must use class methods to
              implement each algorithm and finally output the
              reuslts and sort the data.
              Oh that makes it much more understandable.

              To recap, you want to do stuff with stuff.
              • 4. Re: scheduling algorithms
                796440
                "I've been asked to build a house. They told me to use nails."
                • 5. Re: scheduling algorithms
                  3004
                  To be more precise, I have been asked to implement
                  cpu scheduling algorithms in a java program, were
                  the different algorithms have been implemented via a
                  2 dimensional array. We must use class methods to
                  implement each algorithm and finally output the
                  reuslts and sort the data.
                  So you have an existing framework modelling a computer and now you're expected to supply the CPU scheduling part of the operating system.

                  Well I guess you have a class called Process or so. One Process object is probably allocated when a program is started. One strategy would be to give each Process object a time-slice in a round-robin fashion.

                  How you do this programmatically depends on the classes available in the framework. It cannot be generally answered.
                  • 6. Train scheduling
                    807592
                    Hi'

                    i'm doing train scheduling system as my final year project. i'm using netbeans 5.5.1 IDE. can u plz gv me idea how to solve this train scheduling problem. i hv to address train crossing problem and train overtaking problems. what are the algorithms that can be used and easy implement in java.

                    Thnx

                    thisaraa@gmail.com