Cloud computing is a recent breakthrough in which IT infrastructure and applications are provided as "services" to end users under a usage-based payment model. You can leverage virtualisation services even on the fly based on the requirements (workload and QoS patterns) that vary over time. Application services under the Cloud Computing model have complete requirements for provisioning, composing, configuring, and deploying. It is difficult to achieve the performance level of cloud procurement policies, application workload models, and resource performance models repeatable under different system and user configurations and requirements. To overcome this challenge, we propose Cloud Sim: a set of extensible simulation tools that allows modelling and simulation of cloud computing systems and application provisioning environments. The Cloud Sim toolkit supports both the system model and the behaviour of Cloud system components, story data centres, virtual machines (VMs), and resource provisioning policies. It implements generic application procurement techniques that can be extended with ease and limited effort. Currently, the model and simulation of cloud computing environments consisting of simple and interconnected clouds (cloud federation). In addition, it exposes custom interfaces to implement provisioning policies and techniques for mapping virtual machines and interconnected cloud computing scenarios. Several organisations researchers, such as HP Labs in the United States, are using Cloud Sim in their research on cloud resource provisioning and energy-efficient management of data centre resources. The Cloud Sim utility is demonstrated by a case study that involves the dynamic provisioning of application services in the hybrid federated cloud environment. The result of this case study demonstrates that the federated cloud computing model improves QoS requirements of the application under fluctuating patterns of demand for resources and services.