Ejemplo n.º 1
0
        public int GetMips()
        {
            int mips = 0;

            switch (AllocationPolicy)
            {
            case TIME_SHARED:
            case OTHER_POLICY_SAME_RATING:
                mips = GetMipsOfOnePe() * HostList.GetNumberOfPes();
                break;

            case SPACE_SHARED:
            case OTHER_POLICY_DIFFERENT_RATING:
                foreach (Host host in HostList)
                {
                    mips += host.GetTotalMips();
                }
                break;

            default:
                break;
            }
            return(mips);
        }
Ejemplo n.º 2
0
 public int GetNumberOfPes()
 {
     return(HostList.GetNumberOfPes());
 }