【大二下】南大jyy操作系统
课程地址:
2023:https://jyywiki.cn/OS/2023/index.html
2022:https://jyywiki.cn/OS/2022/index.html概述课STFW/RTFM: search the fucking web/read the fucking mannul命令行工具tmux终端复用工具,可以在一个终端窗口中打开多个终端,可以在后台运行,可以在不同终端窗口之间切换,可以在不同终端窗口之间复制粘贴。
主要区分session、Windows和pane的概念。常用指令:
tmux new -s [sessionname]
tmux attach -t [sessionname]
ctrl+b+其他指令(注意ctrl+b要先放开再按其他键)
?:列出所有的快捷键,按q返回
d:detached当前的session,后台运行。
c: 新增windows
x: 删除当前pane,关掉所有pane和windows后exit了整个session
%:垂直划分pane
":水平划分pane
Space (空格键) :对当前窗口下的所有窗格重 ...
LeetCode刷题记
STLvector特点:
动态数组:vector 是一个动态数组,可以根据需要动态增加或减少数组的大小。
随机访问:vector 支持通过下标随机访问元素,时间复杂度为 O(1)。
尾部插入和删除:vector 支持在尾部插入和删除元素,时间复杂度为 O(1)。
自动扩容:当 vector 的容量不足时,会自动扩容,一般情况下,扩容策略是将容量翻倍。
连续内存:vector 中的元素在内存中是连续存储的,因此支持高效的随机访问。
无需手动释放内存:vector 会自动管理内存,不需要手动释放内存。
各种操作1234567891011121314151617181920212223242526#include <vector>#include <iostream>int main() { // 定义 std::vector<int> v; // 初始化 std::vector<int> v1 = {1, 2, 3}; std::vector<int> v2(5, 0) ...
Linux系统基础
基础知识为普通用户配置sudo认证/就是整个Linux系统的根目录。
尝试普通用户在根目录创建文件夹,cd /.mkdir test,发现权限不足。
普通用户在HOME目录中一般是不受限的,但是一旦出了HOME目录仅有只读和执行权限,没有修改权限。
su - root 切换到root用户
su - username 切换到username用户
su - 命令用于切换账户,源于switch user
exit 命令用于退出当前用户
sudo 命令用于临时以root权限执行命令
在root用户下使用 visudo,会自动用vi编辑器打开 /etc/sudoers 文件,在末尾加上 username ALL=(ALL) NOPASSWD:ALL ,保存退出,即可为username用户配置sudo认证。这样username用户就可以临时免密使用sudo命令了。
用户与用户组linux的权限管控有两个层次:针对用户和用户组
用户组创建用户组在root用户下用groupadd groupname 创建用户组
删除用户组在root用户下用groupdel groupname 删除用户组
用 ...
IBM2024年活动规划(群公告)
【IBM主机创新俱乐部2024年活动规划】一、活动
全员大会时间:清明假期后的第二个周末(暂定为4.20/21)地点:图书馆7楼会议室(待定)内容:介绍IBM俱乐部的活动规划,学长学姐分享各种经验and学习资源备注:有需求的同学可以顺便提提,我们会尽量满足大家的需求~
讲座活动时间:未定地点:未定内容:侧重技术分享,面向全校备注:
俱乐部内部先了解、调研热门科技前沿技术,【内部调查票选意愿】的结果交给许可老师,由老师去对接和邀请专业经验对口的IBM的老师来作为分享人。例如金融科技,或者是其他热门的技术分享。
会有讲座票噢~~
二、项目or学习项目or比赛
关于ibm实验室的课题,各类项目,srp,大创双创百步梯等,有兴趣的同学可以关注以下时间点:
每年12月srp开始课题申报,3月初开始学生报名,次年四月份左右结题(创新分一共4分)。
学校的大创(大学生创新创业训练计划项目),学生提出申请(3月29日前)。
学院双创项目申报,大概是在3月份
百步梯攀登计划 大概11月发通知
有idea想申报项目,需要找指导老师或者idea交流的同学,可以找许可老师~
许可老师有一门大三的 ...
【IBM】2024年策划草案
往届资料搜集:2017~2018俱乐部的活动主要是分享讨论会(大三学长负责,全体均可参与),IBM 讲座(IBM 工程师,全体均可参与),项目+比赛(俱乐部指导老师提供大二及以上同学参与)。TownHall (请院长或者指导老师过来做聚会),晚安小天使(大一参加)。完全是为了提升大家的素质和学习能力考虑得。
2018~2019
积极宣传 IBM 的比赛
讲座:从 11 月中旬开始即在图书馆 IBM 主机教育中心开展技术讲座。如举办 IBM 蓝色加油站讲座等。通过开展这类讲座,俱乐部让更多的同学了解和学习到 IBM 的前沿知识和技术。
俱乐部
晚安小天使活动:每逢上学期举办。大一初次加入俱乐部的同学,轮流以晚安小短文的形式,在俱乐部部员群内交流自己的学习经历和成长历程。该活动面向技术稍薄弱的大一同学,有助于培养学生技术兴趣,巩固自己在课堂课后学到的知识。
俱乐部沙龙:大三的师兄通过技术沙龙的方式向大一大二同学分享自己的掌握的技术要领和学习心得等等。通过该项活动,俱乐部通过这种方式培养俱乐部成员对于技术的热爱,鼓励同学们在编程的道路中积极寻找问题、发现问题、解决问题,从而拥 ...
DragonOS招新面试小任务
DragonOSrust入门与开发环境推荐rust入门的教程仓库 https://github.com/rust-lang/rustlings
开发环境推荐用 vscode + rust-analyzer 插件+ CodeLLDB 插件
rustlingsquiz2The difference between the two snippets lies in how they iterate over input.
In the first snippet, input.iter() is used. This method returns an iterator that borrows each element from input. This means that the string and command variables in the loop are references to the elements in input. This is why you see *n in the Command::Append(n) match arm - it’s derefere ...
实现sysfs中的uevent
需求
在sysfs中实现uevent的逻辑,并在设备驱动模型中,发送通用的uevent.
然后用户测试程序能够通过epoll感知到这些uevent,并输出。前置知识https://www.cnblogs.com/schips/p/linux_device_model.html
Linux内核中设备管理和事件通知机制。
sysfs要分析sysfs,首先就要分析kobject和kset,因为驱动设备的层次结构的构成就是由这两个东东来完成的。sysfs与kobject密不可分。
kobjectkobject是组成设备模型的基本结构,是所有用来描述设备模型的数据结构的基类。
kobject是一个对象的抽象,它用于管理对象。
ksetktype设备驱动模型(Linux Device Driver Model,LDDM)
ueventUevent只是通过netlink套接字发送的一些特殊格式的字符串。
uevent是kobject的一部分,用于在kobject状态发生改变时,例如增加、移除等,通知用户空间程序。用户空间程序收到这样的事件后,会做相应的处理。
uevent( user space ...
DragonOS移植nslookup
啥是nslookup?Linux中的nslookup在Linux中,nslookup是一个用于查询DNS的命令行工具。它可以用来查询域名的IP地址,也可以用来查询IP地址对应的域名。nslookup命令的使用方法如下:12nslookup [选项] [主机名] [DNS服务器]nslookup [option] [hostname] [server]其中,主机名是要查询的域名,DNS服务器是要查询的域名服务器的IP地址。如果不指定DNS服务器,nslookup会使用系统默认的DNS服务器。
Nslookup Command Prompt Options in LinuxThere are a variety of command prompt options for nslookup on Linux. Many of these options allow you to look up specific record types. These include:-type=mx: Used to look up mail exchange records.-type=hinfo: Pr ...
【CMU】深入理解计算机系统
本博客为CMU的15-213/15-513 Introduction to Computer Systems (ICS)的笔记,我按照自己的理解排布了结构,进行了翻译并加上了自己的理解作为补充。致谢为这门课付出并公开的所有人。配套教材:CSAPP(深入理解计算机系统)
前置介绍CSAPP也就是《Computer system:in a programer’s perspective》,CMU的镇校神书,是一本非常经典的计算机系统导论教材,也是CMU的本科生计算机系统导论课程的教材。这门课程的目的是让学生了解计算机系统的工作原理,以及如何使用编程语言和系统工具来控制计算机系统。
资源分享
【课程资源】https://www.cs.cmu.edu/~213/schedule.html
【CMU图书馆影印版教材】https://cmu.primo.exlibrisgroup.com/discovery/delivery/01CMU_INST:01CMU/12295179970004436
【B站一个老哥分享的PDF课本,提取码】https://pan.baidu.com/s/1crJC8X- ...
【CSAPP】lab_in_CSAPP
本博客为CMU的15-213/15-513 Introduction to Computer Systems (ICS)的配套教材CSAPP(深入理解计算机系统)的lab笔记
开始前的准备下载self-study-handout在http://csapp.cs.cmu.edu/3e/labs.html,作为非参与课程的自学学生,每个lab都可以下载self-study-handout的tar压缩包,里面包含了所有该lab需要的资源。
在Linux中解压handout文件由于该课程和lab所需环境是Linux,我们需要把下载的tar压缩包解压到Linux中。以解压第一个lab——datalab为例,在命令行中执行以下命令,将tar压缩包解压到当前目录下:1$ tar -xvf datalab-handout.tar解压后,会在当前目录下生成一个datalab-handout的文件夹,里面包含了我们所需要的所有东西。
关于CentOs换源问题背景刚好这天tz过期了,暂时懒得续费,可是直接安装又太慢了,所以想能不能换个源。结果不知道是不是误操作了,原本的repo被我删了。导致我续费了tz之后 ...