MIT6.824(6.5840) Lab1笔记+源码

文章目录

  • 其他人的内容,笔记写的更好,思路可以去看他们的
  • MapReduce
    • worker
      • map
      • reduce
    • coordinator
    • rpc
    • 纠错
  • 源码
    • worker.go
    • coordinator.go
    • rpc.go

原本有可借鉴的部分
mrsequential.go,多看几遍源码

其他人的内容,笔记写的更好,思路可以去看他们的

MIT - 6.824 全课程 + Lab 博客总览-CSDN博客

MapReuce 详解与复现, 完成 MIT 6.824(6.5840) Lab1 - 掘金 (juejin.cn)

mit 6.824 lab1 笔记 - 掘金 (juejin.cn)

MapReduce

每个 worker 进程需完成以下工作:
向 master 进程请求 task,从若干文件中读取输入数据,执行 task,并将 task 的输出写入到若干文件中。

master 进程除了为 worker 进程分配 task 外,还需要检查在一定时间内(本实验中为 10 秒)每个 worker 进程是否完成了相应的 task,如果未完成的话则将该 task 转交给其他 worker 进程。

worker

worker函数包含map和redicef两个功能
需要知道自己执行哪个功能

worker 请求获取任务 GetTask

任务设置为结构体,其中一个字段为任务类型

type Task struct{Type:0 1 }0为map,1为reduce const枚举

一个为编号

如何获取任务?

GetTask请求coordinator的assignTask方法,传入为自己的信息(???),获得任务信息

自己当前的状态 空闲 忙碌

call(rpcname,args,reply)bool的rpcname对应coordinator.go中coordinator的相关方法

???没理解这个什么用
GetTask中调用call来从coordinator获取任务信息?

那么rpc.go来干什么

使用ihash(key) % NReduce为Map发出的每个KeyValue选择reduce任务号。随机选择序号
n个文件,生成m个不同文件 n X m个 文件??

保存多少个文件

map得到

对结果ohashkey,写入到文件序号1-10

根据序号分配reduce任务

将结果写入到同一文件

map

mapf func(filename string, content string) []KeyValue

filename是传入的文件名
content为传入的文件的内容——传入前需读取内容

传出intermediate[] 产生文件名 mr-x-y

reduce

reducef func(key string, values []string) string)

这里的key对应ihash生成的任务号??

coordinator

分配任务
需要创建几个map worker—根据几个文件
几个 reduce worker—根据设置,这里为10

coordinator函数用来生成唯一id

Coordinator 结构体定义

用来在不同rpc之间通信,所以其内容是公用的?

type Coordinator struct{files   []stringnReduce int
当前处在什么阶段? state}type dic struct{
status 0or1or2
id       
}

map[file string]

如何解决并发问题??

怎么查询worker的状态??

worker主动向coordinator发送信息

rpc

args 请求参数怎么定义

type args struct{

自己的身份信息

自己的状态信息

}

纠错

  1. 6.5840/mr.writeKVs({0xc000e90000, 0x1462a, 0x16800?}, 0xc00007d100, {0xc39d00, 0x0, 0x0?})
    /home/wang2/6.5840/src/mr/worker.go:109 +0x285

  2. *** Starting wc test.
    panic: runtime error: index out of range [1141634764] with length 0

    ihash取余

  3. runtime error: integer divide by zero

reply.NReduce = c.nReduce // 设置 NReduce

  1. cat: ‘mr-out*’: No such file or directory
    — saw 0 workers rather than 2
    — map parallelism test: FAIL
    cat: ‘mr-out*’: No such file or directory
    — map workers did not run in parallel
    — map parallelism test: FAIL

    cat: ‘mr-out*’: No such file or directory
    — too few parallel reduces.
    — reduce parallelism test: FAIL
    文件句柄问题

  2. sort: cannot read: ‘mr-out*’: No such file or directory
    cmp: EOF on mr-wc-all which is empty
    2024/07/19 11:15:10 dialing:dial unix /var/tmp/5840-mr-1000: connect: connection refused
    2024/07/19 11:15:10 dialing:dial unix /var/tmp/5840-mr-1000: connect: connection refused
    2024/07/19 11:15:10 dialing:dial unix /var/tmp/5840-mr-1000: connect: connection refused

  3. coordinator结构体的并发读取问题
    dialing:dial-http unix /var/tmp/5840-mr-1000: read unix @->/var/tmp/5840-mr-1000: read: connection reset by peer

