Question: Consider two switches A and B with two parallel resources ( we call them channels frequency chunks in FDM or time slots in TDM )

Consider two switches A and B with two parallel resources (we call them channels frequency chunks in FDM or time slots in TDM) that go from A to B. We will call the minimum time it takes for a user called Alice to use the resource once + some margin in time as a time period T. Write a short simulation (in R) that works as follows:
1. There are N users in the system. Each user is independently active (i.e., needs access to one of the two resources) in each time period T with probability p.
What is the average number of users that are active in a time period?
2. Each user draws a random integer between 1 and 10. If more than two users are active in a time period, the two users with the lowest numbers get access to the resources. For N =4 and 8, and p =0.25,0.5 and 0.75, your simulation should run for 1000 time periods. You will create N users, and with given p, you will see if they are active. In each time period, you will check to see how many users are blocked from using resources (they can use it if any one resource is free). Note that a user is blocked if the user is active, and the user is also not one
of the two with the lowest picked numbers. So, the number of blocked users in a time period may be 0 through N-2. Compute the average number of blocked users over the 1000 time periods. Create a table with the average fraction of blocked users (average number blocked/N) for each N and p from your simulation. How does it compare to your number in the question under (1)?
Attach your code as a text file.

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!