Question: Implement a Lottery Scheduling System The program source code in C is also provided https://github.com/remzi-arpacidusseau/ostep-code/tree/master/cpu-sched-lotte Read, test, and modify the given code to complete this

Implement a Lottery Scheduling System

Implement a Lottery Scheduling System The program source code in C is

also provided https://github.com/remzi-arpacidusseau/ostep-code/tree/master/cpu-sched-lotte Read, test, and modify the given code to complete

The program source code in C is also provided https://github.com/remzi-arpacidusseau/ostep-code/tree/master/cpu-sched-lotte Read, test, and modify the given code to complete this assignment Instructions Write a program in C named lotto.c that simulates a lottery scheduling system, with the following requirements: The scheduling system manages a linked list of users, each with a linked list of jobs belonging to that user (the chart below represents the linked lists produced by the program using the same user inputs as shown in the sample output) . User C Tix: 20 User B TIX: 50 User A Tix: 100 HEAD NULL Job 1 Tix: 100 Job 2 Tix 100 Job 1 Tix: 250 HEAD NULL I HEAD NULL Job 2 Tix 150 Job 1 Tix 350 HEAD . The program prompts the user to enter the number of tickets for each user and jolb . Once the queue is fully populated, one winning user and winning job are randomly selected Sample Output s ./lotto Enter number of tickets for a user (1 when finished 100 Enter number of tickets for a job (1 when finished 350 Enter number of tickets for a job (-1 when finished 150 Enter number of tickets for a job (-1 when finished): -1 Enter number of tickets for a user (1 when finished) 50 Enter number of tickets for a job (-1 when finished) 250 Enter number of tickets for a job (1 when finished 100 Enter number of tickets for a job (-1 when finished): -1 Enter number of tickets for a user (1 when finished) 20 Enter number of tickets for a job (-1 when finished) 100 Enter number of tickets for a job (-1 when finished): -1 Enter number of tickets for a user (1 when finished)-1 Users: [20] [50] [100] Winning Ticket: 33 Winning User: [50] Jobs: [100] [250] Winning Ticket: 106 Winning Job: 2501 The program source code in C is also provided https://github.com/remzi-arpacidusseau/ostep-code/tree/master/cpu-sched-lotte Read, test, and modify the given code to complete this assignment Instructions Write a program in C named lotto.c that simulates a lottery scheduling system, with the following requirements: The scheduling system manages a linked list of users, each with a linked list of jobs belonging to that user (the chart below represents the linked lists produced by the program using the same user inputs as shown in the sample output) . User C Tix: 20 User B TIX: 50 User A Tix: 100 HEAD NULL Job 1 Tix: 100 Job 2 Tix 100 Job 1 Tix: 250 HEAD NULL I HEAD NULL Job 2 Tix 150 Job 1 Tix 350 HEAD . The program prompts the user to enter the number of tickets for each user and jolb . Once the queue is fully populated, one winning user and winning job are randomly selected Sample Output s ./lotto Enter number of tickets for a user (1 when finished 100 Enter number of tickets for a job (1 when finished 350 Enter number of tickets for a job (-1 when finished 150 Enter number of tickets for a job (-1 when finished): -1 Enter number of tickets for a user (1 when finished) 50 Enter number of tickets for a job (-1 when finished) 250 Enter number of tickets for a job (1 when finished 100 Enter number of tickets for a job (-1 when finished): -1 Enter number of tickets for a user (1 when finished) 20 Enter number of tickets for a job (-1 when finished) 100 Enter number of tickets for a job (-1 when finished): -1 Enter number of tickets for a user (1 when finished)-1 Users: [20] [50] [100] Winning Ticket: 33 Winning User: [50] Jobs: [100] [250] Winning Ticket: 106 Winning Job: 2501

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!