Newton Laws

The Atwood's Machine is composed of two unequal masses \left(m_2>m_1\right) hunging on inflexible string
from frictionless and massless pulley.

What is the tension in the string? If the string was hunging from the ceiling  was is the mass that it can carry?