Overview The Unix domain protocols are not an actual protocol suite, but a way of performing client/service communication on a single host. It is a method of inter-process communication (IPC). It provides two types of sockets: byte stream socket SOCK_STREAM (somewhat like TCP) and datagram socket SOCK_DGRAM (somewhat like UDP) The UNIX domain datagram service […]
Tag: unix
supervisorProblem handling unix:///var/run/supervisor/supervisor.sock no such file
Problem description Recently, the author encountered some problems when configuring supervisor and hoping to use supervisor for process service management, specifically: When running supervisorctl status, I encountered the problem of unix:///var/run/supervisor/supervisor.sock no such file. I encountered the following error when running sudo service supervisor status sudo service supervisor status ● supervisor.service – Supervisor process control […]
MIT6.S081Lab1: Xv6 and Unix utilities
MIT6.S081 Lab1: Xv6 and Unix utilities Official documentation 一.Boot xv6 How to successfully boot xv6 can be seen in the previous article MIT6.S081 Experimental Environment Construction, there is just one more step, execute it in the clone folder git checkout util Just switch to the util branch. 二.sleep Write a program in user/sleep.c to complete […]
Lab 1: Summary of Unix utilities
This experiment mainly learned some commonly used system calls. Lab 1: Unix utilities Boot xv6 (easy) git clone, switch branches, qemu. Just proceed as required. $ git clone git://g.csail.mit.edu/xv6-labs-2020 $ cd xv6-labs-2020 $ git checkout util $ makeqemu sleep (easy) #include “kernel/types.h” #include “kernel/stat.h” #include “user/user.h” int main(int argc,char *argv[]) { if(argc < 2) { […]
MIT6.S081 Lab1 Xv6 and Unix utilities (updated)
Domestic OS courses may only teach you the concepts of operating systems on the surface. It is like playing a simulator game and just watching others play. After all, you will still lose your way in the world of OS. This article was originally published on my personal blog MIT6.S081 lab1 Q1.sleep (easy) Implement the […]
Comparison of data writing speed between AF_UNIX and 127.0.0.1 (AF_INET) loopback address (2)
I wrote a blog before: Comparison of data writing speeds between AF_UNIX and 127.0.0.1 (AF_INET) loopback addresses Then we used the sending end to read a large file, and the receiver received and saved it as a file for testing. It was found that AF_UNIX is not better than the 127.0.0.1 (AF_INET) loopback address. If […]
Comparison of data writing speeds between AF_UNIX and 127.0.0.1 (AF_INET) loopback addresses
Under Linux, there is a situation where local inter-process communication occurs, and one of them is the server and the others are clients. This can be done by binding the port on the server and sending the client to the corresponding port of 127.0.0.1. However, this will waste a port and easily cause security risks. […]
lv7 Embedded Development-Network Programming Development 13 UNIX Domain Sockets
Table of Contents 1 UNIX domain streaming socket 2 UNIX domain datagram socket 1 UNIX domain streaming socket UNIX domain stream socket is a mechanism for communication between processes on the same host. It does not rely on the network protocol stack, but uses the file system as the basis for communication. UNIX domain streaming […]
6.1810: Operating System Engineering Lab: Xv6 and Unix utilities By:Haostart
Foreword After school starts, I have to prepare for finding an internship in one year. To lay a foundation, I will do MIT-6.S081, which is the 2022 version. The address is as follows 6.1810: Operating System Engineering Lab Lab Be sure to know the system calls of Xv6 before doing experiments!!! Be sure to know […]
An example of UNIX domain user datagram socket
Service-Terminal: 1: #include <stdio.h> 2: #include <stdlib.h> 3: #include <strings.h> 4: #include <sys/un.h> 5: #include <string.h> 6: #include <sys/socket.h> 7: #include <netinet/in.h> 8: #include <arpa/inet.h> 9: #include <unistd.h> 10: 11: typedef struct sockaddr SA; 12: 13: #define N 256 14: 15: int main(int argc, char *argv[]) 16: {<!– –> 17: 18: int listenfd; 19: struct […]