private void loadResourcesIDs() {
        LinkedList resList;
        _resourcesIDs = new LinkedList<Integer>();

        // waiting to get list of resources. Since GridSim package uses multi-threaded environment, your request might
        // arrive earlier before one or more grid resource entities manage to register themselves to
        // GridInformationService (GIS) entity. Therefore, it's better to wait in the first place
        //
        while (true) {
            // need to pause for a while to wait GridResources finish registering to GIS. Hold by 1 second.
            //
            super.gridSimHold(1.0);

            resList = GridSim.getGridResourceList();
            if (resList.size() == 0) {
                System.out.println("GpuSimUser: Waiting to get list of resources ...");
                continue;
            }

            for (Object val: resList) {
                _resourcesIDs.add((Integer)val);
            }
            break;
        }
    }