源码

由于笔记等提示跟没有没区别,这里将源码放上,等大家实在没办法再看吧,
github仓库地址
注意lab1中的提示很重要

博主初期也迷茫过,检查bug也痛苦过,祝福大家。
在这里插入图片描述

有的时候也会出错,但是不想搞了–

在这里插入图片描述

worker.go

package mrimport ("encoding/json""fmt""io""os""sort""strings""time"
)
import "log"
import "net/rpc"
import "hash/fnv"// for sorting by key.
type ByKey []KeyValue// for sorting by key.
func (a ByKey) Len() int           { return len(a) }
func (a ByKey) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
func (a ByKey) Less(i, j int) bool { return a[i].Key < a[j].Key }const (Map = iotaReduceOver
)
const (Idle = iotaBusyFinish
)// Map functions return a slice of KeyValue.type KeyValue struct {Key   stringValue string
}// use ihash(key) % NReduce to choose the reduce
// task number for each KeyValue emitted by Map.func ihash(key string) int {h := fnv.New32a()h.Write([]byte(key))return int(h.Sum32() & 0x7fffffff)
}// main/mrworker.go calls this function.func Worker(mapf func(string, string) []KeyValue, reducef func(string, []string) string) {// Your worker implementation here.Ch := make(chan bool)for {var Res = &Args{State: Idle} //初始化为idle状态var TaskInformation = &TaskInfo{}GetTask(Res, TaskInformation)//主任务结束后不再请求if TaskInformation.TaskType == Over {break}//fmt.Println("do it!")go DoTask(TaskInformation, mapf, reducef, Ch)sign := <-Ch//fmt.Println("sign:", sign)if sign == true {//fmt.Println("Finish one,ID:", TaskInformation.TaskId)Done(Res, TaskInformation)} else {//TaskInformation.Status = Idle//fmt.Println("err one,ID:", TaskInformation.TaskId)call("Coordinator.Err", Res, TaskInformation)Res = &Args{State: Idle}}time.Sleep(time.Second)}// uncomment to send the Example RPC to the coordinator.//CallExample()}func GetTask(Args *Args, TaskInformation *TaskInfo) {// 调用coordinator获取任务for {call("Coordinator.AssignTask", Args, TaskInformation)//fmt.Println(TaskInformation)if TaskInformation.Status != Idle {Args.State = BusyArgs.Tasktype = TaskInformation.TaskTypeArgs.TaskId = TaskInformation.TaskId//fmt.Println("TaskInfo:", TaskInformation)//fmt.Println("Args:", Args)call("Coordinator.Verify", Args, TaskInformation)break}time.Sleep(time.Second)}//fmt.Printf("Type:%v,Id:%v\n", TaskInformation.TaskType, TaskInformation.TaskId)
}func writeKVs(KVs []KeyValue, info *TaskInfo, fConts []*os.File) {//fConts := make([]io.Writer, info.NReduce)KVset := make([][]KeyValue, info.NReduce)//fmt.Println("start write")//for j := 1; j <= info.NReduce; j++ {////	fileName := fmt.Sprintf("mr-%v-%v", info.TaskId, j)//	os.Create(fileName)////	f, _ := os.Open(fileName)//	fConts[j-1] = f////	defer f.Close()//}var Order intfor _, v := range KVs {Order = ihash(v.Key) % info.NReduceKVset[Order] = append(KVset[Order], v)}//fmt.Println("kvset:", KVset)for i, v := range KVset {for _, value := range v {data, _ := json.Marshal(value)_, err := fConts[i].Write(data)//fmt.Println("data: ", data)//fmt.Println("numbers:", write)if err != nil {return}}}//fmt.Println("finish write")
}func read(filename string) []byte {//fmt.Println("read", filename)file, err := os.Open(filename)defer file.Close()if err != nil {log.Fatalf("cannot open %v", filename)fmt.Println(err)}content, err := io.ReadAll(file)if err != nil {log.Fatalf("cannot read %v", filename)}return content
}// DoTask 执行mapf或者reducef任务func DoTask(info *TaskInfo, mapf func(string, string) []KeyValue, reducef func(string, []string) string, Ch chan bool) {//fConts := make([]io.Writer, info.NReduce)//fmt.Println("start", info.TaskId)//go AssignAnother(Ch)switch info.TaskType {case Map:info.FileContent = string(read(info.FileName))//fmt.Println(info.FileContent)KVs := mapf(info.FileName, info.FileContent.(string))//fmt.Println("map:", KVs)//将其排序sort.Sort(ByKey(KVs))var fConts []*os.File // 修改为 *os.File 类型//0-9for j := 0; j < info.NReduce; j++ {//暂时名,完成后重命名fileName := fmt.Sprintf("mr-%v-%v-test", info.TaskId, j)//_, err := os.Create(fileName)//if err != nil {//	fmt.Println(err)//	return//}////f, _ := os.Open(fileName)//fConts[j-1] = f////defer f.Close()f, err := os.Create(fileName) // 直接使用 Create 函数if err != nil {fmt.Println(err)return}//fmt.Println("creatfile:  ", fileName)//fConts[j] = ffConts = append(fConts, f)defer os.Rename(fileName, strings.TrimSuffix(fileName, "-test"))defer f.Close()}writeKVs(KVs, info, fConts)case Reduce:fileName := fmt.Sprintf("testmr-out-%v", info.TaskId)fileOS, err := os.Create(fileName)//fmt.Println("create success")if err != nil {fmt.Println("Error creating file:", err)return}defer os.Rename(fileName, strings.TrimPrefix(fileName, "test"))defer fileOS.Close()var KVs []KeyValue//读取文件for i := 0; i < info.Nmap; i++ {fileName := fmt.Sprintf("mr-%v-%v", i, info.TaskId)//fmt.Println(fileName)file, err := os.Open(fileName)defer file.Close()if err != nil {fmt.Println(err)}dec := json.NewDecoder(file)for {var kv KeyValueif err := dec.Decode(&kv); err != nil {break}//fmt.Println(kv)KVs = append(KVs, kv)}}//var KVsRes []KeyValuesort.Sort(ByKey(KVs))//整理并传输内容给reducei := 0for i < len(KVs) {j := i + 1for j < len(KVs) && KVs[j].Key == KVs[i].Key {j++}values := []string{}for k := i; k < j; k++ {values = append(values, KVs[k].Value)}// this is the correct format for each line of Reduce output.output := reducef(KVs[i].Key, values)//每个key对应的计数//KVsRes = append(KVsRes, KeyValue{KVs[i].Key, output})fmt.Fprintf(fileOS, "%v %v\n", KVs[i].Key, output)i = j}}Ch <- true}func Done(Arg *Args, Info *TaskInfo) {//Info.Status = Idlecall("Coordinator.WorkerDone", Arg, Info)//arg重新清空Arg = &Args{State: Idle}
}func AssignAnother(Ch chan bool) {time.Sleep(2 * time.Second)Ch <- false
}// example function to show how to make an RPC call to the coordinator.
//
// the RPC argument and reply types are defined in rpc.go.
func CallExample() {// declare an argument structure.args := ExampleArgs{}// fill in the argument(s).args.X = 99// declare a reply structure.reply := ExampleReply{}// send the RPC request, wait for the reply.// the "Coordinator.Example" tells the// receiving server that we'd like to call// the Example() method of struct Coordinator.ok := call("Coordinator.Example", &args, &reply)if ok {// reply.Y should be 100.fmt.Printf("reply.Y %v\n", reply.Y)} else {fmt.Printf("call failed!\n")}
}// send an RPC request to the coordinator, wait for the response.
// usually returns true.
// returns false if something goes wrong.func call(rpcname string, args interface{}, reply interface{}) bool {// c, err := rpc.DialHTTP("tcp", "127.0.0.1"+":1234")sockname := coordinatorSock()//fmt.Println("Worker is dialing", sockname)c, err := rpc.DialHTTP("unix", sockname)if err != nil {//log.Fatal("dialing:", err)return false}defer c.Close()err = c.Call(rpcname, args, reply)if err != nil {//fmt.Println(err)return false}return true
}

