U.S. Permanent residency means you have the intent to permanently reside in the U.S. pans you spend the majority of time in the U.S. If you work or stay in another country it is only for a short period of time and you are only visiting the other country. You should never be away from the U.S for more than 6 months and you should establish binding ties to the U.S.