I recommend that you tour either Edinburgh Castle or Holyroodhouse Palace in the same day. Both tours will take at least 2 hours, so it works out to do one in the morning and one in the afternoon, ...