WO2007033615A1 - Procede destine a realiser une application multitache dans un dispositif de lecture multimedia - Google Patents

Procede destine a realiser une application multitache dans un dispositif de lecture multimedia Download PDF

Info

Publication number
WO2007033615A1
WO2007033615A1 PCT/CN2006/002521 CN2006002521W WO2007033615A1 WO 2007033615 A1 WO2007033615 A1 WO 2007033615A1 CN 2006002521 W CN2006002521 W CN 2006002521W WO 2007033615 A1 WO2007033615 A1 WO 2007033615A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
controller unit
state
tasks
current
Prior art date
Application number
PCT/CN2006/002521
Other languages
English (en)
French (fr)
Inventor
Yining Liu
Original Assignee
Netac Technology Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netac Technology Co., Ltd. filed Critical Netac Technology Co., Ltd.
Priority to US11/992,472 priority Critical patent/US20090222830A1/en
Priority to EP06791110A priority patent/EP1939726A4/en
Priority to JP2008531516A priority patent/JP2009510817A/ja
Priority to BRPI0616747-0A priority patent/BRPI0616747A2/pt
Publication of WO2007033615A1 publication Critical patent/WO2007033615A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements

Definitions

  • the present invention relates to the field of media playback, and more particularly to a method of implementing multitasking on a media playback device. Background technique
  • Figure 1 is a flow chart showing the task execution method on a conventional media player. Because there is no multitasking development mechanism, its applications can only be run in a single task. When a task runs, it will monopolize all resources of the system, such as: CPU control, stack, register access, memory, peripherals, etc. Once a new task needs to run, it must release all system resources by terminating the current task to ensure the normal operation of the new task.
  • the above task execution mode is to call up different execution code by constantly switching between system memory and memory. Before the callout, save the running environment parameters of the current task; and before the call-in, restore the system operating environment parameters to the last saved value. Therefore, it is necessary to frequently save and restore the operating environment between high speed and low speed equipment. Since the speed of the run depends on the access speed of the low-speed device, the slow operation is the biggest disadvantage of this method.
  • FIG. 2 An existing multi-task execution method for solving the above technical problems is shown in FIG. 2. It adds the functions of the old task and the new task alternately by adding the function code of the new task in this task. For the user, it looks like multitasking is running at the same time. Put all the code to be executed into the same task, and run the time slice in turn.
  • the above existing multi-task execution method has the following drawbacks: It performs different functions in a unified task in a time-sharing manner, and has no priority, so that code that must run at a high speed must wait for the code running at a low speed to execute before execution. In particular, when two functions require the other party's function to execute until a certain stage can continue to run, a deadlock will occur.
  • the present invention proposes a new method that enables multitasking applications on a media player. Summary of the invention
  • the present invention provides a method for implementing a plurality of tasks on a media playback device by using a time slice rotation, the media playback device comprising a controller unit, and further comprising the steps of:
  • the controller unit decomposes various functions of the media playback device into a plurality of tasks
  • the controller unit sets different priorities for each task to be decomposed
  • the controller unit determines the priority level of each task, and sets its ready state to the running state according to the priority level
  • the controller unit alternately executes the respective tasks by the time slice to which the respective tasks are assigned. Wherein, when each task is in the ready state, the high priority task will be executed first. The number of clock beats is determined.
  • the decomposition into a plurality of tasks is performed by the controller unit by creating task descriptors for the respective tasks. Among them, multiple tasks run in a certain time according to a specific algorithm set in the controller unit, and each task takes up CPU and other system resources in turn and alternately runs. Since each task is executed in a short time, from the perspective of the user, each task runs at the same time, thereby realizing the application of various tasks on the media playback device.
  • 1 is a flow chart of a conventional task execution method on a media playback device.
  • FIG. 2 is a flow chart of another conventional task execution method on a media playback device.
  • 3 is a flow chart of the process of creating a task descriptor and the initialization process of the multi-tasking controller unit of the present invention.
  • FIG. 4 is a flow chart of the clock scheduling process of the multi-tasking controller unit of the media playback device according to the present invention.
  • FIG. 5 is a flow chart of the process of performing an audio play task and an idle task according to the present invention.
  • Figure ⁇ is a flow chart of the process of executing the suspended task scheduling of the present invention.
  • Figure 7 is a flow chart of the process of executing a clock interrupt service of the present invention. detailed description
  • the media players each include a controller unit, an input unit, a display unit, and an audio output unit.
  • the controller unit is provided with firmware for implementing the media player function.
  • the present invention provides a method for implementing a variety of tasks on a media playback device using time slice rotation.
  • the method mainly includes a task decomposition process of the controller unit, a priority task process, a task descriptor process, an initialization process, a clock scheduling process, an execution task process, an idle task process, a suspended task scheduling process, and a clock interruption task. process.
  • the controller unit decomposes various functions of the media playing device into a plurality of tasks, such as dividing audio playing, image browsing, text reading, games, FM, etc. into a plurality of different tasks, which are controlled by the controller unit. And implemented by its curing software.
  • the multiple tasks run in a certain period of time according to a specific algorithm set in the controller unit, and each task takes turns occupying CPU and other system resources and running alternately. Since each task is executed in a short period of time, from the perspective of the user, each task runs at the same time, thereby realizing the application of various tasks on the media playback device.
  • the multitasking execution method sets a priority for each task by a specific algorithm set in the controller unit. Because different tasks need to consume CPU and other system resources may be different, such as MP3 decoding operation is greater than image decoding; users have higher requirements for real-time performance of certain tasks or tasks, such as MP3 playback pauses, users Will immediately be aware, and the picture browsing task will be delayed. Users can accept it; in addition, the frequency of use of certain functions by users is significantly higher than the frequency of use of other functions, such as MP3 music playback may be significantly higher than text reading.
  • the above decomposition tasks and defining task priorities are implemented by the controller unit by creating task descriptors for each task.
  • the controller unit creates task descriptors for each task through a specific algorithm, defines the priority of each task, and the number of clock beats for each task; at this point, each task is in a ready state.
  • the firmware of the controller unit determines the priority level of each task, searches for the task with the highest priority, and changes the ready state of the task with the highest priority to the running state, and according to the clock beat defined in the task descriptor of the task. The number performs this task.
  • the running time of each task is determined by defining the number of clock beats in the task descriptor of each task, and each task is alternately executed in different time slice cycles in which each task is allocated, thereby realizing various tasks for media playback. Operation on the device.
  • each task running that is, in a task running cycle, the task is in the running state, and other tasks are in the ready state.
  • other tasks may be Execution, other ready tasks can not interrupt the current task of the system; at this time, the running status of the task is changed to the ready state, that is, all tasks are in the ready state at this time, and the priority judgment needs to be performed again, according to the priority.
  • the above media playing device includes audio playing, image browsing, text reading, games, and FM tuning functions, and these functions operate in a task manner.
  • the controller unit defines audio playback as the highest priority 15, image browsing as the secondary priority 14, text reading as the third priority 13, and so on, and the level of the idle state as the lowest priority.
  • the controller unit determines the tasks of different priorities and sets each of them to the ready state, setting the time slice to be 10 ms, and the plurality of time slices respectively correspond to different tasks according to the priority.
  • the controller unit executes the command according to the preset setting.
  • the corresponding task such as audio play-and-drop, is in the running state, and the task is executed in its corresponding time slice, and other tasks are in the ready state.
  • FIG. 3 is a flow chart showing the process of creating a task descriptor and the initialization process of the multi-tasking controller unit of the media playing device according to the present invention, which includes the following steps:
  • the required data shall include the following data: task ID number, task priority, task running status, clock ticks of the task 'number, the first address of the task execution code, the first address of the task stack, and the size of the task stack;
  • S13 Task initialization: When the task is initialized, configure the stack size required for each task, allocate the task stack space, assign the system unique task ID number, set the task priority, set the task running status to the ready state, and set the task clock number. Clear, record the first address of the task execution code, record the first address and size of the task stack; this process initializes each task until all tasks are initialized;
  • FIG. 4 is a flow chart showing the process of multi-tasking the controller unit clock scheduling of the media playing device according to the present invention, which includes the following steps:
  • step S22 determines whether there is a task in the running state, if any, the current task state is changed from the running state to the ready state, if not, then directly proceed to step S22;
  • 522 Scan the entire task state descriptor array to find the task with the highest priority and the task state ready.
  • the task that meets the condition is the current task, modify the state of the current task to the running state, and jump to the current code address of the current task to run. For example, if the current task is task audio playback, then jump to the audio playback process to execute, currently If the task is other tasks, then jump to the process corresponding to the task;
  • FIG. 5 is a flowchart of a process for performing an audio play task and an idle task according to the present invention, and the steps thereof include: S314 performing an audio play task related operation;
  • FIG. 533 Go to the suspend task scheduler code address to run, that is, execute the step suspend task scheduling process.
  • 6 is a flowchart of a process for performing a suspend task scheduling according to the present invention, the steps of which include:
  • 541 Modify the current task state from the running state to the suspended state, and save the current system site data to the task stack of the current task;
  • 542 Scan the entire task state descriptor array to find the task with the highest priority and the task state ready.
  • S44 copying the task stack of the highest priority ready task to the current site, modifying the ready task state with the highest priority to the running state, and jumping to the current code address of the task, for example, the ready task with the highest priority is audio playing, Then jump to the audio playback process to execute, if the highest priority ready task is image browsing, jump to the image browsing process to execute; S45—If no matching task is found, then jump to the current code address of the idle task, that is, execute the idle task process.
  • 7 is a flow chart of a process for executing a clock interrupt service according to the present invention, the steps of which include:
  • the above technical solution saves the field data of different tasks to different stacks by using the task stack, thereby reducing the degree of coupling between tasks and improving the reliability of the system.
  • the user can define the priority level of each task and the number of clock beats of the task by modifying the program in the controller unit firmware.
  • the priority of each task can be from 0. Gradually rising upwards, or gradually decreasing from other numbers to 0, can also achieve the implementation effect of various tasks on the audio playback device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Description