coordinator.go

package mrimport ("log""sync""time"
)
import "net"
import "os"
import "net/rpc"
import "net/http"type Coordinator struct {// Your definitions here.files      []stringnReduce    intMapTask    map[int]*TaskReduceTask []intOK         boolLock       sync.Mutex
}type Task struct {fileName stringstate    int
}var TaskMapR map[int]*Taskfunc (c *Coordinator) Verify(Arg *Args, Reply *TaskInfo) error {switch Arg.Tasktype {case Map:time.Sleep(3 * time.Second)if c.MapTask[Arg.TaskId].state != Finish {c.MapTask[Arg.TaskId].state = IdleReply = &TaskInfo{}}case Reduce:time.Sleep(3 * time.Second)if c.ReduceTask[Arg.TaskId] != Finish {c.ReduceTask[Arg.TaskId] = IdleReply = &TaskInfo{}}}return nil
}// Your code here -- RPC handlers for the worker to call.
func (c *Coordinator) AssignTask(Arg *Args, Reply *TaskInfo) error {c.Lock.Lock()defer c.Lock.Unlock()//如果请求为空闲if Arg.State == Idle {//Args.State = Busy//首先分配Mapfor i, task := range c.MapTask {//fmt.Println(*task, "Id:", i)if task.state == Idle {//Arg.Tasktype = Map//Arg.TaskId = i + 1Reply.TaskType = MapReply.FileName = task.fileName//fmt.Println(task.fileName)Reply.TaskId = i          //range从0开始Reply.NReduce = c.nReduce // 设置 NReduceReply.Status = Busytask.state = Busy//fmt.Println("map,Id:", i)return nil}}//Map完成后再Reducefor _, task := range c.MapTask {if task.state != Finish {//fmt.Println("等待Map完成")return nil}}//fmt.Println("MapDone")//分配Reducefor i, v := range c.ReduceTask {//fmt.Println(c.ReduceTask)if v == Idle {Arg.Tasktype = ReduceArg.TaskId = iReply.TaskType = ReduceReply.TaskId = iReply.NReduce = c.nReduce // 设置 NReduceReply.Status = BusyReply.Nmap = len(c.files)c.ReduceTask[i] = Busy//fmt.Println(c.ReduceTask[i])//fmt.Println("reduce", i)return nil}}//Reduce都结束则成功for _, v := range c.ReduceTask {if v == Finish {} else {return nil}}Reply.TaskType = Overc.OK = true}return nil
}func (c *Coordinator) WorkerDone(args *Args, reply *TaskInfo) error {//c.Lock.Lock()//defer c.Lock.Unlock()//reply清空reply = &TaskInfo{}//args.State = Finishid := args.TaskId//fmt.Println("id", id)switch args.Tasktype {case Map:c.MapTask[id].state = Finish//fmt.Println(*c.MapTask[id])case Reduce:c.ReduceTask[id] = Finish//fmt.Println(c.ReduceTask)}return nil
}func (c *Coordinator) Err(args *Args, reply *TaskInfo) error {//c.Lock.Lock()//defer c.Lock.Unlock()reply = &TaskInfo{}id := args.TaskIdswitch args.Tasktype {case Map:if c.MapTask[id].state != Finish {c.MapTask[id].state = Idle}case Reduce:if c.ReduceTask[id] != Finish {c.ReduceTask[id] = Idle}}return nil
}// an example RPC handler.
//
// the RPC argument and reply types are defined in rpc.go.func (c *Coordinator) Example(args *ExampleArgs, reply *ExampleReply) error {reply.Y = args.X + 1return nil
}// start a thread that listens for RPCs from worker.gofunc (c *Coordinator) server() {rpc.Register(c)rpc.HandleHTTP()sockname := coordinatorSock()os.Remove(sockname)l, e := net.Listen("unix", sockname)if e != nil {log.Fatal("listen error:", e)}//fmt.Println("Coordinator is listening on", sockname)go http.Serve(l, nil)
}// main/mrcoordinator.go calls Done() periodically to find out
// if the entire job has finished.func (c *Coordinator) Done() bool {//c.Lock.Lock()//defer c.Lock.Unlock()ret := falseif c.OK == true {ret = true}// Your code here.return ret
}// create a Coordinator.
// main/mrcoordinator.go calls this function.
// nReduce is the number of reduce tasks to use.
func MakeCoordinator(files []string, nReduce int) *Coordinator {//fmt.Println(files)TaskMapR = make(map[int]*Task, len(files))for i, file := range files {TaskMapR[i] = &Task{fileName: file,state:    Idle,}}ReduceMap := make([]int, nReduce)c := Coordinator{files:      files,nReduce:    nReduce,MapTask:    TaskMapR,ReduceTask: ReduceMap,OK:         false,}// Your code here.c.server()return &c
}

