Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

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?

Computer Science
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

@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.
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?

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

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.
sir....what about modern operating systems? sm1 has to choose a process among several processes bases on priority?
On most systems there is a priority scheme for the scheduler, that allows each task to consume some of the CPU time
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
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
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
oh ok i get it
thank you sir! :)
you're welcome, but again I suggest you reading the Free RTOS docs

Not the answer you are looking for?

Search for more explanations.

Ask your own question