Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

A.Avinash_Goutham Group Title

i read that ther's smthin called a scheduler that picks a process and gives it to the cpu for execution.....but scheduler is also a some code running? so who runs this scheduler thing? cpu? what if ther's a single processor ? how can cpu run two set of code at the same time?

  • 2 years ago
  • 2 years ago

  • This Question is Closed
  1. A.Avinash_Goutham Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @ktobah @nick67

    • 2 years ago
  2. nick67 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    @A.Avinash_Goutham in the past I used homemade scheduler on microcontrollers, where many times there in no room for an operative system or a simple kernel, too. In that case I used a well known trick: you use an hardware interrupt from an internal clock in order to switch from one task to another. The single processor just jumps to an ISR (Interrupt Service Routine) where you save current task context (stopping it) and load next task context (running it), up to the next timer interrupt.

    • 2 years ago
  3. A.Avinash_Goutham Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    like after a process completes execution.....it generates a system call and next one in ihe queue is loaded for execution....is it this way sir?

    • 2 years ago
  4. nick67 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    yes, Avinash, you're right. May I suggest you this reading: http://www.freertos.org/implementation/main.html It's an open source Real Time Operative System well documented and simple to use. I think it's useful for students, too.

    • 2 years ago
  5. A.Avinash_Goutham Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    sir....what about modern operating systems? sm1 has to choose a process among several processes bases on priority?

    • 2 years ago
  6. nick67 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    On most systems there is a priority scheme for the scheduler, that allows each task to consume some of the CPU time

    • 2 years ago
  7. nick67 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    but, if there's any need, a task can also raise a flag (let's say an interrupt) to signal it has an urgent call to serve

    • 2 years ago
  8. A.Avinash_Goutham Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    So ther's s no physical code that requires cpu attention all the time it is just a priority queue that deques it's elements regularly

    • 2 years ago
  9. nick67 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    one processor (single core) can execute one instruction each clock tick; the program counter tells it what is the next instruction, except that in hardware interrupts, that load the program counter with a preset address pointing to ISR

    • 2 years ago
  10. A.Avinash_Goutham Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    oh ok i get it

    • 2 years ago
  11. A.Avinash_Goutham Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    thank you sir! :)

    • 2 years ago
  12. nick67 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    you're welcome, but again I suggest you reading the Free RTOS docs

    • 2 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.