United-atom molecular-dynamics computer simulations of atactic polystyrene (PS) were performed for the bulk and free-standing films of 2 nm – 20 nm thickness, for both linear and cyclic polymers comprised of 80 monomers. Simulated volumetric glass-transition temperatures (Tg) show a strong dependence on the film thickness below 10 nm. The glass-transition temperature of linear PS is 13% lower than that of the bulk for 2.5 nm-thick films, as compared to less than 1% lower for 20 nm films. Our studies reveal that the fraction of the chain-end groups is larger in the interfacial layer with its outermost region approx. 1 nm below the surface than it is in the bulk. The enhanced population of the end groups is expected to result in a more mobile interfacial layer and the consequent dependence of Tg on the film thickness. In addition, the simulations show an enrichment of backbone aliphatic carbons and concomitant deficit of phenyl aromatic carbons in the interfacial film layer. This deficit would weaken the strong phenyl-phenyl aromatic (-) interactions and, hence, lead to a lower film-averaged Tg in thin films, as compared to the bulk sample. To investigate the relative importance of the two possible mechanisms (increased chain ends at the surface or weakened - interactions in the interfacial region), the data for linear PS are compared with those for cyclic PS. For the cyclic PS the reduction of the glass-transition temperature is also significant in thin films, albeit not as much as for linear PS. Moreover, the deficit of phenyl carbons in the film interface is comparable to that observed for linear PS. Therefore, chain-end effects alone cannot explain the observed pronounced Tg dependence on the thickness of thin PS films; the weakened phenyl-phenyl interactions in the interfacial region seems to be an important cause as well.