Due to resource limitation, the embedded devices connect with each other through network and share resources to provide flexible services in pervasive computing environment. In order to reuse the component and reduce the software cost, the service components should be composed to provide new service. Because the composite service can not run in one device, the dynamic deployment problem of many service components for pervasive computing has become a research focus. Based on Liquid—an embedded and component-based system, a dynamic deployment problem and the algorithm of service component for pervasive computing are presented. First, the service model is described and the problem of dynamic deployment in the pervasive computing environment is defined. Second, according to the resource constraint conditions and two deployment goals of service component, the randomized algorithm and the heuristic algorithm are given to solve the problem. Finally, the experiment data is given to analyze and compare the performance of the different algorithms. According to the method, the service components are deployed into the embedded devices to satisfy resource requirement and improve the resource utilization. The algorithm simulation and analysis indicate that it can be applied to the pervasive computing environment with more devices or service components.