随笔分类 - Linux系统
摘要:/proc/meminfo 粗略解释 Linux 内存总览 更多解释 /PROC/MEMINFO之谜
阅读全文
摘要:操作系统中的 CPU 和主内存(Main memory)都是稀缺资源,所有运行在当前操作系统的进程会共享系统中的 CPU 和内存资源,操作系统会使用 CPU 调度器分配 CPU 时间1并引入虚拟内存系统以管理物理内存,本文会分析操作系统为什么需要虚拟内存。 在回答虚拟内存存在的必要性之前,我们需要理
阅读全文
摘要:1. lmBench 介绍 Lmbench是一套简易,可移植的,符合ANSI/C标准为UNIX/POSIX而制定的微型测评工具。一般来说,它衡量两个关键特征:反应时间和带宽。Lmbench旨在使系统开发者深入了解关键操作的基础成本。 lmbench是个用于评价系统综合性能的多平台开源benchmar
阅读全文
摘要:sudo apt install gcc-9 g++-9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /us
阅读全文
摘要:sudo dpkg --add-architecture i386 sudo apt install libc6:i386 libstdc++6:i386 sudo apt-get update sudo apt install libncurses5-dev lib32z1
阅读全文
摘要:C++中的 volatile, atomic, memory barrier 应用场景对比 | -- | volatile | memory barrier | atomic | | : : | :--: | :--: | :--: | | 抑制编译器重排 | Yes | Yes | Yes | |
阅读全文
摘要:Conda环境安装 OpenCV pip install opencv-python opencv-contrib-python -i https://mirrors.aliyun.com/pypi/simple/ #验证是否安装成功 python >> import cv2 >> print(cv
阅读全文
摘要:查看串口设备 # Ubuntu 22.04自动卸载CH341串口 sudo apt remove brltty ls -l /dev/ttyUSB0 # 查看串口设备添加信息 sudo dmesg | grep ttyUSB0 给普通用户访问权限 sudo chmod 666 /dev/ttyUSB
阅读全文
摘要:PC主机安装必要软件 sudo apt-get install bison flex expect-dev build-essential m4 autoconf automake texi2html 源码下载 gdb ncurses termcap 编译termcap wget https://f
阅读全文
摘要:安装tftp服务 安装 sudo apt-get install tftp-hpa tftpd-hpa 配置文件 # /etc/default/tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/opt/tftp/" TFTP_ADDRESS=":69"
阅读全文
摘要:从Win10连接到Ubuntu 22.04。 1. Win10 上生成秘钥公钥 ssh-keygen -t rsa -C "xxx@yyy.com" 2. Ubuntu 22.04 上生成 authorized_keys 拷贝 Win10 上的公钥文件到 Ubuntu 22.04 上 cat id_
阅读全文
摘要:1 基本概念 在嵌入式软件开发中,经常会碰到说某块内存是cache的,还是non-cache的,它们究竟是什么意思?分别用在什么场景?non-cache和cache的内存区域怎么配置?这篇博文将会围绕这几个问题展开讨论。 Cache,就是一种缓存机制,它位于CPU和DDR之间,为CPU和DDR之间的
阅读全文
摘要:下载及编译 wget https://github.com/gperftools/gperftools/releases/download/gperftools-2.9.1/gperftools-2.9.1.tar.gz tar xvf gperftools-2.9.1.tar.gz && cd g
阅读全文