媒体播放装置上实现多任务的方法
技术领域
本发明涉及媒体播放领域, 具体地说涉及在媒体播放装置上实现多任务的 方法。 背景技术
随着电子信息技术的迅猛发展,媒体播放器如 MP3播放器的使用已日渐普 及化。 其技术日新月异的发展, 为使用者提供的功能也越来越丰富, 如音乐播 放, 图片浏览, 文本阅读, 游戏, FM收音机等。
然而, 无论功能如何丰富, 在同一时间, 此类播放器能为用户提供的使用 功能始终为单一功能。 例如, 在播放音乐的同时无法阅读文本、无法浏览图片、 无法进行游戏; 而在播放 FM收音节目的时候则无法阅读文本、无法浏览图片、 无法进行游戏等。
图 1所示为传统的媒体播放器上的任务执行方法的流程图。 由于没有采用 多任务的开发机制,其应用程序只能以单任务的方式运行。 当某一任务运行时, 将独占系统的所有资源, 如: CPU控制权, 堆栈、 寄存器访问权、 内存、 外设 等设备的控制权。 一旦有新的任务需要运行, 其必须通过终止当前任务而释放 所有系统资源的方式, 才能保证新任务的正常运行。
上述任务执行模式是通过不停地在系统外存和内存之间调入调出不同的执 行代码。 在调出前, 保存当前任务的运行环境参数; 而在调入前, 恢复系统运 行环境参数为上次保存值。 因此, 其须频繁地在高速和低低速设备间保存和恢 复运行环境。 由于运行时的速度取决于低速设备的访问速度, 故运行速度慢是 这种方法的最大不足。
一种解决上述技术问题的现有多任务执行方法如图 2所示。 其通过在本任 务中添加新任务的功能代码, 使旧任务和新任务须实现的功能交替执行。 对于 使用者来说, 看上去好像是多任务同时运行一样。 即将所有须执行的代码放入 到同一任务内, 分时间片轮流运行。 但上述现有多任务执行方法存在以下缺陷: 其在统一任务中分时间片执行 不同功能, 没有优先级, 从而须高速运行的代码也必须等待低速运行的代码执 行完毕才能执行。 尤其是, 当两个功能需要对方功能执行到一定阶段才能继续 运行时, 将会产生死锁现象。
针对上述现状, 本发明提出一种新的方法, 其可实现媒体播放器上的多任 务应用。 发明内容
本发明的目的在于提供一种可以实现多种任务于媒体播放装置上应用的方 法。
本发明的目的在于提供一种可以实现多种任务于媒体播放装置上应用的方 法。
本发明提供一种利用时间片轮转实现多种任务于媒体播放装置上应用的方 法, 该媒体播放装置包括控制器单元, 还包括步驟:
控制器单元将媒体播放装置的各种功能分解成多个任务;
控制器单元为分解的各个任务分别设置不同的优先级;
控制器单元判断所述各个任务的优先级别, 按照优先级别的高低分别将其 就绪状态设置为运行状态;
控制器单元通过所述各个任务被分配的时间片交替执行各个任务。 其中, 当所述各个任务均处于就绪状态时, 高优先级任务将优先执行。 钟节拍数确定的。 所述分解成多个任务是由控制器单元通过创建各个任务的任 务描述符实现的。 其中, 多个任务按照设置于控制器单元中特定的算法在一定时间内运行, 各个任务轮流占有 CPU及其它系统资源并相互交替运行。由于在短时间内各个 任务均被执行, 故从使用者的角度看, 则是各个任务在同一时间内运行, 从而 实现多种任务于媒体播放装置上的应用。 附图的简要说明
图 1是现有的在媒体播放装置上的任务执行方法的流程图。
图 2是另一种现有的在媒体播放装置上的任务执行方法的流程图。
图 3是本发明实现多任务于媒体播放装置控制器单元创建任务描述符过程 及初始化过程的流程图。
图 4是本发明实现多任务于媒体播放装置控制器单元时钟调度过程的流程 图。
图 5是本发明执行音频播放任务及空闲任务过程的流程图。
图 ό是本发明执行挂起任务调度过程的流程图。
图 7是本发明执行时钟中断服务过程的流程图。 具体实施方式
本技术领域普通技术人员所知,媒体播放器均包括控制器单元、输入单元、 显示单元及音频输出单元。 控制器单元设置有用于实现媒体播放器功能的固化 软件。 - 本发明提供一种利用时间片轮转实现多种任务于媒体播放装置上应用的方 法。 该方法主要包括所述控制器单元的任务分解过程、 定义优先级任务过程、 创建任务描述符过程、 初始化过程、 时钟调度过程、 执行任务过程、 空闲任务 过程、 挂起任务调度过程、 时钟中断任务过程。
众所周知, 媒体播放装置一般都会有多种不同的功能。 所述控制器单元将 媒体播放装置的各种功能分解成多个任务, 如将音频播放、 图像浏覓、 文本阅 读、 游戏、 FM调频等分成多个不同的任务, 这些任务由控制器单元控制并以 其固化软件实现。 而多个任务按照设置于控制器单元中特定的算法在一定时间 内运行,各个任务轮流占有 CPU及其它系统资源并相互交替运行。 由于在短时 间内各个任务均被执行, 故从使用者的角度看, 则是各个任务在同一时间内运 行, 从而实现多种任务于媒体播放装置上的应用。
其中, 上述多任务执行方法通过设置于控制器单元中的特定算法给各个任 务设置优先级。 由于不同的任务需要消耗的 CPU及其它系统资源可能不同,如 MP3解码的运算量要大于图片解码; 使用者对某个或某些任务的实时性要求较 高,如 MP3播放发生停顿,使用者会马上感知,而图片浏览任务发生一定延迟, 使用者则可以接受; 另外, 使用者对某些功能的使用频率明显高于其它功能的 使用频率, 如 MP3音乐播放可能明显要高于文本阅读。 因此, 通过给各个任务 设置不同的优先级, 当各个任务均处于就绪状态时, 高优先级任务将优先执行; 当高优先级任务没有结束挂起时, 即没有主动放弃 CPU系统资源时,低优先级 任务将永远不会运行。 这种采用优先级设置可以合理分配不同任务所需的运行 时间片, 不会造成系统资源无端的浪费, 从而使系统运行效率更高, 运行速度 更快。
上述分解任务及定义任务优先级是控制器单元通过创建各个任务的任务描 述符来实现的。 控制器单元通过特定算法创建各个任务的任务描述符、 定义各 任务的优先级以及各任务的时钟节拍数; 此时, 各个任务均处于就绪状态。 控 制器单元的固化软件判断各个任务的优先级别, 寻找优先级别被定义最高的任 务, 将该优先级别最高的任务的就绪状态修改为运行状态, 并按照该任务的任 务描述符中定义的时钟节拍数执行该任务。
在本发明技术方案中, 通过定义各任务的任务描述符中的时钟节拍数确定 各任务的运行时间, 以各个任务被分配的不同时间片循环交替执行各任务, 从 而实现多种任务于媒体播放装置上的运行。 在每个任务运行过程中, 即在一个 任务运行循环中, 该任务处于运行状态, 而其他任务均处于就绪状态, 在该任 务按照其时钟节拍数运行结束挂起后, 其他任务才有可能被执行, 其他就绪任 务不可以打断系统当前执行的任务; 此时, 该任务的运行状态被 改为就绪状 态, 即所有的任务此时均处于就绪状态, 需要再次进行优先级判断, 根据优先 级确定下一步执行的任务。 如果当前被执行的任务在未运行完其时钟节拍数即 主动放弃 CPU资源挂起,则在控制器单元判断优先级时,仍会将其确定为优先 级最高的任务继续执行。
例如, 上述媒体播放装置包括音频播放、 图像浏览、 文本阅读、 游戏、 FM 调频功能, 这些功能以^个任务的方式运行。 控制器单元将音频播放定义为最 高优先級 15、 图像浏览定义为次优先级 14、 文本阅读定义为第三优先级 13、 由此类推, 空闲状态的级别定义为最低优先级。 在媒体播放装置开机并初始化 后, 控制器单元判断不同优先级的任务并将各个均设置为就绪状态, 设其时间 片为 10ms,若干时间片分别按优先级依次对应不同的任务。 当用户通过输入单 元如操作按键、 触摸输入等方式输入命令时, 控制器单元根据预先设置执行其 对应的任务, 如音频播-放, 该任务处于运行状态, 在其相对应的时间片中执行 该任务, 其他任务处于就绪状态。
当用户再次要求执行其他任务时, 如图像浏览任务, 控制器单元判断其优 先级, 如比此时运行状态的任务的优先级高, 则立即执行此高优先级任务, 按 照此高优先级任务对应的时间片执行任务, 该时间片的任务状态修改为运行状 态。 如此新任务的优先级比此时运行状态的任务的优先级低, 则须在该优先级 高的任务时间片执行完毕后, 再执行此新任务时间片的任务。 图 3所示为本发明实现多任务于媒体播放装置控制器单元创建任务描述符 过程及初始化过程的流程图, 其包括以下步驟:
S11—创建已分解任务的描述符, 描述符包括为了描述每一任务的特征所 必
须的数据, 须包括以下数据: 任务 ID号、 任务优先级、 任务运行状态、 任务 的时钟节拍 '数、 任务执行代码的首地址、 任务栈首地址、 任务栈大小;
S 12—创建任务描述符数组: 将所有任务的任务描述符地址存放在一个数 组中, 以方便管理;
S13—任务初始化: 任务初始化时, 配置每一个任务所须的堆栈大小, 分 配任务堆栈空间, 分配系统唯一的任务 ID号, 设置任务优先级, 设置任务运 行状态为就绪状态, 将任务的时钟数清零, 记录任务执行代码的首地址, 记录 任务栈的首地址及大小; 如此流程初始化每一个任务, 直至所有任务初始化完 毕;
S 14一跳转至时钟调度过程执行。 图 4所示为本发明实现多任务于媒体播放装置控制器单元时钟调度过程的 流程图, 其包括以下步骤:
521—判断是否有处于运行状态的任务, 如有则将当前任务状态由运行状 态修改为就绪状态,若无则直接进行步驟 S22;
522—扫描整个任务状态描述符数组, 找到优先级最高、 任务状态为就绪 状态的任务;
S23—判断是否有存在符合条件的任务, 若存在则执行步驟 S24, 若无则执 行步骤 S26;
S2 若符合条件的任务为当前任务, 则修改当前任务的状态为运行状态, 跳转至当前任务的当前代码地址运行, 例如当前任务为任务音频播放, 则跳转 至音频播放过程处执行, 当前任务为任务其他, 则跳转至与该任务相对应的过 程处执行;
525—若符合条件的任务非当前任务, 则将当前的系统现场数据保存到当 前任务的任务栈中, 复制优先级最高的就绪任务的任务栈到当前现场, 修改优 先级最高的就绪任务状态为运行状态, 跳转至该任务的当前代码地址运行, 例 如优先级最高的就绪任务为音频播放, 则跳转至音频播放过程处执行,优先级 最高的就绪任务为图像浏览, 则跳转至图像浏览过程处执行;
526—若没有找到符合条件的任务, 则跳转至空闲任务的当前代码地址处 运行, 即执行空闲任务过程。 图 5是本发明执行音频播放任务及空闲任务过程的流程图, 其步骤包括: S314行音频播放任务的相关操作;
532—音频播放过程循环体执行 1次, 相关操作执行完毕;
533—跳转至挂起任务调度程序代码地址处运行, 即执行步骤挂起任务调 度过程。 图 6是本发明执行挂起任务调度过程的流程图, 其步骤包括:
541—将当前任务状态由运行状态修改为挂起状态, 将当前的系统现场数 据保存到当前任务的任务栈中;
542—扫描整个任务状态描述符数组, 找到优先级最高、 任务状态为就绪 状态的任务;
S43—判断是否存在符合条件的任务, 若存在则执行步驟 S44, 若无则执行 步骤 S46;
S44—复制优先级最高的就绪任务的任务栈到当前现场, 修改优先级最高 的就绪任务状态为运行状态, 跳转至该任务的当前代码地址运行, 例如优先级 最高的就绪任务为音频播放, 则跳转至音频播放过程处执行, 若优先级最高的 就绪任务为图像浏览, 则跳转至图像浏览过程处执行; S45—若没有找到符合条件的任务, 则跳转至空闲任务的当前代码地址处 运行, 即执行空闲任务过程。 图 7是本发明执行时钟中断服务过程的流程图, 其步骤包括:
S51—时钟中断请求;
S52—跳转至时钟任务调度程序代码地址处执行, 即执行时钟调度过程。 本发明技术方案将不同的任务分解成不同的模块, 由统一的调度程序来统 一调度, 降低了系统的故障率; 且是在多个模块内执行单个功能, 故降低了应 用软件和模块的复杂程度; 对于开发人员而言, 该技术方案是将多个复杂任务 分解为单个筒单的任务, 代码的编写将更为简单, 故提高了开发效率。
上述技术方案通过采用任务栈, 将不同任务的现场数据保存到不同的堆栈 内, 减少了任务之间的耦合程度, 提高了系统的可靠性。
以上为本发明的一种实施方式, 在实践中, 使用者可以通过修改控制器单 元固化软件内的程序自行定义各任务的优先级别以及任务的时钟节拍数; 各任 务的优先级别可以是从 0向上逐渐升高, 也可以是从其他数字至 0逐渐降低, 同样可以达到多种任务于音频播放装置上应用的实施效果。