rpc.go

package mr//
// RPC definitions.
//
// remember to capitalize all names.
//import "os"
import "strconv"//
// example to show how to declare the arguments
// and reply for an RPC.
//type ExampleArgs struct {X int
}type ExampleReply struct {Y int
}// Add your RPC definitions here.type Args struct {State    intTasktype intTaskId   int
}type TaskInfo struct {Status intTaskType int //任务基本信息TaskId   intNReduce intNmap    intFileName    stringFileContent any//Key    string //reduce所需信息//Values []string
}// Cook up a unique-ish UNIX-domain socket name
// in /var/tmp, for the coordinator.
// Can't use the current directory since
// Athena AFS doesn't support UNIX-domain sockets.func coordinatorSock() string {s := "/var/tmp/5840-mr-"s += strconv.Itoa(os.Getuid())return s
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/382134.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C++的STL简介

0.STL简介 C的STL&#xff08;Standard Template Library&#xff0c;标准模板库&#xff09;是C标准库的一部分&#xff0c;它提供了一套通用的类和函数模板&#xff0c;用于处理数据结构和算法。STL的主要组件包括&#xff1a; 容器分配器算法迭代器适配器仿函数 容器 容…

vscode 远程 Ubuntu 系统

1、在 Ubuntu 下检查 sshd 守护进程是否开启 ps -aux | grep sshd如果没有开启&#xff0c;请在 Ubuntu 下输入指令安装 sudo apt-get install openssh-server2、首先打开 Windows 下的 vscode&#xff0c;点击左下角图标打开远程窗口 3、打开远程窗口&#xff0c;选择“Con…

排序算法与复杂度介绍

1. 排序算法 1.1 排序算法介绍 排序也成排序算法&#xff08;Sort Algorithm&#xff09;&#xff0c;排序是将一组数据&#xff0c;依照指定的顺序进行排序的过程 1.2 排序的分类 1、内部排序&#xff1a; 指将需要处理的所有数据都加载到**内部存储器&#xff08;内存&am…

领夹麦克风哪个品牌好,电脑麦克风哪个品牌好,热门麦克风推荐

​在信息快速传播的时代&#xff0c;直播和视频创作成为了表达与交流的重要方式。对于追求卓越声音品质的创作者而言&#xff0c;一款性能卓越的无线麦克风宛如一把利剑。接下来&#xff0c;我要为大家介绍几款备受好评的无线麦克风&#xff0c;这些都是我在实际使用中体验良好…

EXCEL怎么自动添加表格吗?

第一步&#xff0c;选中需要添加表格的范围 第二步&#xff0c;点击开始&#xff0c;选择条件格式&#xff0c;“使用公式确定要设置格式的单元格” 第三步&#xff0c;编辑规则说明加上<>"" 第四步&#xff0c;点击边框&#xff0c;选择外边框确定即可&#x…

Adobe国际认证详解-动漫制作专业就业方向和前景

动漫制作专业的就业方向和前景随着创意产业的蓬勃发展而愈发广阔。这一专业涵盖了从角色设计、场景绘制到动画制作、特效合成等多个环节&#xff0c;是创意与技术相结合的典型代表。随着数字媒体和互联网的普及&#xff0c;动漫制作专业人才的需求正不断增长&#xff0c;为该专…

如何将mp4格式的视频压缩更小 mp4格式视频怎么压缩最小 工具软件分享

在数字化时代&#xff0c;视频内容成为信息传播的重要载体。然而&#xff0c;高清晰度的视频往往意味着较大的文件体积&#xff0c;这给存储和分享带来了一定的困扰。MP4格式作为目前最流行的视频格式之一&#xff0c;其压缩方法尤为重要。下面&#xff0c;我将为大家详细介绍如…

谷粒商城实战笔记-跨域问题

一&#xff0c;When allowCredentials is true, allowedOrigins cannot contain the special value “*” since that cannot be set on the “Access-Control-Allow-Origin” response header. To allow credentials to a set of origins, list them explicitly or consider u…

java中多态的用法

思维导图&#xff1a; 1. 多态的概念 多态通俗的讲就是多种形态&#xff0c;同一个动作&#xff0c;作用在不同对象上&#xff0c;所产生不同的形态。 例如下图&#xff1a; 2. 多态的实现条件 Java中&#xff0c;多态的实现必须满足以下几个条件&#xff1a; 1. 必须在继承…

MybatisPlus的使用与详细讲解

