Linuxjournal-The Linux Scheduler

这篇文章 The Linux Scheduler作者Moshe Bar发表在linuxjournal, 是一篇2000年的文章.从Linux版本时间线可以看到,那时Linux内核版本2.2, 过了一年后

2019-09-04 · 12 min · 5653 words · Garlic Space

Linux 与 Windows 文本文件格式转换

由于Windows与Linux对换行的定义不同,导致Windows应用不能正常按行显示Linux文本,Linux显示Windows文本时会带有^M

2019-09-01 · 1 min · 380 words · Garlic Space

awk中的'数组'

awk中的’数组‘是一种关联数组,又称作maps、字典,他的索引不需要连续, 可以使用字符串、数字做为索引, 此外,不需要事先声明数组的大小 - 数组可以在运行时扩展/收缩。 ...

2019-08-31 · 3 min · 1354 words · Garlic Space

FTP ASCII上传下载

近期在进行AIX到Linux迁移,发现从windows终端ftp时,客户端设置ASCII传输模式, 服务端并不能自动转换换行符号,脚本出现^M,需要手工删除。 Linux环境为RedHat7.3+vsftpd3.0.2,vsftpd.conf中ascii_download_enable/ascii_upload_enable 注释

2019-08-31 · 4 min · 1881 words · Garlic Space

LeetCode – Binary Tree Inorder Traversal

题目: Given a binary tree, return the inorder traversal of its nodes\’ values. Example: Input: 1 2 3 4 5 6 [1,null,2,3] 1 \ 2 / 3 Output: 1 [1,3,2] Follow up: Recursive solution is trivial, could you do it iteratively? 解题: 树的中序遍历: 如果当前节点的左孩子为空,则输出当前节点并将其右孩子作为当前节点。 如果当前节点的左孩子不为空,在当前节点的左子树中找到当前节点在中序遍历下的前驱节点。 a) 如果前驱节点的右孩子为空,将它的右孩子设置为当前节点。当前节点更新为当前节点的左孩子。 b) 如果前驱节点的右孩子为当前节点,将它的右孩子重新设为空(恢复树的形状)。输出当前节点。当前节点更新为当前节点的右孩子。 重复以上1、2直到当前节点为空。 实现: 递归方式: 对左子结点调用递归函数,根节点访问值,右子节点再调用递归函数 ...

2019-08-31 · 2 min · 609 words · Garlic Space

linux kernel documentation-CFS Scheduler

这篇文章 CFS Scheduler是Linux Kernel文档

2019-08-29 · 8 min · 3837 words · Garlic Space

LeetCode – Target Sum

题目: You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol. Find out how many ways to assign symbols to make sum of integers equal to target S. Example 1: 1 2 3 4 5 6 7 8 9 10 11 Input: nums is [1, 1, 1, 1, 1], S is 3. Output: 5 Explanation: -1+1+1+1+1 = 3 +1-1+1+1+1 = 3 +1+1-1+1+1 = 3 +1+1+1-1+1 = 3 +1+1+1+1-1 = 3 There are 5 ways to assign symbols to make the sum of nums be target 3. Note: ...

2019-08-20 · 2 min · 595 words · Garlic Space

linux-sides-Timers and time management-Introduction to the clocksource framework

这篇文章 Timers and time management in the Linux kernel. Part 2. 是出自 linux-insides

2019-08-20 · 17 min · 8109 words · Garlic Space

旧版本应用与win10兼容

大多数早期windows版本创建的应用可以在win10下正常运行,但也有部分程序无法正常运行, 可以尝试通过兼容性设置解决. 修改高DPI设置 在使用一款windows客户端产品时,由于机器分辨率较高导致其中某一个可执行文件无法运行, 通过修改高DPI设置解决,下面是具体的解决方法: ...

2019-08-20 · 3 min · 1102 words · Garlic Space

Linux进程创建

以fork函数为例,看下Linux进程创建具体工作流程:

2019-08-18 · 13 min · 6388 words · Garlic Space