Git Product home page Git Product logo

xv6-scheduling-july-2022's Issues

"init" process never uses its ticket

Dear Sir

As part of our assignment, we were asked to give processes a default ticket value of 1. I have assumed this includes init, the very first process, and have assigned a ticket value of 1 to it. However, once init forks sh, init is always in the sleep state (as seen by procdump), and never ticks again for as long as xv6 runs. If it does not ever run again, it will never use its ticket.

We were asked to reinstate ticket values only when all processes have zero tickets. How do we deal with this apparent contradiction? Or have I missed anything?

Thanks in advance
Showvik
1805068

Should the shell process have a high ticket_original by default?

If I have multiple testticket processes with a moderately high number of tickets (~10), it takes a long time for the shell process to be be selected by the scheduler. So there's a significant waiting time in between when I can input shell commands. I believe its because shell has a default ticket count of 1, although there could be something wrong in my implementation. Please advise.

Also, my implementation of testticket contains an infinite loop at the end so if I run something like:
testticket 5 &; testticket 4 &; testticket 3

The very last process testticket 3 continues running and doesn't return to shell. A possible workaround is having a redundant call at the end like:
testticket 5 &; testticket 4 &; testticket 3 &; echo 1
Will this be acceptable?

Ticket assignment during fork()

Sir we are instructed to pass the parent's ticket number to child's ticket number when fork() called, should it be the parent's Initial ticket number, or the Current ticket number? Its not clearly mentioned in the specs.

Thanks

Md Toki Tahmid
1805030

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.