+
+ /* Resynchronize actors before second write */
+ simgrid::s4u::this_actor::sleep_for(0.05);
+
+ /* - Write 4,000,000 bytes on Disk1 again and this time :
+ * - Start the I/O operation asynchronously to get an IoPtr
+ * - Let the actor sleep while half of the data is written
+ * - Double its priority
+ * - Wait for the end of the I/O operation
+ *
+ * Writing the second half of the data with a higher priority, and thus 2/3 of the bandwidth takes 0.075s.
+ * In the meantime, the regular writer has only 1/3 of the bandwidth and thus only writes 1MB. After the completion
+ * of the I/O initiated by the privileged writer, the regular writer has the full bandwidth available and only needs
+ * 0.025s to write the last MB.
+ */
+
+ simgrid::s4u::IoPtr io = disk_list.front()->write_async(4000000);
+ simgrid::s4u::this_actor::sleep_for(0.1);
+ XBT_INFO("Increase priority for the priviledged writer (%.0f bytes remaining to write)", io->get_remaining());
+ io->update_priority(2);
+ io->wait();
+ XBT_INFO("Second write done.");