Git Product home page Git Product logo

Comments (11)

daishengdong avatar daishengdong commented on July 26, 2024

谢谢,毕竟我们不是专业做原厂芯片的,硬件上的细节有所纰漏再所难免。如果有兴趣,可以提个pr。

from tencentos-tiny.

samos2011 avatar samos2011 commented on July 26, 2024

cortex的中断特性包括中断优先级嵌套、咬尾中断等就决定了即使你关闭中断,关闭期间若发生其他高优先级中断的话新任务也不会马上被执行。在pendsv开中断的下一句就会执行新的中断,新任务优先级再高也高不过其它硬件类中断Handler。关闭中断没有带来任务切换速度反而因为关闭中断拖慢了Handler的响应速度。
cortex的众多特性,比如双堆栈,SVC调用、咬尾中断特性,EXC_RETURN等就优雅的解决了早期OS的弊端。
保证系统函数的原子性要靠SVC调用,OS的中断类函数防止重入要靠原子指令。
为cortex设计的OS要专用,不要为了兼容其它cpu体系结构而忽略cortex的特性

from tencentos-tiny.

samos2011 avatar samos2011 commented on July 26, 2024

cortex之美就在于在实现多任务的同时,你的中断响应时间依然不变!M4为什么要设计惰性压栈?都是为了提升中断响应速度!

from tencentos-tiny.

daishengdong avatar daishengdong commented on July 26, 2024

所谓的svc、双栈可以实现你说的无需关中,但无疑会增加系统实现的复杂度、资源占用以及引入移植性问题。后续内核也许会往分态上演进,但目前内核只是我们构建上层连云等中间件的一个组件而已,而这个内核我们现在给它的定位是要足够简单,足够易于移植,足够让其他OS用户甚至是RTOS零基础用户平滑迁移过渡。针对物联网领域,这个内核的设计与实现里,中断响应速度至少目前不是我们首要考虑的点。

from tencentos-tiny.

daishengdong avatar daishengdong commented on July 26, 2024

更何况我们的内核也不是专为cortex而设计

from tencentos-tiny.

samos2011 avatar samos2011 commented on July 26, 2024

真正易用的就是不需要移植,内核也不要有其它依赖。所有cortex都有SysTick定时器又何须移植!

但一套好的生产就绪的框架对新人是有帮助!

from tencentos-tiny.

samos2011 avatar samos2011 commented on July 26, 2024

但凡兼容其它CPU体系结构的内核,恐怕都会牺牲cortex的特性。

mbed估计根本就不考虑非cortex

from tencentos-tiny.

samos2011 avatar samos2011 commented on July 26, 2024

小小提议,希望对你们有帮助!知道你们都很厉害!

from tencentos-tiny.

daishengdong avatar daishengdong commented on July 26, 2024

谢谢。我们真的不厉害。。。

from tencentos-tiny.

samos2011 avatar samos2011 commented on July 26, 2024

讲真,现如今OS内核已不是什么新鲜东西,对于新人来说易用轻松连国内云就很吸引人了,但要论设计,mbed就运用了很多设计模式的**,且RTX也是经得起推敲的。但它不一定适合所有人,入门容易Target移植费劲。

from tencentos-tiny.

daishengdong avatar daishengdong commented on July 26, 2024

设计从本质上来说就是为易用而存在的,在易用性有保证的情况下,尽量避免过度设计才是好的设计。

from tencentos-tiny.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.