zoukankan      html  css  js  c++  java
  • nullnullHuge Pages

    PS:今天上午,非常郁闷,有很多简单基础的问题搞得我有些迷茫,哎,代码几天不写就忘。目前又不当COO,还是得用心记代码哦!

        Why huge pages?

        每日一道理
    当浮华给予我们过多欺骗,现实中的虚假几乎让我们忘却了真的存在,是真情唤回了迷离的心,是真情带给了我们最纯、最真的感觉,它流露的是美的誓言,渗透的是永恒执著的真爱。

        When a process uses some memory, the CPU is marking the RAM as used by that process. For efficiency, the CPU allocate RAM by chunks of 4K bytes (it's the default value on many platforms). Those chunks are named pages. Those pages can be swapped to disk, etc.
    Since the process address space are virtual, the CPU and the operating system have to remember which page belong to which process, and where it is stored. Obviously, the more pages you have, the more time it takes to find where the memory is mapped. When a process uses 1GB of memory, that's 262144 entries to look up (1GB / 4K). If one Page Table Entry consume 8bytes, that's 2MB (262144 * 8) to look-up.
    Most current CPU architectures support bigger pages (so the CPU/OS have less entries to look-up), those are named Huge pages (on Linux), Super Pages (on BSD) or Large Pages (on Windows), but it all the same thing.

        http://wiki.debian.org/Hugepages

    文章结束给大家分享下程序员的一些笑话语录: 一条狗在街上闲逛,看见橱窗里一张告示:「招聘程序员。会编程,有团队精神,至少精通两种语言。均等机会。」
      那条狗就进去申请,但是被拒绝了。
      「我不能雇一条狗在公司里做事。」经理说。
      狗不服气,指着告示上「均等机会」几字抗议。
      经理没法,叹了口气,不屑地问道:「你会编程吗?」
      那条狗默默地走到电脑前,编了个程序,运作准确。
      「你有团队精神吗?」经理问。
      那条狗掉头看了看门外,一大群野狗在外面虎视耽耽。
      「我真的不能雇狗做这份工作。」经理气急败坏地说。
      「就算会编程、有团队精神,但是我需要的雇员至少要能精通两种语言。」
      那条狗抬头看着经理说:「喵-噢。」

    --------------------------------- 原创文章 By
    null和null
    ---------------------------------

  • 相关阅读:
    mui 上拉加载 实现分页加载功能
    CSS 实现自适应正方形
    CSS 实现垂直居中
    CSS 实现左侧固定,右侧自适应两栏布局的方法
    微信小程序 主题皮肤切换(switch开关)
    微信小程序 tabBar模板
    微信小程序 拼团商品倒计时(拼团列表、拼团商品详情)
    js时间操作getTime(),ios移动端真机上返回显示NAN
    微信小程序 使用wxParse解析html
    原生JavaScript轮播图的节流
  • 原文地址:https://www.cnblogs.com/jiangu66/p/3100616.html
Copyright © 2011-2022 走看看