The invention provides a method and a terminal for running a program. The method includes: when the host needs to execute a Windows program, the client of the Windows API simulator in the virtual machine calls the Windows program only for program invocation, and converts the Windows instructions to the instructions of the current host architecture, and executes the program implementation using the server of the Windows API simulator outside the virtual machine. By using the above scheme, the problem of poor stability of running Windows program in non-X86 host environment is solved. On the basis of guaranteeing running Windows program in non-X86 host, the stability of running program is improved, the performance requirement of virtual machine is reduced, and the power consumption of host is saved.
【技术实现步骤摘要】
运行程序的方法、终端
本专利技术涉及通信领域,具体而言,涉及一种运行程序的方法、终端。
技术介绍
在相关技术中,长久以来,Intel(X86架构的CPU)和Windows形成的Wintel联盟长期占领这PC和服务器市场,建立了良好的生态环境,其它非X86架构的CPU发展受限,甚至部分架构几乎已消失。随着移动互联相关软硬件技术飞速发展,进阶精简指令集机器(AdvancedRISCMachine,简称为ARM)架构的CPU飞速发展,在移动领域占据了主导地位,逐渐建立了自己的生态。另一方面,在国家层面的信息安全和国产化进程的快速推进的大背景下,国产CPU(典型的有MIPS架构(精简指令集,Microprocessorwithoutinterlockedpipedstagesarchitecture)的Loongson和ARM架构的飞腾,运行开源的Linux系统)也得到了快速发展,并在国内特定领域替换了X86架构,并逐步延伸至其它领域。但由于非X86架构的CPU发展起步晚,相比X86来说,生态相对较差,而由于Wintel联盟繁荣已久,导致大量用户对其产生了严重依赖,而Windows操作系统中的绝大部分应用程序都是已经编译完成的二进制程序,由于各种原因(比如没有源码、平台兼容性问题),导致这些应用没有相应的Linux版本。所以有迫切的在非X86环境中直接运行Windows上的二进制应用程序的需求。但实际上,由于Windows和其它操作系统的API接口不同,针对Windows开发的应用程序无法运行于其它OS之上;另一方面,由于X86架构CPU和其它架构CPU的指令集不 ...
【技术保护点】
1.一种运行程序的方法,其特征在于,包括:非X86架构的主机使用视图操作系统应用程序编程接口Windows API模拟器运行Windows应用程序;其中,所述Windows API模拟器包括:位于虚拟机之内WindowsAPI模拟器客户端,位于所述虚拟机之外的Windows API模拟器服务端,其中,所述虚拟机用于模拟所述Windows应用程序的指令至非X86架构指令。
【技术特征摘要】
1.一种运行程序的方法,其特征在于,包括:非X86架构的主机使用视图操作系统应用程序编程接口WindowsAPI模拟器运行Windows应用程序;其中,所述WindowsAPI模拟器包括:位于虚拟机之内WindowsAPI模拟器客户端,位于所述虚拟机之外的WindowsAPI模拟器服务端,其中,所述虚拟机用于模拟所述Windows应用程序的指令至非X86架构指令。2.根据权利要求1所述的方法,其特征在于,非X86架构的主机使用视图操作系统应用程序编程接口WindowsAPI模拟器运行Windows应用程序,包括:所述WindowsAPI模拟器客户端执行所述Windows应用程序,将所述Windows应用程序调用Windows系统的API接口的调用请求发送至所述WindowsAPI模拟器服务端;所述WindowsAPI模拟器服务端在所述主机的本地接口实现所述调用请求获得实现结果,其中,所述本地接口由所述WindowsAPI模拟器客户端向所述WindowsAPI模拟器服务端指示;所述WindowsAPI模拟器客户端接收所述实现结果,继续执行所述Windows应用程序。3.根据权利要求2所述的方法,其特征在于,所述虚拟机为硬件指令模拟器,将所述调用请求发送至所述WindowsAPI模拟器服务端,包括:使用所述硬件指令模拟器模拟所述调用请求为所述主机所属架构的指令;发送模拟后指令至所述WindowsAPI模拟器服务端。4.根据权利要求1所述的方法,其特征在于,非X86架构的主机使用WindowsAPI模拟器运行Windows应用程序之前,所述方法包括:所述主机检测待执行程序的格式;依据所述格式为所述待执行格式指定模拟器,其中,在确定所述格式为Windows应用程序的情况下,使用WindowsAPI模拟器运行Windows应用程序。5.根据...
【专利技术属性】
技术研发人员:蒋彪,蒋勇,史中兵,高瑛,王江勇,刘熠,
申请(专利权)人:中兴通讯股份有限公司,
类型:发明
国别省市:广东,44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。