WO2011131003A1 - System for realizing mobile phone buffer storage mechanism and method for loading mobile phone operating system - Google Patents
System for realizing mobile phone buffer storage mechanism and method for loading mobile phone operating system Download PDFInfo
- Publication number
- WO2011131003A1 WO2011131003A1 PCT/CN2010/078863 CN2010078863W WO2011131003A1 WO 2011131003 A1 WO2011131003 A1 WO 2011131003A1 CN 2010078863 W CN2010078863 W CN 2010078863W WO 2011131003 A1 WO2011131003 A1 WO 2011131003A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- mobile phone
- sim card
- volatile memory
- cache
- data
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/14—Details of telephonic subscriber devices including a card reading device
Definitions
- the present invention relates to the field of mobile phone technologies, and more particularly to a system for implementing a mobile phone buffer memory mechanism and a method for loading a mobile phone operating system.
- mobile phones gradually expand from a single voice call and short message service function to a personal information processing mobile terminal having various multimedia entertainment functions.
- two or more mobile phones are becoming more and more popular; on the other hand, mobile phones have become fashionable electronic consumer products, accelerating the frequency of mobile phone replacement.
- Different mobile phones have different operating systems to bring users a very poor experience: not only frequently adapt to the operating system environment of different mobile platforms, but also repeatedly establish their own personalized environment on different mobile platforms (such as installation Your favorite software, etc.).
- the mobile phone operating system can be stored on the large-capacity user identification card SIM, and on this basis, the personal operation environment is established, which solves the trouble brought by the user to replace the mobile phone to some extent.
- the technical problem to be solved by the present invention is to improve a system for implementing a mobile phone buffer memory mechanism and a mobile phone operating system loading method, so as to reduce the operating system cost of loading a mobile phone stored on a SIM card due to limitation of a USB transmission rate. The effect of too long, improving the user experience.
- the present invention uses the following technical solutions:
- a system for implementing a mobile phone buffer memory mechanism comprising:
- a mobile phone a SIM card for interacting with a mobile phone through a communication interface, and a non-volatile memory virtualized as a cache of a SIM card, wherein the SIM card stores a mobile phone operating system and application data, and the mobile phone controls the need for storing the SIM card.
- the mobile phone operating system and application data frequently accessed by the system are pre-read into the non-volatile memory of the virtual memory of the SIM card, and the corresponding data is directly read from the non-volatile memory when the mobile phone accesses the corresponding data.
- the data is provided.
- the mobile phone can include:
- driver module configured to provide a cache on the mobile phone to virtualize the non-volatile memory as a SIM card
- Cache manager module for managing non-volatile memory as a cache, allocating pages, releasing, reclaiming invalid or low-utilization pages, and non-volatile as cache Establishing a data block between the memory and the SIM card - a corresponding mapping relationship;
- a central processing unit for controlling the above modules and controlling the need to store the SIM card
- the mobile operating system and application data frequently accessed by the system are pre-read into a non-volatile memory that is virtualized as a cache of the SIM card.
- the central processor further controls to write back the updated data block to the SIM card.
- a method for loading a mobile phone operating system based on a mobile phone buffer memory mechanism includes:
- the virtual non-volatile memory is a cache of the SIM card
- the mobile phone directly reads and loads the mobile phone operation from the non-volatile memory that is virtualized as the cache memory.
- the data required by the system otherwise, the mobile phone reads the required data from the SIM card into a non-volatile memory that is virtualized as a cache memory, and then reads from the non-volatile memory that is virtualized as a cache memory. Take the data you need to load your phone's operating system.
- the mobile phone operating system before loading the mobile phone operating system, it also includes:
- the integrated circuit card identification code of the SIM card is used as an association between the SIM card and the non-volatile memory for storing data consistency, and the checking whether the non-volatile memory stores the mobile phone operating system data for loading the required access includes :
- the method further includes: when the data block in the non-volatile memory as the cache is updated, the central processor further controls to write back the updated data block to the SIM card.
- the control writes the updated data block back to the SIM card according to the condition of the operating system, the utilization rate of the communication link of the SIM card, the length of the write-back queue, and the power of the mobile phone to determine the priority to perform the write-back.
- the present invention has the following beneficial effects:
- a non-volatile memory is virtualized as a cache of a SIM card; data of a mobile phone operating system and an application that needs to be accessed by the system to be read is pre-read to a cache that is virtualized as a SIM card.
- the mobile phone In the non-volatile memory; if the non-volatile memory stores the mobile phone operating system data for loading the required access, the mobile phone reads the data required to load the mobile phone operating system from the non-volatile memory; The mobile phone reads the required data from the SIM card into the non-volatile memory which is virtualized as the cache of the SIM card, and then reads the data required for loading the mobile phone operating system from the non-volatile memory, smoothing
- the difference in access between the mobile phone and the non-volatile memory and the SIM card speeds up the speed of loading and running the mobile phone operating system and applications stored on the SIM card, and improves the large-capacity SIM card storing the mobile phone operating system.
- the present invention can be used in the hardware abstraction layer of the mobile phone through the underlying driver module.
- the machine's non-volatile memory is abstracted into a cache of large-capacity SIM cards without changing the phone's existing hardware architecture.
- FIG. 1 is a schematic structural diagram of a system of a mobile phone according to the present invention.
- FIG. 2 is a schematic diagram of a specific embodiment of implementing data mapping between a non-volatile memory and a SIM card according to the present invention
- FIG. 3 is a page of a specific embodiment of a non-volatile memory as a cache memory in the present invention.
- FIG. 4 is a flow chart of a specific embodiment of a method for loading a mobile phone operating system based on a mobile phone buffer memory mechanism according to the present invention
- FIG. 5 is a flow chart of a specific embodiment of loading a mobile phone operating system according to the present invention
- FIG. 6 is a schematic diagram of a specific embodiment of implementing a write back service in the present invention.
- the core of the present invention is that the analysis of the operation of the mobile phone operating system and a large number of applications shows that the address of the data that the system needs to access is usually concentrated in the memory logical address space in a short time interval.
- the system has frequent access to localized memory addresses, while addresses outside this range are rarely accessed. Therefore, according to the system's tendency to access the memory, it has a tendency to be concentrated in time.
- the direct access to non-volatile memory (such as Nand flash) is faster than accessing the SIM card through the universal serial interface USB, and the non-volatile memory is used as a high speed between the mobile phone working memory and the high-capacity SIM card.
- the buffer memory (referred to as cache) caches the data on the SIM card that needs to be accessed frequently, which can effectively improve the loading and running speed of the mobile phone operating system and the application application.
- the non-volatile memory has the characteristics of retaining data after power-off.
- the non-volatile memory can not only provide system performance, but also speed up the subsequent startup of the mobile phone. Load the speed of the phone operating system on the SIM card.
- the system for implementing the mobile phone buffer memory mechanism of the present invention mainly comprises: a mobile phone, a SIM card connected to the mobile phone, and a non-volatile memory virtualized as a cache memory of the SIM card, wherein the SIM card stores the mobile phone operating system.
- the mobile phone control pre-reads the mobile phone operating system and/or application data stored by the SIM card that needs to be frequently accessed by the system into a non-volatile memory that is virtualized as a SIM card cache, and is in the mobile phone.
- the corresponding data is accessed, the corresponding data is directly read from the non-volatile memory.
- FIG. 1 is a system structural diagram of a mobile phone according to the present invention; wherein the hardware abstraction layer provides hardware abstraction services to the mobile phone operating system and applications through the hardware abstraction layer interface, and is used in various hardware platforms.
- the development of the operating system kernel provides a unified hardware platform related functionality.
- the present invention needs to include on the mobile phone: a driver module and a cache manager module, and as a control Central processor, where
- Driver module for providing a driver on the mobile phone to virtualize the non-volatile memory
- the SIM card cache memory when implemented, provides a unified file access interface for the upper file system
- Cache manager module for managing non-volatile memory as a cache, allocating pages, releasing, reclaiming invalid or low-utilization pages, and non-volatile as cache Establishing a data block between the memory and the SIM card - a corresponding mapping relationship;
- the central processing unit is configured to control the foregoing module, and pre-read the mobile phone operating system and application data stored by the SIM card that needs to be frequently accessed by the system into a non-volatile memory that is virtualized as a cache of the SIM card. And when the data block in the non-volatile memory as the cache is updated, the central processor also controls to write back the updated data block to the SIM card.
- the cache manager module is specifically described below.
- the non-volatile memory as the cache memory in the present invention may include two levels of data structures, one is a page, one is a data block; the page is a Cache A memory unit when the manager module manages the Cache, where each page contains several data blocks.
- the size of the page may be 4 kb, 16 kb, 64 kb, which is related to the specific mobile operating system and memory management implementation.
- a specific embodiment refers to FIG. 2, assuming that the page size is 4 kb and the data block size is lkb.
- the files (data) required by the system in the SIM card storage may be discontinuous data blocks, the Cache Manager module will The discontinuous data blocks on the SIM card are mapped to the cache page of the non-volatile memory, and the system uses the advantage of the mobile phone to access the non-volatile memory throughput rate, and reads the required data from the cache of the non-volatile memory. Improve the efficiency of the system to read data, thereby improving the performance of the entire system.
- the larger the capacity of the non-volatile memory the larger the Cache that can be used as the SIM card, the more data can be mapped, and the system performance is further improved.
- the hit rate of the Cache When the Cache hits, the data can be directly obtained from the non-volatile memory. It is no longer necessary to access the large-capacity SIM card through the communication interface (such as the USB interface), so the data reading can be significantly accelerated, thereby improving.
- the performance of the system the second is the utilization of the Cache.
- the effective Cache refers to the Cache item that will be accessed. If the ratio of the effective Cache is low, it will not only reduce the hit rate of the Cache, but also waste the capacity of the non-volatile memory. Affect the performance of the system.
- the cache manager module improves the hit rate of the cache by using a pre-reading mechanism, and at the same time, the data block updated by the cache (referred to as dirty block in the present invention) can be written back to the SIM card through a write-back mechanism. .
- the pre-reading mechanism refers to the mobile phone operating the mobile phone operating system or application program of the SIM card, and the central processor controls the files required to run the mobile phone operating system or the application according to the record or the preset policy.
- the data is read into the non-volatile memory cache, and the required data is directly read from the non-volatile memory during the operation of the operating system or the application, and the SIM is not required to be accessed through the USB interface of the SIM card.
- the data on the card is gone. Since the non-volatile memory has the characteristics of retaining data after power-off, the subsequent operation of the mobile phone to load the mobile operating system and run the application can continue to read the required data from the non-volatile memory.
- the above write-back mechanism means that in order to maintain the consistency of the data in the non-volatile memory cache and the data in the SIM card, it is ensured that the updated data in the non-volatile memory cache is not lost due to the overlay, and must be The data updated by the non-volatile memory cache is written back to the SIM card in time and accurately. For example, the non-volatile memory capacity is full, or the data required by the system does not exist in the cache, or a page fault occurs.
- the central processor controls the cache manager module to recycle the cache page with the lowest utilization rate in the non-volatile memory, the "dirty" data block of the cache page is written back to the SIM card before the release is released.
- a cache manager module allocates a suitable page in a non-volatile memory for buffering data of a SIM card, each page including a plurality of data blocks, each The data block corresponds to a data block descriptor.
- the cache manager module manages the data block of the cache by the information held by the data block descriptor, and the data block descriptor contains a series of information related to the data block, such as the status of the data block, and the data block corresponding to the SIM card data block. Map addresses, utilization of data blocks, and more.
- the Cache data block has two states: "clean” and "dirty".
- the data block of the Cache is "clean block", indicating that the data block of the Cache is consistent with the corresponding data block on the SIM card; and when the data block of the Cache is "dirty block", the data block of the Cache has been updated, and needs to be returned.
- the flush memory manager module writes back the "dirty block" of the non-volatile memory to the corresponding SIM card data block according to the dynamic write-back mechanism.
- the utilization ratio of the data block descriptor for the above-mentioned data block descriptor in the present embodiment describes the frequency at which the Cache data block is accessed by the system.
- the cache manager module is responsible for recovering and releasing cache data blocks that are underutilized or expired by the central processor control, so as to improve the utilization of the entire cache.
- the cache management can be dynamically adjusted according to the busyness of the system and the length of the Cache data block write-back queue.
- the priority of the writeback service of the module dynamically schedules the writeback service and performs the writeback operation.
- the system's busy, idle, and Cache write-back queues are long and short, combining different priority levels. When the system is busy or the Cache writeback queue is not long, the system lowers the priority of the writeback service, so that the system resources are not occupied.
- the system improves the writeback.
- the priority of the service enables the "dirty block" in the Cache to be written back to the SIM card in time; when the Cache's write-back queue is full, the system raises the write-back service to the highest level whether the system is idle or not. To prevent the system from "deadlock".
- the priority of the write-back service is combined into more levels, and accordingly, the operating system can write back to the service. For more detailed scheduling, the efficiency of the write-back service and the performance of the system are improved.
- the write operation is mutually exclusive atomic; after the writeback is completed, the Cache and SIM card are unlocked in time to prevent a "deadlock" condition.
- the accidental power-off of the mobile phone may cause data loss or even damage the original operating system stored on the SIM card. Therefore, before the Cache Manager module performs the write-back process, it can calculate whether the current mobile phone battery has enough power to complete the write-back operation, and ensure that the non-volatile memory update can be smoothly written back to the SIM card as a specific For an embodiment, reference may be made to FIG.
- the cache manager module needs a SIM card-related identifier to manage the cache, for example
- the integrated circuit card identification code ICCID of the SIM card may be associated with the Cache of the nonvolatile memory, but the specific implementation may not be limited to this implementation.
- the cache manager module determines whether the ICCID associated with the cache of the non-volatile memory and the ICCID of the SIM card are consistent, when the cache of the non-volatile memory
- the associated ICCID and the ICCID of the SIM card indicate that the cache data of the non-volatile memory is consistent with the SIM card, and the mobile phone can directly load the required data from the cache of the non-volatile memory (for example, mobile operating system data).
- the cache manager module can also write back the cache "dirty block" of the non-repeated memory that was not written back to the SIM card; when the ICCID is inconsistent, the non-volatile memory
- the data of the cache is not the data of the SIM card (the SIM card is replaced).
- the Nand flash cache mechanism is used to load the mobile phone operating system on the SIM card; or the Nand flash cache data is locked and saved, and the cache memory is cached.
- the Nand flash cache mechanism is invalid.
- the mobile phone can load the mobile phone operating system on the SIM card through the USB interface, and the user selects the loading mode.
- the following describes a method for loading a mobile phone operating system based on a mobile phone buffer memory mechanism.
- FIG. 4 is a flowchart of a specific embodiment of a method for loading a mobile phone operating system based on a mobile phone buffer memory mechanism according to the present invention, which mainly includes:
- Step 1 The virtual non-volatile memory is a cache memory of the SIM card.
- Step 2 pre-reading the operating system data of the mobile phone that needs to be accessed by the system to be read into the non-volatile memory of the virtual memory of the SIM card.
- how to implement the pre-reading can refer to the foregoing description, where No longer;
- Step 3 If the non-volatile memory stores the mobile phone operating system data for loading the required access, the mobile phone directly loads the mobile phone operating system from the non-volatile memory that is virtualized as a cache memory. Otherwise, the mobile phone is from the SIM.
- the card reads the required data into a non-volatile memory that is virtualized as a cache of the SIM card, and then reads data required to load the mobile phone operating system from the non-volatile memory.
- the method further includes: checking whether the mobile phone operating system data required for loading is stored in the non-volatile memory, and specifically implementing, for example, taking the separation of the machine card, etc.
- the integrated circuit card of the SIM card can be identified
- the code is used as an association between the SIM card and the data stored in the non-volatile memory to distinguish whether the data of the non-volatile memory is consistent with the data on the SIM card.
- And checking whether the mobile phone operating system data for loading the required access is stored in the non-volatile memory may include: if the cache of the non-volatile memory has data, checking the cache of the non-volatile memory and the integrated circuit card identification code of the SIM card Whether they are the same, if they are the same, it is determined that the data of the cache of the non-volatile memory is consistent with the SIM card; otherwise, it is determined that the data of the cache of the non-volatile memory is inconsistent with the data of the SIM card (ie, the SIM card is replaced).
- the cache Nand flash cache mechanism After the mobile phone or empty the cache Nand flash cache, use the cache Nand flash cache mechanism to load the mobile phone operating system on the SIM card; or lock and save the data of the cache Nand flash cache, the cache Nand The flash cache mechanism is invalid, and the mobile phone loads the mobile phone operating system on the SIM card through the USB interface, and the user selects the loading mode.
- the loading process mainly includes:
- Step 101 The mobile phone is turned on
- Step 102 detecting whether the non-volatile memory cache of the mobile phone has data, if there is already data, proceeding to step 103, otherwise proceeding to step 106;
- Step 103 Comparing whether the ICCID on the non-volatile memory cache and the SIM card are consistent. When the ICCID is the same, indicating that the data of the non-volatile memory cache is consistent with the SIM card, proceed to step 107; when the ICCID is inconsistent, enter the step 104;
- Step 104 The cache of the non-volatile memory is inconsistent with the ICCID on the SIM card, and two startup modes are provided for the user to select;
- Step 105 The user selects to clear the non-volatile memory cache, and re-uses the non-volatile memory cache to load the SIM card mobile phone operating system;
- Step 106 The mobile phone pre-predicts the data required to load the operating system from the SIM card through the USB interface, and saves the data to the non-volatile memory cache;
- Step 107 The mobile phone loads the mobile phone operating system from the non-volatile memory cache, and the cache manager module manages the non-volatile memory cache, and continues to pre-read the files required for the system to run from the SIM card, and then Go to step 109;
- Step 108 The user selects to retain the data of the original non-volatile memory cache, the mobile phone locks the non-volatile memory cache, and closes the non-volatile memory cache mechanism, and the mobile phone passes the USB interface to load the operation on the SIM card.
- Step 109 Run the mobile operating system and the phone startup process ends.
- the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are included in the present invention, should be included in the present invention. Within the scope of protection.
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
Abstract
A system for realizing mobile phone buffer storage mechanism and a method for loading mobile phone operating system are disclosed in the present solution. The system includes a mobile phone, a SIM card exchanging data with the mobile phone through a communication interface, and a non-volatile memory performed as a virtual cache of the SIM card, wherein the SIM card stores data of a mobile phone operating system and applications, the mobile phone controls to pre-read the data of the mobile phone operating system and applications stored in the SIM card which is frequently visited by the system into the non-volatile memory performed as a virtual cache of the SIM card, and reads the corresponding data from the non-volatile memory directly when the mobile phone visits the corresponding data. The present solution can accelerate the speed of the mobile phone loading and running the mobile phone operating system and applications stored in the SIM card, improve the user experience of a large storage SIM card storing a mobile phone operating system, and not need to change the present hardware architecture of a mobile phone.
Description
实现手机緩冲存储器机制的系统及手机操作系统加载方法 System for realizing mobile phone buffer memory mechanism and mobile phone operating system loading method
技术领域 本发明涉及手机技术领域, 更具体的说, 本发明涉及一种实现手 机緩冲存储器机制的系统及手机操作系统加载的方法。 TECHNICAL FIELD The present invention relates to the field of mobile phone technologies, and more particularly to a system for implementing a mobile phone buffer memory mechanism and a method for loading a mobile phone operating system.
背景技术 目前, 手机逐渐从单一的语音通话、短信业务功能扩展为具有各 种多媒体娱乐功能的个人信息处理移动终端。一方面,人手两部或几 部手机变得越来越普遍; 另一方面, 手机成为时尚的电子消费产品, 加快了手机更新换代的频率。而不同的手机具有不同的操作系统给用 户带来极差的体验效果:不仅要频繁地适应不同手机平台的操作系统 环境, 而且要重复地在不同的手机平台上建立自己的个性环境(如安 装自己喜欢的软件等) 。 当前, 已经可在大容量的用户身份识别卡 SIM上存储手机操作系 统, 并在此基础上建立自己的个性操作环境, 一定程度上解决了用户 更换手机所带来的麻烦。但由于受到通用串行总线 USB传输速率的限 制, 手机通过用户身份识别卡 SIM上的通用串行总线 USB接口将 SIM 卡上的手机操作系统读取到手机自身的工作存储器 RAM上运行的过 程比较緩慢, 使得手机每次开机要花费很长的时间来加载操作系统 , 给用户带来诸多不便。
发明内容 本发明解决的技术问题是提高一种实现手机緩冲存储器机制的 系统及手机操作系统加载的方法, 以降低由于 USB传输速率的限制 带来的手机加载存储于 SIM卡上的操作系统花费过长时间的影响, 提高用户的体验。 为解决上述问题, 本发明釆用如下技术方案: BACKGROUND OF THE INVENTION At present, mobile phones gradually expand from a single voice call and short message service function to a personal information processing mobile terminal having various multimedia entertainment functions. On the one hand, two or more mobile phones are becoming more and more popular; on the other hand, mobile phones have become fashionable electronic consumer products, accelerating the frequency of mobile phone replacement. Different mobile phones have different operating systems to bring users a very poor experience: not only frequently adapt to the operating system environment of different mobile platforms, but also repeatedly establish their own personalized environment on different mobile platforms (such as installation Your favorite software, etc.). At present, the mobile phone operating system can be stored on the large-capacity user identification card SIM, and on this basis, the personal operation environment is established, which solves the trouble brought by the user to replace the mobile phone to some extent. However, due to the limitation of the universal serial bus USB transmission rate, the mobile phone reads the mobile phone operating system on the SIM card to the working memory RAM of the mobile phone through the universal serial bus USB interface on the user identification card SIM. Slow, it takes a long time to load the operating system every time the phone is turned on, which brings a lot of inconvenience to the user. SUMMARY OF THE INVENTION The technical problem to be solved by the present invention is to improve a system for implementing a mobile phone buffer memory mechanism and a mobile phone operating system loading method, so as to reduce the operating system cost of loading a mobile phone stored on a SIM card due to limitation of a USB transmission rate. The effect of too long, improving the user experience. In order to solve the above problems, the present invention uses the following technical solutions:
一种实现手机緩冲存储器机制的系统, 其包括: A system for implementing a mobile phone buffer memory mechanism, comprising:
手机, 通过通信接口与手机交互数据的 SIM卡以及虚拟为 SIM 卡的高速緩冲存储器的非易失性存储器, 其中 SIM卡存储有手机操 作系统和应用程序数据, 手机控制将 SIM卡存储的需要被系统经常 访问的手机操作系统和应用程序数据预读到虚拟为 SIM卡的高速緩 冲存储器的非易失性存储器中,并在手机访问相应的数据时直接从非 易失性存储器读取对应的数据。 A mobile phone, a SIM card for interacting with a mobile phone through a communication interface, and a non-volatile memory virtualized as a cache of a SIM card, wherein the SIM card stores a mobile phone operating system and application data, and the mobile phone controls the need for storing the SIM card. The mobile phone operating system and application data frequently accessed by the system are pre-read into the non-volatile memory of the virtual memory of the SIM card, and the corresponding data is directly read from the non-volatile memory when the mobile phone accesses the corresponding data. The data.
其中, 手机可包括: Among them, the mobile phone can include:
驱动程序模块,用于在手机上提供驱动将非易失性存储器虚拟为 SIM卡的高速緩冲存储器; a driver module, configured to provide a cache on the mobile phone to virtualize the non-volatile memory as a SIM card;
高速緩冲存储器管理器模块,用于管理作为高速緩冲存储器的非 易失性存储器, 分配页面, 释放、 回收无效的或利用率低的页面, 并 在作为高速緩冲存储器的非易失性存储器和 SIM卡之间建立数据块 ——对应的映射关系; Cache manager module for managing non-volatile memory as a cache, allocating pages, releasing, reclaiming invalid or low-utilization pages, and non-volatile as cache Establishing a data block between the memory and the SIM card - a corresponding mapping relationship;
中央处理器, 用于控制上述模块, 并控制将 SIM卡存储的需要
被系统经常访问的手机操作系统和应用程序数据预读到虚拟为 SIM 卡的高速緩冲存储器的非易失性存储器中。 a central processing unit for controlling the above modules and controlling the need to store the SIM card The mobile operating system and application data frequently accessed by the system are pre-read into a non-volatile memory that is virtualized as a cache of the SIM card.
其中,若作为高速緩冲存储器的非易失性存储器中的数据块更新 时, 所述中央处理器还控制将更新的数据块回写到 SIM卡中。 Wherein, if the data block in the non-volatile memory as the cache is updated, the central processor further controls to write back the updated data block to the SIM card.
另外, 一种基于手机緩冲存储器机制加载手机操作系统的方法, 其包括: In addition, a method for loading a mobile phone operating system based on a mobile phone buffer memory mechanism includes:
虚拟非易失性存储器为 SIM卡的高速緩冲存储器; The virtual non-volatile memory is a cache of the SIM card;
将需要被系统加载所需访问的手机操作系统数据预读到虚拟为 SIM卡的高速緩冲存储器的非易失性存储器中; Pre-reading the operating system data of the mobile phone that needs to be accessed by the system loading into the non-volatile memory of the virtual memory of the SIM card;
若虚拟为高速緩冲存储器的非易失性存储器中存储有加载所需 访问的手机操作系统数据,则手机直接从所述虚拟为高速緩冲存储器 的非易失性存储器中读取加载手机操作系统时所需的数据, 否则, 手 机从 SIM卡读取所需的数据到虚拟为高速緩冲存储器的非易失性存 储器中,再从虚拟为高速緩冲存储器的非易失性存储器中读取加载手 机操作系统时所需的数据。 If the non-volatile memory virtualized as the cache memory stores the mobile phone operating system data for loading the required access, the mobile phone directly reads and loads the mobile phone operation from the non-volatile memory that is virtualized as the cache memory. The data required by the system, otherwise, the mobile phone reads the required data from the SIM card into a non-volatile memory that is virtualized as a cache memory, and then reads from the non-volatile memory that is virtualized as a cache memory. Take the data you need to load your phone's operating system.
其中, 加载手机操作系统之前还包括: Among them, before loading the mobile phone operating system, it also includes:
检查非易失性存储器中是否存储有加载所需访问的手机操作系 统数据。 Check if the mobile operating system data loaded with the required access is stored in the non-volatile memory.
其中, 将 SIM卡的集成电路卡识别码作为 SIM卡与非易失性存 储器中存储数据一致性的关联 ,所述检查非易失性存储器中是否存储 有加载所需访问的手机操作系统数据包括: Wherein, the integrated circuit card identification code of the SIM card is used as an association between the SIM card and the non-volatile memory for storing data consistency, and the checking whether the non-volatile memory stores the mobile phone operating system data for loading the required access includes :
检查非易失性存储器与 SIM卡的集成电路卡识别码是否相同,
若相同,则确定非易失性存储器存储有加载所需访问的手机操作系统 数据, 否则, 确定非易失性存储器没有存储有加载所需访问的手机操 作系统数据。 Check if the non-volatile memory and the SIM card's integrated circuit card ID are the same, If the same, it is determined that the non-volatile memory stores the mobile operating system data for loading the required access, otherwise, it is determined that the non-volatile memory does not store the mobile operating system data for loading the required access.
另外, 还包括: 若作为高速緩冲存储器的非易失性存储器中的数 据块更新时, 所述中央处理器还控制将更新的数据块回写到 SIM卡 中。 In addition, the method further includes: when the data block in the non-volatile memory as the cache is updated, the central processor further controls to write back the updated data block to the SIM card.
其中, 所述控制将更新的数据块回写到 SIM卡中是: 根据操作 系统的状况, SIM卡的通信链路的利用率, 回写队列的长度及手机的 电量确定优先级执行回写。 与现有技术相比, 本发明具有以下有益效果: The control writes the updated data block back to the SIM card according to the condition of the operating system, the utilization rate of the communication link of the SIM card, the length of the write-back queue, and the power of the mobile phone to determine the priority to perform the write-back. Compared with the prior art, the present invention has the following beneficial effects:
本发明中通过将非易失性存储器虚拟为 SIM卡的高速緩冲存储 器;将需要被系统加载所需访问的手机操作系统和应用程序的数据预 读到虚拟为 SIM卡的高速緩冲存储器的非易失性存储器中; 若非易 失性存储器中存储有加载所需访问的手机操作系统数据,则手机从所 述非易失性存储器中读取加载手机操作系统时所需的数据, 否则, 手 机从 SIM卡读取所需的数据到虚拟为 SIM卡的高速緩冲存储器的非 易失性存储器中 ,再从非易失性存储器中读取加载手机操作系统时所 需的数据, 平滑了手机对非易失性存储器和 SIM卡两种硬件的访问 差异, 加快了手机加载、 运行存储于 SIM卡上的手机操作系统和应 用程序的速度, 提高了存储有手机操作系统的大容量 SIM卡的用户 体验; In the present invention, a non-volatile memory is virtualized as a cache of a SIM card; data of a mobile phone operating system and an application that needs to be accessed by the system to be read is pre-read to a cache that is virtualized as a SIM card. In the non-volatile memory; if the non-volatile memory stores the mobile phone operating system data for loading the required access, the mobile phone reads the data required to load the mobile phone operating system from the non-volatile memory; The mobile phone reads the required data from the SIM card into the non-volatile memory which is virtualized as the cache of the SIM card, and then reads the data required for loading the mobile phone operating system from the non-volatile memory, smoothing The difference in access between the mobile phone and the non-volatile memory and the SIM card speeds up the speed of loading and running the mobile phone operating system and applications stored on the SIM card, and improves the large-capacity SIM card storing the mobile phone operating system. User experience;
另外 ,本发明可通过底层驱动程序模块在手机的硬件抽象层将手
机的非易失存储器抽象成大容量 SIM卡的高速緩冲存储器, 无需改 变手机现有的硬件体系结构。 In addition, the present invention can be used in the hardware abstraction layer of the mobile phone through the underlying driver module. The machine's non-volatile memory is abstracted into a cache of large-capacity SIM cards without changing the phone's existing hardware architecture.
附图说明 图 1是本发明手机的系统结构示意图; BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a schematic structural diagram of a system of a mobile phone according to the present invention;
图 2是本发明实现非易失性存储器与 SIM卡之间数据映射的一 种具体实施例示意图; 图 3 是本发明中作为高速緩冲存储器的非易失性存储器的一种 具体实施例页面和数据块结构图; 图 4 是本发明基于手机緩冲存储器机制加载手机操作系统的方 法的一种具体实施例流程图; 2 is a schematic diagram of a specific embodiment of implementing data mapping between a non-volatile memory and a SIM card according to the present invention; FIG. 3 is a page of a specific embodiment of a non-volatile memory as a cache memory in the present invention. And a data block structure diagram; FIG. 4 is a flow chart of a specific embodiment of a method for loading a mobile phone operating system based on a mobile phone buffer memory mechanism according to the present invention;
图 5是本发明加载手机操作系统的一种具体实施例流程图; 图 6是本发明中实现回写服务的具体实施例示意图。 FIG. 5 is a flow chart of a specific embodiment of loading a mobile phone operating system according to the present invention; FIG. 6 is a schematic diagram of a specific embodiment of implementing a write back service in the present invention.
具体实施方式 本发明的核心在于通过对手机操作系统和大量应用程序运行情 况的分析结果表明, 在一个较短的时间间隔内, 系统需要访问的数据 的地址通常集中在存储器逻辑地址空间很小的范围内,即系统对局部 范围的存储器地址频繁访问, 而对此范围以外的地址则很少访问。 为 此,根据系统对存储器的访问具有时间上集中分布的倾向, 可利用系
统直接访问非易失性存储器(例如 Nand flash ) 的速度比通过通用串 行接口 USB访问 SIM卡速度快的特点, 将非易失性存储器作为手机 工作存储器和大容量 SIM 卡之间的一个高速緩冲存储器 (简称为 cache ),緩存需要经常被访问的 SIM卡上的数据, 可有效提高手机操 作系统和运用应用程序的加载、 运行速度。 DETAILED DESCRIPTION OF THE INVENTION The core of the present invention is that the analysis of the operation of the mobile phone operating system and a large number of applications shows that the address of the data that the system needs to access is usually concentrated in the memory logical address space in a short time interval. Within the scope, the system has frequent access to localized memory addresses, while addresses outside this range are rarely accessed. Therefore, according to the system's tendency to access the memory, it has a tendency to be concentrated in time. The direct access to non-volatile memory (such as Nand flash) is faster than accessing the SIM card through the universal serial interface USB, and the non-volatile memory is used as a high speed between the mobile phone working memory and the high-capacity SIM card. The buffer memory (referred to as cache) caches the data on the SIM card that needs to be accessed frequently, which can effectively improve the loading and running speed of the mobile phone operating system and the application application.
同时, 非易失存储器具有断电后仍能保持数据的特性, 非易失存 储器作为存储有手机操作系统的大容量 SIM卡的 cache, 不仅能提供 系统的性能, 而且还可以加快手机后续开机时加载 SIM卡上的手机 操作系统的速度。 At the same time, the non-volatile memory has the characteristics of retaining data after power-off. As a cache of a large-capacity SIM card storing the mobile phone operating system, the non-volatile memory can not only provide system performance, but also speed up the subsequent startup of the mobile phone. Load the speed of the phone operating system on the SIM card.
为此, 本发明实现手机緩冲存储器机制的系统主要包括有: 手机, 与手机相连的 SIM卡以及虚拟为 SIM卡的高速緩冲存储 器的非易失性存储器, 其中 SIM卡存储有手机操作系统和应用程序 数据, 手机控制将 SIM卡存储的需要被系统经常访问的手机操作系 统和 /或应用程序数据预读到虚拟为 SIM卡的高速緩冲存储器的非易 失性存储器中,并在手机访问相应的数据时直接从非易失性存储器读 取对应的数据。 To this end, the system for implementing the mobile phone buffer memory mechanism of the present invention mainly comprises: a mobile phone, a SIM card connected to the mobile phone, and a non-volatile memory virtualized as a cache memory of the SIM card, wherein the SIM card stores the mobile phone operating system. And application data, the mobile phone control pre-reads the mobile phone operating system and/or application data stored by the SIM card that needs to be frequently accessed by the system into a non-volatile memory that is virtualized as a SIM card cache, and is in the mobile phone. When the corresponding data is accessed, the corresponding data is directly read from the non-volatile memory.
具体实现时, 参考图 1 , 该图为本发明手机的系统结构图; 其中硬件抽象层通过硬件抽象层接口向手机操作系统以及应用 程序提供对硬件抽象后的服务,为在各种不同硬件平台上的操作系统 内核的开发提供统一的硬件平台相关的功能。 For specific implementation, refer to FIG. 1 , which is a system structural diagram of a mobile phone according to the present invention; wherein the hardware abstraction layer provides hardware abstraction services to the mobile phone operating system and applications through the hardware abstraction layer interface, and is used in various hardware platforms. The development of the operating system kernel provides a unified hardware platform related functionality.
而为实现上述的高速緩冲存储器(cache ), 本发明中在手机上需 要包括有: 驱动程序模块和高速緩冲存储器管理器模块, 以及作为控
制的中央处理器, 其中 In order to implement the above cache (cache), the present invention needs to include on the mobile phone: a driver module and a cache manager module, and as a control Central processor, where
驱动程序模块,用于在手机上提供驱动将非易失性存储器虚拟为 Driver module for providing a driver on the mobile phone to virtualize the non-volatile memory
SIM卡的高速緩冲存储器, 具体实现时, 可为上层的文件系统提供一 个统一的文件访问接口; The SIM card cache memory, when implemented, provides a unified file access interface for the upper file system;
高速緩冲存储器管理器模块,用于管理作为高速緩冲存储器的非 易失性存储器, 分配页面, 释放、 回收无效的或利用率低的页面, 并 在作为高速緩冲存储器的非易失性存储器和 SIM卡之间建立数据块 ——对应的映射关系; Cache manager module for managing non-volatile memory as a cache, allocating pages, releasing, reclaiming invalid or low-utilization pages, and non-volatile as cache Establishing a data block between the memory and the SIM card - a corresponding mapping relationship;
中央处理器, 用于控制上述模块, 将 SIM卡存储的需要被系统 经常访问的手机操作系统和应用程序数据预读到虚拟为 SIM卡的高 速緩冲存储器的非易失性存储器中。而当作为高速緩冲存储器的非易 失性存储器中的数据块更新时,所述中央处理器还控制将更新的数据 块回写到 SIM卡中。 下面具体说明高速緩冲存储器管理器模块, 具体实现时, 本发明 中作为高速緩冲存储器的非易失性存储器可包括两个层次的数据结 构,一个是页面,一个是数据块;页面是 Cache管理器模块管理 Cache 时的一个内存单元, 其中每个页面又包含了若干个数据块。在具体的 实施例里, 页面的大小可能是 4kb, 16kb, 64kb, 跟具体的手机操作 系统和内存管理实现相关。 例如, 一个具体的实施例参考图 2, 假定 页面的大小为 4kb, 数据块大小为 lkb。 系统所需的文件(数据)在 SIM卡的存储可能是不连续的数据块,高速緩冲存储器管理器模块将
SIM卡上不连续的数据块映射到非易失性存储器的 cache 页面上,系 统利用手机访问非易失存储器的吞吐率的优势,从非易失性存储器的 cache里读取所需的数据, 提高系统读取数据的效率, 进而提高整个 系统的性能。 The central processing unit is configured to control the foregoing module, and pre-read the mobile phone operating system and application data stored by the SIM card that needs to be frequently accessed by the system into a non-volatile memory that is virtualized as a cache of the SIM card. And when the data block in the non-volatile memory as the cache is updated, the central processor also controls to write back the updated data block to the SIM card. The cache manager module is specifically described below. In the specific implementation, the non-volatile memory as the cache memory in the present invention may include two levels of data structures, one is a page, one is a data block; the page is a Cache A memory unit when the manager module manages the Cache, where each page contains several data blocks. In a specific embodiment, the size of the page may be 4 kb, 16 kb, 64 kb, which is related to the specific mobile operating system and memory management implementation. For example, a specific embodiment refers to FIG. 2, assuming that the page size is 4 kb and the data block size is lkb. The files (data) required by the system in the SIM card storage may be discontinuous data blocks, the Cache Manager module will The discontinuous data blocks on the SIM card are mapped to the cache page of the non-volatile memory, and the system uses the advantage of the mobile phone to access the non-volatile memory throughput rate, and reads the required data from the cache of the non-volatile memory. Improve the efficiency of the system to read data, thereby improving the performance of the entire system.
另外, 在具体实现时, 非易失存储器的容量越大, 可作为 SIM 卡的 Cache就越大, 能够映射更多的数据, 系统性能就得到更大的提 高。 In addition, in the specific implementation, the larger the capacity of the non-volatile memory, the larger the Cache that can be used as the SIM card, the more data can be mapped, and the system performance is further improved.
需要说明的, 具体实现时, 衡量上述高速緩冲存储器管理器模块 设计的好坏有两个指标。 一是 Cache的命中率, Cache命中时数据可 以直接从非易失性存储器中获取,不再需要通过通信接口(例如 USB 接口 )访问大容量 SIM卡, 因而可以显著加快数据的读取, 进而提 高系统的性能; 二是 Cache的利用率, 有效 Cache是指真正会被访问 到的 Cache项, 如果有效 Cache的比率偏低, 不但降低 Cache的命中 率, 而且会浪费非易失存储器的容量, 最后影响系统的性能。 本发明 中高速緩冲存储器管理器模块通过预读取机制来提高 Cache 的命中 率, 同时, 可通过回写机制将 Cache更新的数据块(本发明中简称为 脏块) 回写到 SIM卡上。 Need to explain, in the specific implementation, there are two indicators to measure the quality of the above cache manager module design. The first is the hit rate of the Cache. When the Cache hits, the data can be directly obtained from the non-volatile memory. It is no longer necessary to access the large-capacity SIM card through the communication interface (such as the USB interface), so the data reading can be significantly accelerated, thereby improving. The performance of the system; the second is the utilization of the Cache. The effective Cache refers to the Cache item that will be accessed. If the ratio of the effective Cache is low, it will not only reduce the hit rate of the Cache, but also waste the capacity of the non-volatile memory. Affect the performance of the system. In the present invention, the cache manager module improves the hit rate of the cache by using a pre-reading mechanism, and at the same time, the data block updated by the cache (referred to as dirty block in the present invention) can be written back to the SIM card through a write-back mechanism. .
具体实现时, 上述的预读取机制是指手机在加载 SIM卡的手机 操作系统或应用程序前,中央处理器根据记录或预先设置的策略控制 将运行手机操作系统或应用程序所需的文件和数据读取到非易失性 存储器緩存起来, 在操作系统或应用程序运行的期间, 直接从非易失 性存储器读取所需的数据, 无需再通过 SIM卡的 USB接口访问 SIM
卡上的数据了。 由于非易失存储器具有断电后保持数据的特性, 所以 在手机后续的开机加载手机操作系统、运行应用程序仍能继续从非易 失性存储器读取所需的数据。 In the specific implementation, the pre-reading mechanism refers to the mobile phone operating the mobile phone operating system or application program of the SIM card, and the central processor controls the files required to run the mobile phone operating system or the application according to the record or the preset policy. The data is read into the non-volatile memory cache, and the required data is directly read from the non-volatile memory during the operation of the operating system or the application, and the SIM is not required to be accessed through the USB interface of the SIM card. The data on the card is gone. Since the non-volatile memory has the characteristics of retaining data after power-off, the subsequent operation of the mobile phone to load the mobile operating system and run the application can continue to read the required data from the non-volatile memory.
另外, 上述的回写机制是指为了保持非易失性存储器 cache中的 数据与 SIM卡中的数据的一致性,确保非易失性存储器 cache中更新 的数据不会因覆盖而丟失, 必须将非易失性存储器 cache更新的数据 及时准确地回写到 SIM卡上, 具体实现时, 例如可在非易失性存储 器容量已满,或者系统所需的数据不存在 cache中,或者发生缺页时, 中央处理器控制高速緩冲存储器管理器模块将非易失性存储器中利 用率最低的 cache页面回收释放,回收释放前,把 cache页面的 "脏" 的数据块回写到 SIM卡中。 In addition, the above write-back mechanism means that in order to maintain the consistency of the data in the non-volatile memory cache and the data in the SIM card, it is ensured that the updated data in the non-volatile memory cache is not lost due to the overlay, and must be The data updated by the non-volatile memory cache is written back to the SIM card in time and accurately. For example, the non-volatile memory capacity is full, or the data required by the system does not exist in the cache, or a page fault occurs. When the central processor controls the cache manager module to recycle the cache page with the lowest utilization rate in the non-volatile memory, the "dirty" data block of the cache page is written back to the SIM card before the release is released.
参考图 3 , 在本发明的一个具体实施例里, 高速緩冲存储器管理 器模块在非易失存储器里分配合适的页面用于緩存 SIM卡的数据, 每个页面包含若干个数据块, 每个数据块则对应一个数据块描述符。 高速緩冲存储器管理器模块通过数据块描述符保存的信息管理 cache 的数据块,数据块描述符包含了与数据块相关的一系列信息, 如数据 块的状态、 数据块对应 SIM卡数据块的映射地址、 数据块的利用率 等等。 Referring to FIG. 3, in one embodiment of the present invention, a cache manager module allocates a suitable page in a non-volatile memory for buffering data of a SIM card, each page including a plurality of data blocks, each The data block corresponds to a data block descriptor. The cache manager module manages the data block of the cache by the information held by the data block descriptor, and the data block descriptor contains a series of information related to the data block, such as the status of the data block, and the data block corresponding to the SIM card data block. Map addresses, utilization of data blocks, and more.
Cache的数据块有 "干净" 和 "脏" 两种状态。 Cache的数据块 是 "干净块" 表示 Cache的数据块和 SIM卡上所对应的数据块是一 致的; 而 Cache的数据块是 "脏块" 时, 则 Cache的数据块已经更新 了, 需要回写到所对应的 SIM卡上, 通过中央处理器控制, 高速緩
冲存储器管理器模块根据动态的回写机制将非易失性存储器的 "脏块" 回写到对应的 SIM卡数据块上。 本实施例中上述的数据块描述符用 数据块的利用率描述 Cache数据块被系统访问的频率。当非易失性存 储器的容量紧张时, 通过中央处理器控制, 高速緩冲存储器管理器模 块负责回收、 释放利用率低的或已经失效的 cache数据块, 以提高整 个 Cache的利用率。 The Cache data block has two states: "clean" and "dirty". The data block of the Cache is "clean block", indicating that the data block of the Cache is consistent with the corresponding data block on the SIM card; and when the data block of the Cache is "dirty block", the data block of the Cache has been updated, and needs to be returned. Write to the corresponding SIM card, controlled by the central processor, high speed The flush memory manager module writes back the "dirty block" of the non-volatile memory to the corresponding SIM card data block according to the dynamic write-back mechanism. The utilization ratio of the data block descriptor for the above-mentioned data block descriptor in the present embodiment describes the frequency at which the Cache data block is accessed by the system. When the capacity of the non-volatile memory is tight, the cache manager module is responsible for recovering and releasing cache data blocks that are underutilized or expired by the central processor control, so as to improve the utilization of the entire cache.
而为了不影响手机操作系统的运行且兼顾非易失性存储器的利 用率及回写操作的实时性,可根据系统的繁忙程度和 Cache数据块回 写队列的长度动态地调整高速緩冲存储器管理器模块的回写服务的 优先级, 根据优先级的高低, 动态地调度回写服务, 执行回写操作。 系统的繁忙、 空闲, 和 Cache回写队列的长、 短, 组合成不同的优先 级级别。 当系统繁忙或 Cache的回写队列不长时, 系统降低回写服务 的优先级,使系统资源不被占用; 当系统处于空闲状态或 Cache的回 写队列达到一定长度时, 系统则提升回写服务的优先级,使 Cache里 的 "脏块" 能及时地回写更新到 SIM卡上; 当 Cache的回写队列已 满时, 无论系统空闲与否, 系统都将回写服务提升到最高级别, 以防 止系统发生 "死锁"。 In order not to affect the operation of the mobile operating system and take into account the utilization of the non-volatile memory and the real-time nature of the write-back operation, the cache management can be dynamically adjusted according to the busyness of the system and the length of the Cache data block write-back queue. The priority of the writeback service of the module, according to the priority level, dynamically schedules the writeback service and performs the writeback operation. The system's busy, idle, and Cache write-back queues are long and short, combining different priority levels. When the system is busy or the Cache writeback queue is not long, the system lowers the priority of the writeback service, so that the system resources are not occupied. When the system is in the idle state or the Cache writeback queue reaches a certain length, the system improves the writeback. The priority of the service enables the "dirty block" in the Cache to be written back to the SIM card in time; when the Cache's write-back queue is full, the system raises the write-back service to the highest level whether the system is idle or not. To prevent the system from "deadlock".
具体实现时,可对操作系统的繁忙程度和回写队列的长度作更细 粒度的划分时,使回写服务的优先级组合成更多层次的级别 ,相应地, 操作系统可以对回写服务作更加精细的调度,提高了回写服务的效率 和系统的性能。 In a specific implementation, when the busyness of the operating system and the length of the write-back queue are more fine-grained, the priority of the write-back service is combined into more levels, and accordingly, the operating system can write back to the service. For more detailed scheduling, the efficiency of the write-back service and the performance of the system are improved.
需要说明的, 在回写的过程中, 要对 Cache和 SIM卡加锁, 保
证写入操作是互斥的原子性; 回写完成后, 及时解锁 Cache和 SIM 卡, 防止发生 "死锁" 情况。 另外, 在执行回写操作时, 手机意外断 电将可能造成数据的丟失, 甚至损坏 SIM卡存储的原操作系统。 因 此在 Cache管理器模块执行回写过程前,可计算当前的手机电池是否 有足够的电量完成回写操作,保证非易失性存储器的更新能顺利的回 写到 SIM卡里, 作为一个具体的实施例, 可参考图 6, 该图是系统调 度 Cache的回写服务的示意图,其中 Cache回写服务的优先级由系统 的繁忙程度和 Cache数据块的回写队列共同决定。 另外, 考虑到卡机分离的情况, 如手机更换 SIM卡时, 而非易 失性存储器的 cache跟特定 SIM卡相关,所以高速緩冲存储器管理器 模块需要 SIM卡相关的标识来管理 Cache, 例如, 在具体实施例中, 可釆用 SIM卡的集成电路卡识别码 ICCID关联非易失存储器的 Cache , 但具体实现时可不限于这种实现方式。 当手机后续开机启动时, 非易 失存储器的 cache已经存在数据时, 高速緩冲管理器模块判断非易失 存储器的 cache关联的 ICCID和 SIM卡的 ICCID是否一致, 当非易 失性存储器的 cache关联的 ICCID和 SIM卡的 ICCID—致时, 表明 非易失性存储器的 cache的数据和 SIM卡一致,手机可以直接从非易 失性存储器的 cache 中加载所需的数据(例如手机操作系统数据), 同时,高速緩冲存储器管理器模块还可将上次未回写完的非易失性存 储器的 cache "脏块" 回写到 SIM卡去; 当 ICCID不一致时, 非易 失性存储器的 cache的数据不是 SIM卡的数据 (更换了 SIM卡)。 手
机或者清空作为高速緩冲存储器 Nand flash cache后, 再利用高速緩 冲存储器 Nand flash cache机制加载 SIM卡上的手机操作系统; 或者 锁定、 保存高速緩冲存储器 Nand flash cache的数据, 高速緩冲存储 器 Nand flash cache机制就失效了,手机可通过 USB接口加载 SIM卡 上的手机操作系统了, 由用户选择加载方式。 Need to explain, in the process of writing back, you need to lock the Cache and SIM card, The write operation is mutually exclusive atomic; after the writeback is completed, the Cache and SIM card are unlocked in time to prevent a "deadlock" condition. In addition, when the write-back operation is performed, the accidental power-off of the mobile phone may cause data loss or even damage the original operating system stored on the SIM card. Therefore, before the Cache Manager module performs the write-back process, it can calculate whether the current mobile phone battery has enough power to complete the write-back operation, and ensure that the non-volatile memory update can be smoothly written back to the SIM card as a specific For an embodiment, reference may be made to FIG. 6, which is a schematic diagram of a writeback service of a system scheduling cache, where the priority of the Cache writeback service is determined by the busyness of the system and the writeback queue of the Cache data block. In addition, in consideration of the separation of the card machine, such as when the mobile phone replaces the SIM card, and the cache of the non-volatile memory is associated with a specific SIM card, the cache manager module needs a SIM card-related identifier to manage the cache, for example In a specific embodiment, the integrated circuit card identification code ICCID of the SIM card may be associated with the Cache of the nonvolatile memory, but the specific implementation may not be limited to this implementation. When the mobile phone is subsequently booted up, when the cache of the non-volatile memory already has data, the cache manager module determines whether the ICCID associated with the cache of the non-volatile memory and the ICCID of the SIM card are consistent, when the cache of the non-volatile memory The associated ICCID and the ICCID of the SIM card indicate that the cache data of the non-volatile memory is consistent with the SIM card, and the mobile phone can directly load the required data from the cache of the non-volatile memory (for example, mobile operating system data). At the same time, the cache manager module can also write back the cache "dirty block" of the non-repeated memory that was not written back to the SIM card; when the ICCID is inconsistent, the non-volatile memory The data of the cache is not the data of the SIM card (the SIM card is replaced). hand After the machine is emptied or used as the cache Nand flash cache, the Nand flash cache mechanism is used to load the mobile phone operating system on the SIM card; or the Nand flash cache data is locked and saved, and the cache memory is cached. The Nand flash cache mechanism is invalid. The mobile phone can load the mobile phone operating system on the SIM card through the USB interface, and the user selects the loading mode.
下面说明本发明基于手机緩冲存储器机制加载手机操作系统的 方法。 The following describes a method for loading a mobile phone operating system based on a mobile phone buffer memory mechanism.
参考图 4, 该图是本发明基于手机緩冲存储器机制加载手机操作 系统的方法的一种具体实施例流程图, 主要包括: Referring to FIG. 4, the figure is a flowchart of a specific embodiment of a method for loading a mobile phone operating system based on a mobile phone buffer memory mechanism according to the present invention, which mainly includes:
步骤 1 ,虚拟非易失性存储器为 SIM卡的高速緩冲存储器, 具体 实现虚拟时, 可参考前述说明, 这里不再赘述; Step 1: The virtual non-volatile memory is a cache memory of the SIM card. When the virtual implementation is implemented, refer to the foregoing description, and details are not described herein.
步骤 2, 将需要被系统加载所需访问的手机操作系统数据预读到 虚拟为 SIM卡的高速緩冲存储器的非易失性存储器中,具体实现时, 如何实现预读可参考前述说明, 这里不再赘述; Step 2, pre-reading the operating system data of the mobile phone that needs to be accessed by the system to be read into the non-volatile memory of the virtual memory of the SIM card. In specific implementation, how to implement the pre-reading can refer to the foregoing description, where No longer;
步骤 3 , 若非易失性存储器中存储有加载所需访问的手机操作系 统数据,则手机直接从所述虚拟为高速緩冲存储器的非易失性存储器 中加载手机操作系统, 否则, 手机从 SIM卡读取所需的数据到虚拟 为 SIM卡的高速緩冲存储器的非易失性存储器中, 再从非易失性存 储器中读取加载手机操作系统时所需的数据。 Step 3: If the non-volatile memory stores the mobile phone operating system data for loading the required access, the mobile phone directly loads the mobile phone operating system from the non-volatile memory that is virtualized as a cache memory. Otherwise, the mobile phone is from the SIM. The card reads the required data into a non-volatile memory that is virtualized as a cache of the SIM card, and then reads data required to load the mobile phone operating system from the non-volatile memory.
需要说明的, 本发明中加载手机操作之前还可包括: 检查非易失 性存储器中是否存储有加载所需访问的手机操作系统数据,具体实现 时, 例如, 考了到机卡分离等情况, 可将 SIM卡的集成电路卡识别
码作为 SIM卡与非易失性存储器中存储数据一致性的关联, 以辨别 非易失存储器的数据与 SIM卡上的数据是否一致。 而上述检查非易 失性存储器中是否存储有加载所需访问的手机操作系统数据可包括: 若非易失存储器的 cache存在数据, 检查非易失性存储器的 cache与 SIM卡的集成电路卡识别码是否相同, 若相同, 则确定非易失性存储 器的 cache的数据和 SIM卡一致,否则,确定非易失性存储器的 cache 的数据与 SIM卡的数据不一致(即更换了 SIM卡) 。 手机或者清空 高速緩冲存储器 Nand flash cache后, 再利用高速緩冲存储器 Nand flash cache机制加载 SIM卡上的手机操作系统; 或者锁定、保存高速 緩冲存储器 Nand flash cache的数据,高速緩冲存储器 Nand flash cache 机制就失效了, 手机就通过 USB接口加载 SIM卡上的手机操作系统 了, 由用户选择加载方式。 It should be noted that, before loading the mobile phone operation in the present invention, the method further includes: checking whether the mobile phone operating system data required for loading is stored in the non-volatile memory, and specifically implementing, for example, taking the separation of the machine card, etc. The integrated circuit card of the SIM card can be identified The code is used as an association between the SIM card and the data stored in the non-volatile memory to distinguish whether the data of the non-volatile memory is consistent with the data on the SIM card. And checking whether the mobile phone operating system data for loading the required access is stored in the non-volatile memory may include: if the cache of the non-volatile memory has data, checking the cache of the non-volatile memory and the integrated circuit card identification code of the SIM card Whether they are the same, if they are the same, it is determined that the data of the cache of the non-volatile memory is consistent with the SIM card; otherwise, it is determined that the data of the cache of the non-volatile memory is inconsistent with the data of the SIM card (ie, the SIM card is replaced). After the mobile phone or empty the cache Nand flash cache, use the cache Nand flash cache mechanism to load the mobile phone operating system on the SIM card; or lock and save the data of the cache Nand flash cache, the cache Nand The flash cache mechanism is invalid, and the mobile phone loads the mobile phone operating system on the SIM card through the USB interface, and the user selects the loading mode.
下面以一个具体实施例说明加载手机操作系统的过程 ,参考图 5 , 加载过程主要包括: The following describes a process of loading a mobile phone operating system in a specific embodiment. Referring to FIG. 5, the loading process mainly includes:
步骤 101 : 手机开机; Step 101: The mobile phone is turned on;
步骤 102 : 检测手机的非易失性存储器 cache 是否有数据, 如 果已经存在数据, 则进入步骤 103 , 否则进入步骤 106; Step 102: detecting whether the non-volatile memory cache of the mobile phone has data, if there is already data, proceeding to step 103, otherwise proceeding to step 106;
步骤 103 : 比较非易失性存储器 cache和 SIM卡上的 ICCID是 否一致, 当 ICCID—致时,表明非易失性存储器 cache的数据和 SIM 卡一致, 进入步骤 107; 当 ICCID不一致时, 进入步骤 104; Step 103: Comparing whether the ICCID on the non-volatile memory cache and the SIM card are consistent. When the ICCID is the same, indicating that the data of the non-volatile memory cache is consistent with the SIM card, proceed to step 107; when the ICCID is inconsistent, enter the step 104;
步骤 104 : 非易失性存储器的 cache和 SIM卡上的 ICCID不一 致, 提供两种启动方式给用户选择;
步骤 105 : 用户选择了清空非易失性存储器 cache, 重新使用非 易失性存储器 cache加载 SIM卡的手机操作系统; Step 104: The cache of the non-volatile memory is inconsistent with the ICCID on the SIM card, and two startup modes are provided for the user to select; Step 105: The user selects to clear the non-volatile memory cache, and re-uses the non-volatile memory cache to load the SIM card mobile phone operating system;
步骤 106 : 手机按照预设定的策略预, 通过 USB接口从 SIM卡读 取加载操作系统所需数据, 并保存到非易失性存储器 cache中; Step 106: The mobile phone pre-predicts the data required to load the operating system from the SIM card through the USB interface, and saves the data to the non-volatile memory cache;
步骤 107 : 手机从非易失性存储器 cache中加载手机操作系统, 同时高速緩冲存储器管理器模块负责管理非易失性存储器 cache, 继 续从 SIM卡上预读取系统运行所需要的文件, 然后进入步骤 109; 步骤 108 :用户选择了保留原先非易失性存储器 cache的数据, 手机锁定非易失性存储器 cache,并关闭非易失性存储器 cache机制, 手机通 USB接口加载 SIM卡上的操作系统; Step 107: The mobile phone loads the mobile phone operating system from the non-volatile memory cache, and the cache manager module manages the non-volatile memory cache, and continues to pre-read the files required for the system to run from the SIM card, and then Go to step 109; Step 108: The user selects to retain the data of the original non-volatile memory cache, the mobile phone locks the non-volatile memory cache, and closes the non-volatile memory cache mechanism, and the mobile phone passes the USB interface to load the operation on the SIM card. System
步骤 109 : 运行手机操作系统, 手机启动过程结束。 以上所述仅为本发明的较佳实施例而已,并不用以限制本发明型 , 凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等, 均应包含在本发明的保护范围之内。
Step 109: Run the mobile operating system and the phone startup process ends. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are included in the present invention, should be included in the present invention. Within the scope of protection.
Claims
1、 一种实现手机緩冲存储器机制的系统, 其特征在于, 包括: 手机, 通过通信接口与手机交互数据的 SIM卡以及虚拟为 SIM 卡的高速緩冲存储器的非易失性存储器, 其中 SIM卡存储有手机操 作系统和应用程序数据, 手机控制将 SIM卡存储的需要被系统经常 访问的手机操作系统和应用程序数据预读到虚拟为 SIM卡的高速緩 冲存储器的非易失性存储器中,并在手机访问相应的数据时直接从非 易失性存储器读取对应的数据。 A system for implementing a mobile phone buffer memory mechanism, comprising: a mobile phone, a SIM card for interacting with a mobile phone through a communication interface, and a non-volatile memory virtualized as a cache memory of the SIM card, wherein the SIM The card stores the mobile phone operating system and application data, and the mobile phone control pre-reads the mobile phone operating system and application data stored by the SIM card that needs to be frequently accessed by the system into a non-volatile memory that is virtualized as a cache of the SIM card. And read the corresponding data directly from the non-volatile memory when the mobile phone accesses the corresponding data.
2、 根据权利要求 1所述的系统, 其特征在于, 手机包括: 驱动程序模块,用于在手机上提供驱动将非易失性存储器虚拟为 SIM卡的高速緩冲存储器; 2. The system according to claim 1, wherein the mobile phone comprises: a driver module, configured to provide a cache on the mobile phone to virtualize the non-volatile memory as a SIM card;
高速緩冲存储器管理器模块,用于管理作为高速緩冲存储器的非 易失性存储器, 分配页面, 释放、 回收无效的或利用率低的页面, 并 在作为高速緩冲存储器的非易失性存储器和 SIM卡之间建立数据块 ——对应的映射关系; Cache manager module for managing non-volatile memory as a cache, allocating pages, releasing, reclaiming invalid or low-utilization pages, and non-volatile as cache Establishing a data block between the memory and the SIM card - a corresponding mapping relationship;
中央处理器, 用于控制上述模块, 并控制将 SIM卡存储的需要 被系统经常访问的手机操作系统和应用程序数据预读到虚拟为 SIM 卡的高速緩冲存储器的非易失性存储器中。 The central processing unit is configured to control the above modules, and control the pre-reading of the mobile phone operating system and application data stored by the SIM card that needs to be frequently accessed by the system into the non-volatile memory of the virtual memory of the SIM card.
3、 根据权利要求 2所述的系统, 其特征在于, 若作为高速緩冲 存储器的非易失性存储器中的数据块更新时,所述中央处理器还控制 将更新的数据块回写到 SIM卡中。 3. The system according to claim 2, wherein the central processor further controls when a data block in the non-volatile memory as the cache is updated Write the updated data block back to the SIM card.
4、 一种基于手机緩冲存储器机制加载手机操作系统的方法, 其 特征在于, 包括: 4. A method for loading a mobile phone operating system based on a mobile phone buffer memory mechanism, the method comprising:
虚拟非易失性存储器为 SIM卡的高速緩冲存储器; The virtual non-volatile memory is a cache of the SIM card;
将需要被系统加载所需访问的手机操作系统数据预读到虚拟为 SIM卡的高速緩冲存储器的非易失性存储器中; Pre-reading the operating system data of the mobile phone that needs to be accessed by the system loading into the non-volatile memory of the virtual memory of the SIM card;
若虚拟为高速緩冲存储器的非易失性存储器中存储有加载所需 访问的手机操作系统数据,则手机直接从所述虚拟为高速緩冲存储器 的非易失性存储器中读取加载手机操作系统时所需的数据, 否则, 手 机从 SIM卡读取所需的数据到虚拟为高速緩冲存储器的非易失性存 储器中,再从虚拟为高速緩冲存储器的非易失性存储器中读取加载手 机操作系统时所需的数据。 If the non-volatile memory virtualized as the cache memory stores the mobile phone operating system data for loading the required access, the mobile phone directly reads and loads the mobile phone operation from the non-volatile memory that is virtualized as the cache memory. The data required by the system, otherwise, the mobile phone reads the required data from the SIM card into a non-volatile memory that is virtualized as a cache memory, and then reads from the non-volatile memory that is virtualized as a cache memory. Take the data you need to load your phone's operating system.
5、 根据权利要求 4所述的方法, 其特征在于, 加载手机操作系 统之前还包括: 5. The method according to claim 4, wherein before loading the mobile phone operating system, the method further comprises:
检查非易失性存储器中是否存储有加载所需访问的手机操作系 统数据。 Check if the mobile operating system data loaded with the required access is stored in the non-volatile memory.
6、 根据权利要求 5所述的方法, 其特征在于, 将 SIM卡的集成 电路卡识别码作为 SIM卡与非易失性存储器中存储数据一致性的关 联,所述检查非易失性存储器中是否存储有加载所需访问的手机操作 系统数据包括: The method according to claim 5, wherein the integrated circuit card identification code of the SIM card is used as an association between the SIM card and the non-volatile memory for storing data consistency, and the checking is performed in the non-volatile memory. Whether to store the phone operation that loads the required access System data includes:
检查非易失性存储器与 SIM卡的集成电路卡识别码是否相同, 若相同,则确定非易失性存储器存储有加载所需访问的手机操作系统 数据, 否则, 确定非易失性存储器没有存储有加载所需访问的手机操 作系统数据。 Checking whether the non-volatile memory and the SIM card's integrated circuit card identification code are the same. If they are the same, it is determined that the non-volatile memory stores the mobile phone operating system data for loading the required access. Otherwise, it is determined that the non-volatile memory is not stored. There is mobile operating system data loaded for the required access.
7、 根据权利要求 5所述的方法, 其特征在于, 还包括: 若作为 高速緩冲存储器的非易失性存储器中的数据块更新时 ,所述中央处理 器还控制将更新的数据块回写到 SIM卡中。 7. The method according to claim 5, further comprising: controlling, when the data block in the non-volatile memory as the cache is updated, the central processor to return the updated data block Write to the SIM card.
8、 根据权利要求 7所述的方法, 其特征在于, 所述控制将更新 的数据块回写到 SIM卡中是: 根据操作系统的状况, SIM卡的通信 链路的利用率, 回写队列的长度及手机的电量确定优先级执行回写。 8. The method according to claim 7, wherein the controlling to write back the updated data block to the SIM card is: according to the condition of the operating system, the utilization rate of the communication link of the SIM card, the write-back queue The length and the power of the phone determine the priority to perform the write back.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010159779.3 | 2010-04-23 | ||
CN2010101597793A CN102236530A (en) | 2010-04-23 | 2010-04-23 | System for realizing mobile phone buffer memory mechanism and method for loading mobile phone operation system |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2011131003A1 true WO2011131003A1 (en) | 2011-10-27 |
Family
ID=44833669
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2010/078863 WO2011131003A1 (en) | 2010-04-23 | 2010-11-18 | System for realizing mobile phone buffer storage mechanism and method for loading mobile phone operating system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102236530A (en) |
WO (1) | WO2011131003A1 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103593324B (en) * | 2013-11-12 | 2017-06-13 | 上海新储集成电路有限公司 | A kind of quick startup low-power consumption computer on-chip system with self-learning function |
CN104156745B (en) * | 2014-08-12 | 2017-06-13 | 烽火通信科技股份有限公司 | The method and device of high-speed read-write SIM in separation between machine and card formula terminal |
WO2016161604A1 (en) * | 2015-04-09 | 2016-10-13 | 华为技术有限公司 | Mobile terminal, maintenance server and maintenance method and apparatus for virtual sim card |
CN107678798A (en) * | 2017-09-30 | 2018-02-09 | 努比亚技术有限公司 | A kind of SIM card fast initializing method, device and computer-readable recording medium |
CN108322905A (en) * | 2018-01-19 | 2018-07-24 | 维沃移动通信有限公司 | A kind of method for reading data and mobile terminal |
CN108684036B (en) * | 2018-04-28 | 2021-11-23 | 南京润阳淀粉制品有限责任公司 | Electronic terminal and eSIM data processing method based on trusted execution environment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1856138A (en) * | 2005-04-20 | 2006-11-01 | 英华达(上海)电子有限公司 | Quickly turning-on of mobile telephone |
KR20080095226A (en) * | 2008-10-08 | 2008-10-28 | 에스케이씨앤씨 주식회사 | Reducing method of loading time of sim card data when booting of mobile communication terminal |
CN101355770A (en) * | 2008-09-12 | 2009-01-28 | 普天信息技术研究院有限公司 | Method and system for virtually spreading capacity of user recognizing module card |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1320842C (en) * | 2004-12-31 | 2007-06-06 | 大唐微电子技术有限公司 | Real-time simulation developing method and system for SIM toolkit |
WO2009087534A1 (en) * | 2007-12-30 | 2009-07-16 | Corder, Angela, Eaton | Data backup system in a mobile phone |
CN101588642A (en) * | 2008-05-21 | 2009-11-25 | 广州盛华信息技术有限公司 | Subscriber identity model and handheld device |
CN102202129B (en) * | 2010-03-23 | 2014-06-25 | 广州盛华信息技术有限公司 | Method for loading mobile phone operating system |
-
2010
- 2010-04-23 CN CN2010101597793A patent/CN102236530A/en active Pending
- 2010-11-18 WO PCT/CN2010/078863 patent/WO2011131003A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1856138A (en) * | 2005-04-20 | 2006-11-01 | 英华达(上海)电子有限公司 | Quickly turning-on of mobile telephone |
CN101355770A (en) * | 2008-09-12 | 2009-01-28 | 普天信息技术研究院有限公司 | Method and system for virtually spreading capacity of user recognizing module card |
KR20080095226A (en) * | 2008-10-08 | 2008-10-28 | 에스케이씨앤씨 주식회사 | Reducing method of loading time of sim card data when booting of mobile communication terminal |
Also Published As
Publication number | Publication date |
---|---|
CN102236530A (en) | 2011-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3920034B1 (en) | Systems and methods for scalable and coherent memory devices | |
EP4109230B1 (en) | Storage system, file storage and reading method, and terminal device | |
US10552337B2 (en) | Memory management and device | |
WO2018059079A1 (en) | Memory management method and apparatus | |
US10846215B2 (en) | Persistent content in nonvolatile memory | |
JP6250700B2 (en) | Reducing volatile memory power consumption through the use of non-volatile memory | |
JP2019061699A (en) | Device and method for providing cache movement with non-volatile mass memory system | |
WO2011131003A1 (en) | System for realizing mobile phone buffer storage mechanism and method for loading mobile phone operating system | |
TW200910100A (en) | Cache memory having configurable associativity | |
WO2012159394A1 (en) | Method and apparatus for managing mobile device memory | |
CN113778662B (en) | Memory recovery method and device | |
CN112214247B (en) | System starting method and related equipment | |
CN115794682A (en) | Cache replacement method and device, electronic equipment and storage medium | |
EP4030289A1 (en) | Method and device for virtual machine memory management | |
EP4328705A1 (en) | Storage space arrangement method and electronic device | |
CN110597742A (en) | Improved storage model for computer system with persistent system memory | |
Lim et al. | SWAM: Revisiting Swap and OOMK for Improving Application Responsiveness on Mobile Devices | |
US11567884B2 (en) | Efficient management of bus bandwidth for multiple drivers | |
US20050144389A1 (en) | Method, system, and apparatus for explicit control over a disk cache memory | |
CN102521173B (en) | Method for automatically writing back data cached in volatile medium | |
CN114077557A (en) | Method of performing read/write operations and computing system hosting client device | |
EP4137951A1 (en) | Storage medium management method and apparatus, and device and computer-readable storage medium | |
Li et al. | Flexible and Efficient Memory Swapping Across Mobile Devices With LegoSwap | |
CN114691358A (en) | Android system performance optimization method, system, device and storage medium | |
JP2007272812A (en) | Information processing apparatus and control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 10850135 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 10850135 Country of ref document: EP Kind code of ref document: A1 |