Jump to content

cpu scheduling system

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
9 replies to this topic

#1
robert00

robert00

    Newbie

  • Members
  • Pip
  • 3 posts
please help me.. i want to know how to make a cpu scheduling system using visual basic 6.0 .. hope you can help me..
thanks and advance happy new year to all..

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,722 posts
Why are you using Visual Basic for this? VB is ill-suited to low-level stuff, especially OS work. Your scheduling system depends on a few things:

1)What operating system
2)What computer system (i.e. IBM-compatible, some weird thing, etc.)
3)How many processors are on the system
4)What scheduling algorithm you want to use

Algorithm Types
Preemptive: The OS interrupts a process before it's finished executing to give another one execution time.
Non-preemptive: A process executes until it finishes, at which time another process is given the CPU.

Scheduling Algorithms
Round-Robin: (Preemptive) Each process on the CPU gets a predetermined time slice (usually on the order of a dozen or so milliseconds), and the scheduler just loops through a list of threads endlessly. Most modern OSes use something like this.
First-In-First-Out: (Non-preemptive) Basically like a line at a checkout counter.
Priority-Based: (Either, can be combined with Round-Robin or FIFO) Processes are executed in order of priority, determined somehow. For example, system processes are typically at a higher priority than user programs.
Shortest First: (Non-preemptive) The job that will take the shortest amount of time to complete will be executed first. This isn't used much anymore.
Multi-Level Feedback Queue: Multiple priority levels, each with it's own scheduling algorithm, time quantum, etc.

Seriously, unless you're just doing a simulator, this is waaay beyond VB.

#3
robert00

robert00

    Newbie

  • Members
  • Pip
  • 3 posts
Ok! Thank You so much...

#4
Aram

Aram

    Newbie

  • Members
  • Pip
  • 8 posts
Hey Guys.. I Need Some Help Here !!!
does any one know The Code ( by any language! ) for each of the types of cpu schedualing algorithm types!?!? ... if u know them please let me know ... and im hurry to get this codes...
i mean the code that works like the algorithm type !! Thank You ... :001_unsure:

#5
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,722 posts
What kind of CPU scheduling algorithm? Priority-based or round-robin? FIFO, LIFO, fastest job first? We need more info here. And why doesn't the language matter?

C++ CPU scheduling algorithm demo

#6
Aram

Aram

    Newbie

  • Members
  • Pip
  • 8 posts
i want seven of them ( FCFS, SJF, Priority, Preemptive, RR, Multi level Queue, Multi level feed back Queues ) and for the language! i just need the idea! if it written like:
Begin
get queue
get x job in queue...etc
End
i will understand wots going on ... then i need the idea! dats y ... thank u for help

#7
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,722 posts
This reeks of homework. I suggest you do the reading you've been assigned, Aram.

Scheduling Algorithms (basic intro)
CPU Scheduling - Wikipedia (this has a ton of detailed algorithm descriptions)

#8
Aram

Aram

    Newbie

  • Members
  • Pip
  • 8 posts
hahaha ... yes u r r8 ... its for a homework ...
many thx for ur help! and dont worry im best of my class :rolleyes:
btw i suprise when i saw ur age!!?! WD 2 u ... thx again

#9
LCD

LCD

    Newbie

  • Members
  • PipPip
  • 15 posts
nice work

#10
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,722 posts
You're welcome.