1. A method of inputting and outputting data, the method comprising: generating a virtual operating system (OS) on a host OS of a host for a wearable device, which is connected to the host, based on OS information stored in the wearable device; setting a partial area of a storage of the host as a virtual storage for the wearable device; selecting one of the virtual storage and a memory of the wearable device for storing the data in response to a request for inputting and outputting the data from the virtual OS; and storing the data in the selected one of the virtual storage and the memory of the wearable device, wherein the selecting of one of the virtual storage and the memory of the wearable device for storing the data comprises: determining whether the data is a temporary file that exists only while a program is being executed; and selecting the virtual storage for storing the data when the data is the temporary file, or one of the virtual storage and the memory of the wearable device by comparing a time taken to store the data in the virtual storage with a time taken to store the data in the memory when the data is not a temporary file.