Site icon Tutor Bin

Create a Program Code C Programming Task

Create a Program Code C Programming Task

Description

Helper Code:

select parameters for the new RS:        /* RS is an initially empty file */
   virtual memory size: P                /* A large integer. Ex: with address size
                                            of 32 bits and page size of 4096, P = 2^20 */
   starting location: s                  /* Initial s must be 0 */
   size of L: e                          /* Small integer representing current locus */
   rate of motion: m                     /* Each page in L is typically referenced only a few
                                            hundred times. Ex: m = 200 */
   probability of transition: t          /* A real number close to 0 since transitions are rare */

repeat until |RS|>= 1,000,000 is generated
   select m random numbers in the range [s:s+e]    /* Process is executing within current locus */
   append the numbers to RS                        /* RS is a file that grows with each iteration */
   generate random number r in the range [0:1]
   if (r < t), generate new s                      /* Process transitions to a new location s */
   else increment s by 1 (modulo P)                /* Process remains within current locus */

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Exit mobile version