Claims

1、一种在媒体播放装置上实现多任务的方法,该媒体播放装置包括控制 器单元, 其特征在于, 还包括步骤:
1) 控制器单元将媒体播放装置的各种功能分解成多个任务;
2) 控制器单元为分解的各个任务分别设置不同的优先级;
3) 控制器单元判断所述各个任务的优先级別,按照优先级别的高低分别 将其就绪状态设置为运行状态;
4) 控
2、如权利要求 1所述的在媒体播放装置上实现多任务的方法,其特征在 于: 当所述各个任务均处于就绪状态时, 高优先级任务将优先执行。
' 3、 如权利要求 1 所述的在媒体播放装置上实现多任务的方法, 其特征 在于: 所述多个任务的运行时间是通过定义各个任务的任务描述符中的时钟 节拍数确定的。
4、如权利要求 1所述的在媒体播放装置上实现多任务的方法,其特征在 于: 所述分解成多个任务是由控制器单元通过创建各个任务的任务描述符实 现的。
5、如权利要求 4所述的在媒体播放装置上实现多任务的方法,其特征在 于, 所述创建各个任务的任务描述符的步骤包括:
1 )创建已分解任务的描述符,描述符包括为了描述每一任务的特征所必 须的数据;
2 )创建任务描述符数组;
3 )对任务初始化, 设置任务优先级;
4 )设置任务运行状态为就绪状态。
6、如权利要求 1所述的在媒体播放装置上实现多任务的方法,其特征在 于, 其中步驟 2 )还包括:
2-1 )控制器单元将各个不同优先级的任务均设置为就绪状态;
2- 2 )控制器单元为各个任务设定时间片,各个时间片分别按优先级依次 对应不同的任务。
7、如权利要求 1所述的在媒体播放装置上实现多任务的方法,其特征在 于, 其中步 3 ) 包括:
3- 1 )控制器单元判断是否有处于运行状态的任务,如有则将当前任务状 态由运行状态 改为就绪状态;
3-2 )扫描整个任务状态描述符数组, 找到优先级最高、任务状态为就绪 状态的任务;
3-3 )若符合条件的任务为当前任务,则修改当前任务的状态为运行状态, 跳转至当前任务的当前代码地址运行; 若符合条件的任务非当前任务, 则将 当前的系统现场数据保存到当前任务的任务栈中, 复制优先级最高的就绪任 务的任务栈到当前现场, 修改优先级最高的就绪任务状态为运行状态, 跳转 至该任务的当前代码地址运行。
PCT/CN2006/002521 2005-09-26 2006-09-25 Procede destine a realiser une application multitache dans un dispositif de lecture multimedia WO2007033615A1 (fr)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US11/992,472 US20090222830A1 (en) 2005-09-26 2006-09-25 Methods for Multi-Tasking on Media Players
EP06791110A EP1939726A4 (en) 2005-09-26 2006-09-25 METHOD FOR MULTITASK REALIZATION IN A MEDIA PLAYING DEVICE
JP2008531516A JP2009510817A (ja) 2005-09-26 2006-09-25 メディアプレイヤにおけるマルチタスキング方法
BRPI0616747-0A BRPI0616747A2 (pt) 2005-09-26 2006-09-25 métodos para execução de multitarefas em tocadores de mìdia

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2005101000419A CN1940858B (zh) 2005-09-26 2005-09-26 媒体播放装置上实现多任务的方法
CN200510100041.9 2005-09-26

