This line looks clearly incorrect... are you sure K is really the number of outstanding messages, rather than the product (outstanding_messages * P_Migrate)?