TASK_threadsp的实现及asm-offsets.h

主动调度与上下文切换

2019-07-21 · 3 min · 1154 words · Garlic Space

查看进程运行时间及上下文切换次数

CentOS Linux release 7.5.1804 CoreLinux centosgpt 5.2.0-rc4 1 SMP Sun Jun 16 13:25:49 CST 2019 x86_64 x86_64 x86_64 GNU/Linux

2019-07-20 · 2 min · 596 words · Garlic Space

LeetCode – Valid Parentheses

Given a string containing just the characters ‘’, ‘’, ‘{’, ‘}’, ’’ and ‘’, determine if the input string is valid

2019-07-19 · 1 min · 356 words · Garlic Space

Linux 进程,线程的调度策略API

实时进程的调度策略:

2019-07-16 · 6 min · 2696 words · Garlic Space

Netflix Blog- Netflix的应用安全

这篇文章 Scaling Appsec at Netflix 是出自 Netflix Technology Blog Netflix的 应用安全团队的主要服务对象是在云基础架构上发布应用的工程团队, Netflix安全主张:安全是每个产品团队的责任 ...

2019-07-13 · 1 min · 495 words · Garlic Space

python 解压指定路径下zip文件

概述: 项目变更版本需要源码包, 检查关键代码是否缺失,其中有一个步骤需要进入指定目录解压所有.ZIP压缩包 问题: 1. 并行处理; 2. zipfile extract后中文名称乱码; ...

2019-07-12 · 2 min · 513 words · Garlic Space

LeetCode – Min Stack

题目: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) – Push element x onto stack. pop() – Removes the element on top of the stack. top() – Get the top element. getMin() – Retrieve the minimum element in the stack. Example: 1 2 3 4 5 6 7 8 MinStack minStack = new MinStack(); minStack.push(-2); minStack.push(0); minStack.push(-3); minStack.getMin(); --> Returns -3. minStack.pop(); minStack.top(); --> Returns 0. minStack.getMin(); --> Returns -2. 解题: 与普通栈不同,增加了一个返回栈最小值的功能, 这里使用了两个栈, 一个保存数据 , 一个保存压栈过程中出现过的最小值。 ...

2019-07-10 · 1 min · 470 words · Garlic Space

汇编文件中的CFI指令

这篇文章CFI directives in assembly file (18 Jan 2017), 是出自google 工程师Adam Langley 问题提出: 函数调用栈 1 2 3 4 5 6 7 8 : : | caller's stack | +----------------+ <----$rsp value before CALL | return address | +----------------+ <----$rsp at function entry | caller's rbp | +----------------+ <----$rbp always points here | callee's stack | 函数调用中 调用call指令时将call指令的下一条指令 return address 入栈, 其中return address存放在RIP寄存器中也就是将 RIP入栈,之后进入子函数后会将父函数的栈基地址入栈,其中父函数的栈基地保存在RBP寄存器中。 ...

2019-07-09 · 2 min · 738 words · Garlic Space

函数栈的调用

本篇主要通过反汇编与GDB两种方式分析函数栈的使用过程。

2019-07-07 · 8 min · 3560 words · Garlic Space

获取进程信息相关命令

pid: 进程ID - tid:线程ID - tgid:主线程ID

2019-07-03 · 2 min · 802 words · Garlic Space