×

uClinux和eCos的比较

消耗积分:1 | 格式:rar | 大小:0.4 MB | 2017-10-30

分享资料个

1 两种开源嵌入式操作系统介绍
  uClinux是一种优秀的嵌入式Linux版本。uClinux是micro-Conrol-linux的缩写。与标准Linux相比,它集成了标准Linux操作系统的稳定性、强大网络功能和出色的文件系统等主要优点。但是由于没有MMU(内存管理单元),故其多任务的实现需要一定技巧。
  eCos(embedded Configurable operating system),即嵌入式可配置操作系统,是RedHat的产品,但eCos并不是Linux或Linux的派生。eCos弥补了Linux在嵌入式应用领域的不足,是一个源码开放的可配置、可移植、无版税、面向深嵌入式应用的实时操作系统。eCos的核心部分是由不同的组件组成的,包括内核、C语言库和底层运行包等。每个组件能提供大量的可配置选项,利用eCos提供的配置工具可以很方便地进行配置。通过不同的配置使得eCos能够满足不同的嵌入式应用。
  对于以上两种源码公开的实时操作系统,主要从以下几个方面进行比较。通过比较,能够为大家选择适合自己系统的RTOS提供参考。
  2 基本操作性能的比较
  2.1 应用程序的运算能力
  在Linux和uClinux操作系统启动的时候,都会有这样一句话——Calibrating delay 1oop..0k—xxx BogoMips,这一过程叫作BogoMips(读作bogumips)。Linus Torvalds引入BogoMips主要有两个目的:①给用户一个大概的系统运算能力的概念;②由于系统中有许多代码需要精确的软件延时,通过BogoMips来获得软件延时每个周期消耗的时间。BogoMips的过程就是一个简单计数循环,看ls可以循环多少次,然后除以500000就得到了BogoMips的数值。
  表1是在目标硬件平台上运行eCos和uClinux下的BogoMips应用程序得到的结果。我们使用了不同的测试条件,激活和非激活AT76C120的存储器缓冲控制器。
  uClinux和eCos的比较
  打开缓冲存储器。对eCos的应用程序性能影响较uClinux的大;反之,关闭缓冲,eCos的应用程序的性能就下降很多。
  2.2 存储器访问能力
  采用一种同时能够测试缓冲控制器和标准存储器访问函数的测试方法来测试存储器访问能力。在这里,选用田纳西大学的Philip J.Mucci等人提出的CacheBench方法。其工作原理是,重复顺序读/写一定长度的存储器块的数据,记录重复n次所用的时问,用总的读/写数据除以耗时,得到读/写每一字节所用的时间;同时,通过调整数据块的长度和不同的读写方法(使用标准函数或者使用直接代码读写),获得不同条件对存储器读/写的影响。
  在实验中,对于每一种测试模式使用4种不同的块长度(分别为256、512、1024、2048字节),以观察不同的抉长度对存储器访问性能的影响。表2是实验的结果:横向比较,eCos的存储器访问性能从总体上都优于uClinux;纵向比较,5种模式下性能关系大致为缓冲读》缓冲读,改写/写》缓冲写》mcmset》mcmcpy。在同一种测试模式下,对于缓冲读,越大的块长度,其表现的存储器访问性能越好;而其他模式下,存储器访问性能基本与块长度无关。

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !

'+ '

'+ '

'+ ''+ '
'+ ''+ ''+ '
'+ ''+ '' ); $.get('/article/vipdownload/aid/'+webid,function(data){ if(data.code ==5){ $(pop_this).attr('href',"/login/index.html"); return false } if(data.code == 2){ //跳转到VIP升级页面 window.location.href="//m.obk20.com/vip/index?aid=" + webid return false } //是会员 if (data.code > 0) { $('body').append(htmlSetNormalDownload); var getWidth=$("#poplayer").width(); $("#poplayer").css("margin-left","-"+getWidth/2+"px"); $('#tips').html(data.msg) $('.download_confirm').click(function(){ $('#dialog').remove(); }) } else { var down_url = $('#vipdownload').attr('data-url'); isBindAnalysisForm(pop_this, down_url, 1) } }); }); //是否开通VIP $.get('/article/vipdownload/aid/'+webid,function(data){ if(data.code == 2 || data.code ==5){ //跳转到VIP升级页面 $('#vipdownload>span').text("开通VIP 免费下载") return false }else{ // 待续费 if(data.code == 3) { vipExpiredInfo.ifVipExpired = true vipExpiredInfo.vipExpiredDate = data.data.endoftime } $('#vipdownload .icon-vip-tips').remove() $('#vipdownload>span').text("VIP免积分下载") } }); }).on("click",".download_cancel",function(){ $('#dialog').remove(); }) var setWeixinShare={};//定义默认的微信分享信息,页面如果要自定义分享,直接更改此变量即可 if(window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger'){ var d={ title:'uClinux和eCos的比较',//标题 desc:$('[name=description]').attr("content"), //描述 imgUrl:'https://'+location.host+'/static/images/ele-logo.png',// 分享图标,默认是logo link:'',//链接 type:'',// 分享类型,music、video或link,不填默认为link dataUrl:'',//如果type是music或video,则要提供数据链接,默认为空 success:'', // 用户确认分享后执行的回调函数 cancel:''// 用户取消分享后执行的回调函数 } setWeixinShare=$.extend(d,setWeixinShare); $.ajax({ url:"//www.obk20.com/app/wechat/index.php?s=Home/ShareConfig/index", data:"share_url="+encodeURIComponent(location.href)+"&format=jsonp&domain=m", type:'get', dataType:'jsonp', success:function(res){ if(res.status!="successed"){ return false; } $.getScript('https://res.wx.qq.com/open/js/jweixin-1.0.0.js',function(result,status){ if(status!="success"){ return false; } var getWxCfg=res.data; wx.config({ //debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 appId:getWxCfg.appId, // 必填,公众号的唯一标识 timestamp:getWxCfg.timestamp, // 必填,生成签名的时间戳 nonceStr:getWxCfg.nonceStr, // 必填,生成签名的随机串 signature:getWxCfg.signature,// 必填,签名,见附录1 jsApiList:['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 }); wx.ready(function(){ //获取“分享到朋友圈”按钮点击状态及自定义分享内容接口 wx.onMenuShareTimeline({ title: setWeixinShare.title, // 分享标题 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享给朋友”按钮点击状态及自定义分享内容接口 wx.onMenuShareAppMessage({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 type: setWeixinShare.type, // 分享类型,music、video或link,不填默认为link dataUrl: setWeixinShare.dataUrl, // 如果type是music或video,则要提供数据链接,默认为空 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享到QQ”按钮点击状态及自定义分享内容接口 wx.onMenuShareQQ({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口 wx.onMenuShareWeibo({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享到QQ空间”按钮点击状态及自定义分享内容接口 wx.onMenuShareQZone({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); }); }); } }); } function openX_ad(posterid, htmlid, width, height) { if ($(htmlid).length > 0) { var randomnumber = Math.random(); var now_url = encodeURIComponent(window.location.href); var ga = document.createElement('iframe'); ga.src = 'https://www1.elecfans.com/www/delivery/myafr.php?target=_blank&cb=' + randomnumber + '&zoneid=' + posterid+'&prefer='+now_url; ga.width = width; ga.height = height; ga.frameBorder = 0; ga.scrolling = 'no'; var s = $(htmlid).append(ga); } } openX_ad(828, '#berry-300', 300, 250);