Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment 1 #1

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Assignment 1 #1

wants to merge 16 commits into from

Conversation

Mosseridan
Copy link
Owner

No description provided.

Operating Systems and others added 16 commits March 22, 2017 22:01
added assignment 1 description
Update README.md
Update README.md
adding the ability to return from procedures (with an implicit call to exit) insted of calling exit explicitly.
added support for uniform distrebution scheduling.
added priority and set_ntickets procedures to alter/set scheduling priorities.
changed scheduling algorithem to ticket based.
task3.1 fixed non runable process ticket assignment
3.1. Uniform time distribution:
In this policy you should distribute the tickets in such a way, so as to achieve a uniform time allocation to the processes (assuming that your implementation of the random number generator achieves a uniform distribution of the returned values).

3.2. Priority scheduling:
This scheduling policy will take the process priority into consideration while deciding the number of tickets to allocate. For example, given two processes p1 and p2 having priorities 1 and 2 accordingly, process p2 will receive approximately twice the run-time received by p1. You should implement a new system call: void priority(int); which can be used by a process to change its priority. The priority of a new processes is 10.

3.3. Dynamic tickets allocation:
This policy will dynamically reallocate the tickets in response to the process behavior. A newly created process will get 20 tickets. Each time a process performs a blocking system call, it will receive additional 10 tickets (up to a maximum of 100 tickets) and each time a process ends the quanta without performing a blocking system call, the amount of the tickets owned by the process will be reduced by 1 (to the minimum of 1).
3.4. Changing the current policy:
In order to be able to select a desired ticket allocation policy you are required to implement a system call void policy(int). The system call receives a policy identifier (i.e., 0, 1 and 2) as an argument and changes the currently used tickets allocation policy. In addition, the system call should redistribute tickets (among the processes) according to the selected policy default values. Additionally, create a user space program called policy which must accept an argument, representing the required policy, and perform a call to the policy system call.

 The default ticket allocation policy should be uniform time distribution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant