What do `i` and `Number` represent in the Bakery Algorithm? I am studying the bakery algorithm, and I am unsure of what the variable i represents in it. I understand that Entering represents a bool value to protect Nummber while it is updating, but I'm having a hard time finding clear explanations as to what variable is doing what.

Is Number an array of threads? Is i a particular thread? Or the value being updated?


What do i and Number actually represent? 
What is passed in via Thread(integer i)? The value we are locking? Or a thread ID number?
Is there a value that represents a value being locked?


For reference, here is the Bakery Algorithm I am referencing, from Wikipedia:

   // declaration and initial values of global variables
   Entering: array [1..NUM_THREADS] of bool = {false};
   Number: array [1..NUM_THREADS] of integer = {0};

   lock(integer i) {
       Entering[i] = true;
       Number[i] = 1 + max(Number[1], ..., Number[NUM_THREADS]);
       Entering[i] = false;
       for (integer j = 1; j &lt;= NUM_THREADS; j++) {
           // Wait until thread j receives its number:
           while (Entering[j]) { /* nothing */ }
           // Wait until all threads with smaller numbers or with the same
           // number, but with higher priority, finish their work:
           while ((Number[j] != 0) &amp;&amp; ((Number[j], j) &lt; (Number[i], i))) { /* nothing */ }
       }
   }

   unlock(integer i) {
       Number[i] = 0;
   }

   Thread(integer i) {
       while (true) {
           lock(i);
           // The critical section goes here...
           unlock(i);
           // non-critical section...
       }
   }
As the Wikipedia page says, (emphasis mine),


  Lamport envisioned a bakery with a numbering machine at its entrance so each customer is given a unique number. Numbers increase by one as customers enter the store. A global counter displays the number of the customer that is currently being served. All other customers must wait in a queue until the baker finishes serving the current customer and the next number is displayed. When the customer is done shopping and has disposed of his or her number, the clerk increments the number, allowing the next customer to be served. That customer must draw another number from the numbering machine in order to shop again.
  
  According to the analogy, the "customers" are threads, identified by the letter i, obtained from a global variable.