Timers and time management in the Linux kernel. Part 6

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

2020-04-27 · 11 min · 5420 words · Garlic Space

LeetCode –Binary Tree Preorder 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? 解题: 遍历顺序“根-左-右” 实现: 使用栈实现 从根节点开始,先将根节点压入栈,保存结果值,然后移动到左节点, 保证“根-左”顺序, 为空后出栈,取其右节点入栈中。这样就保证了访问顺序为“根-左-右”。 ...

2020-04-16 · 1 min · 319 words · Garlic Space

通过inode删除特殊字符文件

对于正常使用rm无法删除的文件可以通过查找inode进行删除 1 2 ls -i find -inum xxx -delete or 1 2 ls -i find -inum xxx -exec rm -i {} \; 直接删除 1 2 3 4 5 6 7 8 9 [root@centosgpt vm]# ls -i 2278688 > 13592459 memdump2.c~ 13592454 memzero 7506486 test.c~ 2275894 118902.mem 2275882 memdump2.py 13592461 memzero.c 9733651 translate ... [root@centosgpt vm]# find -inum 2278688 -delete [root@centosgpt vm]# ls 118902.mem idle.py~ memdump3.c memory_layout processwrite.c test.c~ vsyscall.c 18 memdump memdump4 memory_layout.c processwrite.c~ translate 交互式 1 2 3 4 5 6 7 8 9 [root@centosgpt vm]# ls -i 7506464 > 13592459 memdump2.c~ 13592454 memzero 7506486 test.c~ 2275894 118902.mem 2275882 memdump2.py 13592461 memzero.c 9733651 translate [root@centosgpt vm]# find -inum 7506464 -exec rm -i {} \; rm: remove regular empty file ‘./>’? y [root@centosgpt vm]# ls 118902.mem idle.py~ memdump3.c memory_layout processwrite.c test.c~ vsyscall.c 18 memdump memdump4 memory_layout.c processwrite.c~ translate

2020-04-16 · 1 min · 184 words · Garlic Space

Linux进程内存布局及映射信息

处理器在运行程序时,需要存储器来存放程序和程序使用的数据, 现代操作系统提供了存储器的抽象:虚拟存储器, 使得应用程序来说不用过多的考虑物理存储使用,简化了内存管理

2020-04-12 · 17 min · 8424 words · Garlic Space

python汇总excel数据

工作需要汇总整理相关excel数据信息,并按照规定格式进行反馈,用python写了一个脚本处理了一下。 样例中表格内容也进行了调整。 环境: windows10 python3.7 + openpyxl 目标: ...

2020-01-31 · 2 min · 502 words · Garlic Space

linux-sides-Timers and time management in the Linux kernel. Part 5.

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

2020-01-19 · 14 min · 6587 words · Garlic Space

LeetCode – Keys and Rooms

题目: There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., N-1, and each room may have some keys to access the next room. Formally, each room i has a list of keys rooms[i], and each key rooms[i][j] is an integer in [0, 1, ..., N-1] where N = rooms.length. A key rooms[i][j] = v opens the room with number v. ...

2020-01-14 · 2 min · 662 words · Garlic Space

内存管理 - 页面大小

内存管理发展阶段 内存(RAM)是计算机一种重要资源, 随着应用越来越复杂,不管存储器有多大,程序都可以把他填满,这就迫使人们不断寻找解决方案去管理它. 内存管理经历的几个阶段; ...

2020-01-10 · 4 min · 1533 words · Garlic Space

HugeTLB Pages

这篇文章 Huge TLB Pages是出Linux Kernel文档

2020-01-07 · 12 min · 5660 words · Garlic Space

putty免密登录SSH服务

cenos7X86_64 + openssh - windows10 - putty

2019-12-31 · 1 min · 416 words · Garlic Space