今天我们来讲解一下Mybatis的升级版&#xff0c;就是MybatisPlus. MybatisPlus是如何获取实现CRUD的数据库表信息的&#xff1f; 默认以类名驼峰转下划线作为表名 默认把名为id的字段作为主键 默认把变量名驼峰转下划线作为表的字段名 1.MybatisPlus中比较常见的注解 TableN…

Golang | Leetcode Golang题解之第241题为运算表达式设计优先级

题目&#xff1a; 题解&#xff1a; const addition, subtraction, multiplication -1, -2, -3func diffWaysToCompute(expression string) []int {ops : []int{}for i, n : 0, len(expression); i < n; {if unicode.IsDigit(rune(expression[i])) {x : 0for ; i < n &…

分类预测 | Matlab实现WOA-CNN-SVM鲸鱼算法优化卷积支持向量机分类预测

分类预测 | Matlab实现WOA-CNN-SVM鲸鱼算法优化卷积支持向量机分类预测 目录 分类预测 | Matlab实现WOA-CNN-SVM鲸鱼算法优化卷积支持向量机分类预测分类效果基本描述程序设计参考资料 分类效果 基本描述 1.Matlab实现WOA-CNN-SVM鲸鱼算法优化卷积支持向量机分类预测&#xff0…

Yolo-World在自定义数据集上进行闭集词汇训练推理过程(二)——使用ultralytics库训练模型

文章目录 概要训练整体流程推理整体流程 概要 之前的文章已经介绍了如何在本地使用源码的yolo-world进行本地化训练模型&#xff0c;具体请参考&#xff1a;Yolo-World在自定义数据集上进行闭集词汇训练过程 下边介绍一下基于ultralytics库训练yolo-world的方法&#xff0c;非常…

如何防止热插拔烧坏单片机

大家都知道一般USB接口属于热插拔&#xff0c;实际任意带电进行连接的操作都可以属于热插拔。我们前面讲过芯片烧坏的原理&#xff0c;那么热插拔就是导致芯片烧坏的一个主要原因之一。 在电子产品的整个装配过程、以及产品使用过程经常会面临接口热插拔或者类似热插拔的过程。…

ROS2中间件

ROS2 是重新设计的 Robot Operating System&#xff0c;无论从用户API接口到底层实现都进行了改进。这里主要关注ROS2 的中间件。 1. 通信模式 ROS2 使用DDS协议进行数据传输&#xff0c;并通过抽象的rmw&#xff0c;支持多个厂家的DDS实现&#xff08;FastDDS&#xff0c;Cyc…

自动驾驶系列—智能巡航辅助功能中的车道变换功能介绍

自动驾驶系列—智能巡航辅助功能中的车道中央保持功能介绍 自动驾驶系列—智能巡航辅助功能中的车道变换功能介绍 自动驾驶系列—智能巡航辅助功能中的横向避让功能介绍 自动驾驶系列—智能巡航辅助功能中的路口通行功能介绍 文章目录 1. 背景介绍2. 功能定义3. 功能原理4. 传感…

Adobe Dimension(DN)安装包软件下载

目录 一、软件简介 二、软件下载 三、注意事项 四、软件功能 五、常用快捷键 快捷键&#xff1a; 一、软件简介 Adobe Dimension&#xff08;简称DN&#xff09;是Adobe公司推出的一款三维设计和渲染软件。与一般的3D绘图软件相比&#xff0c;DN在操作界面和功能上有所不…

C语言航空售票系统

以下是系统部分页面 以下是部分源码&#xff0c;需要源码的私信 #include<stdio.h> #include<stdlib.h> #include<string.h> #define max_user 100 typedef struct ft {char name[50];//名字char start_place[50];//出发地char end_place[50];//目的地char …

微软蓝屏事件暴露的网络安全问题

目录 1.概述 2.软件更新流程中的风险管理和质量控制机制 2.1.测试流程 2.2.风险管理策略 2.3.质量控制措施 2.4.小结 3.预防类似大规模故障的最佳方案或应急响应对策 3.1. 设计冗余系统 3.2. 实施灾难恢复计划 3.3. 建立高可用架构 3.4. 类似规模的紧急故障下的响应…

对某次应急响应中webshell的分析

文章前言 在之前处理一起应急事件时发现攻击者在WEB应用目录下上传了webshell&#xff0c;但是webshell似乎使用了某种加密混淆手法&#xff0c;无法直观的看到其中的木马连接密码&#xff0c;而客户非要让我们连接webshell来证实此文件为后门文件且可执行和利用(也是很恼火&a…