Scheduler 翻译成中文叫做调度器。

调度器这个词对于学计算机的同学来说应该并不陌生,因为在大学操作系统的课堂上我们学过很多关于进程调度的知识。

  • 先来先服务(FCFS)
  • 短作业优先(SJF)
  • 优先级调度
  • 时间片轮转
  • 多级反馈队列

等等。

在这篇文章中,我们将会讨论高通 WLAN Host Driver 中调度器的实现。

为什么先学习调度器呢?

因为调度器是 WLAN Host Driver 中相对简单的部分,仅有 4 个源代码文件,而且调度器是 WLAN Host Driver 的核心部分,是各个模块之间沟通的桥梁。

源代码我转存到了我的 GitHub 仓库中,今天要看的部分在这里:

https://github.com/WANG-Guangxin/wlan-driver/tree/5113495b16420b49004c444715d2daae2066e7dc/qca-wifi-host-cmn/scheduler

也可以使用我的 opengrok 服务器来查看源代码,如果它还在线的话。

https://opengrok.dijk.eu.org/xref/wlan-driver/qca-wifi-host-cmn/scheduler/

Scheduler translates to 调度器 (dispatcher) in Chinese.

The word scheduler should be familiar to anyone in computer science — in university OS classes we learned a lot about process scheduling.

  • First Come First Served (FCFS)
  • Shortest Job First (SJF)
  • Priority scheduling
  • Round-robin
  • Multi-level feedback queue

and so on.

In this article, we’ll discuss the scheduler implementation in Qualcomm’s WLAN Host Driver.

Why study the scheduler first?

Because the scheduler is one of the simpler parts of the WLAN Host Driver — only 4 source files — and it’s also the core of the driver, acting as the bridge between all modules.

I’ve mirrored the source code to my GitHub repo; the part we’re looking at today is here:

https://github.com/WANG-Guangxin/wlan-driver/tree/5113495b16420b49004c444715d2daae2066e7dc/qca-wifi-host-cmn/scheduler

You can also browse the source on my opengrok server, if it’s still online.

https://opengrok.dijk.eu.org/xref/wlan-driver/qca-wifi-host-cmn/scheduler/

阅读更多
WikiC/C++WLANDriver

如何使用

点击这里为这个仓库提交一个 issue.

issue 的标题是你要执行的 docker pull 命令, 内容不需要写。

几分钟后,在这个 issue 下会收到一个包含下载链接的评论。

点击这个链接即可下载镜像到本地。

执行 docker load < xxx.tar.gz 即可加载镜像。

How to Use

Click here to submit an issue to this repository.

The issue title is the docker pull command you want to run; no body content is needed.

A few minutes later, a comment containing a download link will appear under this issue.

Click the link to download the image locally.

Run docker load < xxx.tar.gz to load the image.

阅读更多
教程WikiGitHubDocker

起因

前段时间被封了一个圣何塞的甲骨文云账号,上面我开了一个 4C 24G 的 ARM 实例,跑了很多东西,几乎所有以 dijk.eu.org 结尾的域名都在上面跑着。

当然,就包括博客的图片服务器。

这下好了,博客的图片全都挂了。

然后我把博客的图片服务器指定成了家里的服务器。优点是国内访问的速度快,缺点是家里的服务器不稳定。

所以,一个自然的需求就是监控家里的服务器,看看它是否在线。

但是,如果监控服务器的服务器本身都不够稳定,那监控就失去意义了。(没错,我说的就是白嫖的服务器。)

又免费,又相对稳定的服务,我熟悉的就只有 GitHub Actions 了。

效果图效果图

https://wang-guangxin.github.io/sites

Why

A while ago, my Oracle Cloud account in San Jose was banned. I had a 4C 24G ARM instance there running all sorts of things — almost every domain ending in dijk.eu.org was running on it.

Including, of course, the blog’s image server.

So all the blog images went down.

Then I pointed the blog’s image server to my home server. The advantage is fast access from China; the disadvantage is that the home server isn’t stable.

So a natural need arose: monitor the home server to see if it’s online.

But if the monitoring server itself isn’t stable enough, the monitoring becomes meaningless. (Yes, I’m talking about free-riding servers.)

For something free and relatively stable, the only thing I know well is GitHub Actions.

EffectEffect

https://wang-guangxin.github.io/sites

阅读更多
教程WikiGitHubPython

前段时间写的一个基于 Cloudflare Workers 搭建 Vless 节点访问 ChatGPT 的文章部分内容失效了,节点还是可以正常翻墙,但是由于代码中的 ProxyIP 失效了,所以无法访问 ChatGPT 的网站了,其实是所有托管在 Cloudflare 的网站都访问不了了。这周末更新了一下那篇文章中的代码,算是短暂修复了。

这个问题不是本文要讨论的内容,但是它让我想到我需要对文章内容的时效性加个必要的“免责声明”。

其实文章过期提醒这个 Feature 在很多博客主题中都有,但是我使用的 hexo-theme-yun 已经进入了维护阶段。
所以我需要自己动手实现这个功能。

在这篇博客中,我将会介绍如何在 hexo-theme-yun 主题中添加文章过期提醒功能。

效果如下:

文章过期提醒

A while ago I wrote an article about building a Vless node with Cloudflare Workers to access ChatGPT, and part of its content has gone stale. The node itself can still bypass the firewall fine, but the ProxyIP in the code stopped working, so I could no longer reach ChatGPT — in fact, none of the sites hosted on Cloudflare could be reached. This weekend I updated the code in that article, which is a temporary fix.

That problem isn’t what this article is about, but it made me realize I should add a necessary “disclaimer” about the timeliness of my articles.

Actually, an article expiration notice is a feature that exists in many blog themes, but the hexo-theme-yun I use has entered maintenance mode.
So I had to implement this feature myself.

In this post, I’ll show you how to add an article expiration notice to the hexo-theme-yun theme.

Here’s what it looks like:

Article expiration notice

教程WikiJS

--

WikiJSTools

小学时,离开家一走就是一天
中学时,离开家一走就是一周
高中时,离开家一走就是一个月
大学时,离开家一走就是半年
工作后,离开家一走就是一年

工作快一年了,目前最深刻的体验就是感觉时间过的很快,我时常在某个工作日的早晨做梦,梦里我在思考一个问题,我应该去哪里上学?
一会儿醒来之后,我应该去杨林中学吗?还是呼兰一中?还是…实验室?我现在学校在哪来着?

伴随着意识的逐渐清醒,我意识到我已经工作了,该TM去上班了😥

去年一整年没有回家,今年利用宝贵的拼凑出来的五一假期,带上女朋友,一起回家深度体验农家乐。

In elementary school, leaving home meant being away for a day
In middle school, leaving home meant being away for a week
In high school, leaving home meant being away for a month
In college, leaving home meant being away for half a year
After starting work, leaving home means being away for a year

I’ve been working for almost a year now, and the most profound feeling is how fast time flies. On some weekday mornings I dream that I’m pondering a question: which school should I go to?
After waking up, should I go to Yanglin Middle School? Or Hulan No. 1 High School? Or… the lab? Wait, where’s my school?

As my consciousness gradually clears, I realize I’m already working — damn, time to go to work 😥

I didn’t go home at all last year. This year, using the precious cobbled-together May Day holiday, I took my girlfriend home for an in-depth farm stay experience.

结绳记事