Publications (1)

Publication Number Publication Date
WO2007033615A1 true WO2007033615A1 (fr) 2007-03-29

Family

ID=37888567

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2006/002521 WO2007033615A1 (fr) 2005-09-26 2006-09-25 Procede destine a realiser une application multitache dans un dispositif de lecture multimedia

Country Status (10)

Country Link
US (1) US20090222830A1 (zh)
EP (1) EP1939726A4 (zh)
JP (1) JP2009510817A (zh)
KR (1) KR20080066721A (zh)
CN (1) CN1940858B (zh)
BR (1) BRPI0616747A2 (zh)
HK (1) HK1105464A1 (zh)
RU (1) RU2412465C2 (zh)
WO (1) WO2007033615A1 (zh)
ZA (1) ZA200803642B (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873739A (zh) * 2014-03-14 2014-06-18 中央电视台 多设备协同控制方法及设备

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106734B (zh) * 2007-08-09 2010-12-08 中兴通讯股份有限公司 智能网系统任务调度系统及方法
KR101719563B1 (ko) * 2010-06-22 2017-03-24 삼성전자주식회사 방송수신장치 및 그의 메모리 관리방법
KR101719559B1 (ko) * 2010-06-22 2017-03-24 삼성전자주식회사 방송수신장치 및 그의 스케줄링 방법
CN102467488A (zh) * 2011-02-25 2012-05-23 中标软件有限公司 一种文字处理文档异步加载的方法
US9104508B2 (en) * 2012-01-18 2015-08-11 International Business Machines Corporation Providing by one program to another program access to a warning track facility
FR2990782B1 (fr) * 2012-05-15 2015-06-26 Sagem Defense Securite Procede de gestion d'une execution de taches dans un systeme informatique
CN104346298B (zh) * 2013-08-06 2018-12-25 北京数码视讯软件技术发展有限公司 基于智能卡的数据处理方法、装置及智能卡
CN105677455A (zh) * 2014-11-21 2016-06-15 深圳市中兴微电子技术有限公司 一种设备调度方法及任务管理器
CN106293885B (zh) * 2015-05-20 2019-06-28 联芯科技有限公司 任务创建、挂起和恢复方法
CN105117288B (zh) * 2015-09-24 2019-09-13 上海斐讯数据通信技术有限公司 一种高精度时钟辅助任务执行的方法
WO2017206151A1 (zh) 2016-06-02 2017-12-07 百富计算机技术(深圳)有限公司 在单任务系统中实现多任务的方法、装置及单任务系统
CN107577528B (zh) * 2017-09-01 2020-09-08 长沙小卡机器人科技有限公司 多任务序列并行运行的方法
CN108647052B (zh) * 2018-04-28 2020-12-01 Oppo广东移动通信有限公司 应用程序预加载方法、装置、存储介质及终端
CN108804157A (zh) 2018-06-05 2018-11-13 Oppo广东移动通信有限公司 应用程序预加载方法、装置、存储介质及终端

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1393094A (zh) * 2000-08-16 2003-01-22 皇家菲利浦电子有限公司 多媒体应用程序的运行方法
US20050132153A1 (en) * 2003-12-12 2005-06-16 Via Technologies, Inc. Method and Apparatus of Arranging Priority Queue and Arbitrating for Memory Access Requests
CN1668084A (zh) * 2005-04-07 2005-09-14 北京北大方正电子有限公司 一种视频信号精确控制的方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19500957A1 (de) * 1994-07-19 1996-01-25 Bosch Gmbh Robert Verfahren zur Steuerung von technischen Vorgängen oder Prozessen
US6243735B1 (en) * 1997-09-01 2001-06-05 Matsushita Electric Industrial Co., Ltd. Microcontroller, data processing system and task switching control method
JP3007612B2 (ja) * 1997-09-01 2000-02-07 松下電器産業株式会社 マイクロコントローラ、データ処理システム及びタスクスイッチの制御方法
US6928646B1 (en) * 2000-02-02 2005-08-09 Sony Corporation System and method for efficiently performing scheduling operations in an electronic device
JP2003122586A (ja) * 2001-08-09 2003-04-25 Matsushita Electric Ind Co Ltd タスク・スケジューリング装置
FI114663B (fi) * 2001-12-20 2004-11-30 Nokia Corp Menetelmä ja järjestelmä käyttöjärjestelmätoimintojen suorittamiseksi sekä elektroniikkalaite
CN1226868C (zh) * 2002-04-08 2005-11-09 华邦电子股份有限公司 可同时播放多种节目的多媒体播放装置
JP2003316586A (ja) * 2002-04-25 2003-11-07 Pioneer Electronic Corp タスク優先順位設定装置、その方法、そのプログラム、そのプログラムを記録した記録媒体、マルチタスク装置、および、ナビゲーション装置
JP3920818B2 (ja) * 2003-07-22 2007-05-30 株式会社東芝 スケジューリング方法および情報処理システム
JP4462479B2 (ja) * 2003-11-27 2010-05-12 ソニー・エリクソン・モバイルコミュニケーションズ株式会社 情報処理装置及び携帯電話端末

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1393094A (zh) * 2000-08-16 2003-01-22 皇家菲利浦电子有限公司 多媒体应用程序的运行方法
US20050132153A1 (en) * 2003-12-12 2005-06-16 Via Technologies, Inc. Method and Apparatus of Arranging Priority Queue and Arbitrating for Memory Access Requests
CN1668084A (zh) * 2005-04-07 2005-09-14 北京北大方正电子有限公司 一种视频信号精确控制的方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP1939726A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873739A (zh) * 2014-03-14 2014-06-18 中央电视台 多设备协同控制方法及设备
CN103873739B (zh) * 2014-03-14 2017-10-17 中央电视台 多设备协同控制方法及设备

Also Published As

Publication number Publication date
ZA200803642B (en) 2009-02-25
EP1939726A4 (en) 2009-06-24
RU2412465C2 (ru) 2011-02-20
BRPI0616747A2 (pt) 2011-06-28
CN1940858A (zh) 2007-04-04
RU2008116177A (ru) 2009-11-10
HK1105464A1 (en) 2008-02-15
CN1940858B (zh) 2011-06-15
JP2009510817A (ja) 2009-03-12
US20090222830A1 (en) 2009-09-03
KR20080066721A (ko) 2008-07-16
EP1939726A1 (en) 2008-07-02

Similar Documents

Publication Publication Date Title
WO2007033615A1 (fr) Procede destine a realiser une application multitache dans un dispositif de lecture multimedia
US10268609B2 (en) Resource management in a multicore architecture
KR102114453B1 (ko) 모바일 장치 및 그것의 제어 방법
JP4119945B2 (ja) タスク処理装置
KR100733943B1 (ko) 프로세서 시스템, dma 제어 회로, dma 제어 방법,dma 제어기의 제어 방법, 화상 처리 방법, 및 화상처리 회로
US6360243B1 (en) Method, device and article of manufacture for implementing a real-time task scheduling accelerator
JP4996519B2 (ja) 仮想マルチプロセッサ、システムlsi、携帯電話機器、及び仮想マルチプロセッサの制御方法
US6430593B1 (en) Method, device and article of manufacture for efficient task scheduling in a multi-tasking preemptive priority-based real-time operating system
TWI502511B (zh) 用於管理多核心架構之資源的方法和設備
JP4127848B2 (ja) タスク処理装置
KR101551321B1 (ko) 휴대용 컴퓨팅 디바이스에서 요청들을 스케쥴링하기 위한 방법 및 시스템
JPWO2009022371A1 (ja) タスク処理装置
JP2009520302A (ja) プロセッサ状態遷移を検出するための方法及び装置
US20150301864A1 (en) Resource allocation method
WO2017206151A1 (zh) 在单任务系统中实现多任务的方法、装置及单任务系统
US7984446B1 (en) Method and system for multitasking BIOS initialization tasks
Walls Embedded RTOS Design: Insights and Implementation
JP5204740B2 (ja) タスク処理装置
EP1591896A2 (en) System applications in a multimedia console
JP2008269597A (ja) タスク処理装置
JP2011008617A (ja) マルチスレッド実行装置、オブジェクトプログラムの生成方法、プログラム
Yang Constructing a Uniform Heterogeneous Multiprocessor by CPU Frequency Scaling and Exploring EDF Scheduling on It
Trivedi An examination of Linux and Windows CE embedded operating systems

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2008531516

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 790/MUMNP/2008

Country of ref document: IN

WWE Wipo information: entry into national phase

Ref document number: 2006791110

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 1020087010090

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 2008116177

Country of ref document: RU

WWP Wipo information: published in national office

Ref document number: 2006791110

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 11992472

Country of ref document: US

ENP Entry into the national phase

Ref document number: PI0616747

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20080326