├── System Call.pdf ├── OSSP_Individual_Nibretu-Mengaw-Misganaw_BDU1602278_B.pdf ├── Listen call.c └── README.md /System Call.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nibmangit/Manjaro-Linux-OS-installation-/HEAD/System Call.pdf -------------------------------------------------------------------------------- /OSSP_Individual_Nibretu-Mengaw-Misganaw_BDU1602278_B.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nibmangit/Manjaro-Linux-OS-installation-/HEAD/OSSP_Individual_Nibretu-Mengaw-Misganaw_BDU1602278_B.pdf -------------------------------------------------------------------------------- /Listen call.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #define PORT 8080 8 | #define BACKLOG 5 9 | 10 | int main() { 11 | int server_fd, new_socket; 12 | struct sockaddr_in address; 13 | int opt = 1; 14 | int addrlen = sizeof(address); 15 | 16 | if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) { 17 | perror("socket failed"); 18 | exit(EXIT_FAILURE); 19 | } 20 | 21 | if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, &opt, sizeof(opt))) { 22 | perror("setsockopt"); 23 | exit(EXIT_FAILURE); 24 | } 25 | 26 | address.sin_family = AF_INET; 27 | address.sin_addr.s_addr = INADDR_ANY; 28 | address.sin_port = htons(PORT); 29 | 30 | if (bind(server_fd, (struct sockaddr *)&address, sizeof(address)) < 0) { 31 | perror("bind failed"); 32 | exit(EXIT_FAILURE); 33 | } 34 | 35 | if (listen(server_fd, BACKLOG) < 0) { 36 | perror("listen"); 37 | exit(EXIT_FAILURE); 38 | } 39 | 40 | printf("Listening on port %d...\n", PORT); 41 | 42 | if ((new_socket = accept(server_fd, (struct sockaddr *)&address, (socklen_t*)&addrlen)) < 0) { 43 | perror("accept"); 44 | exit(EXIT_FAILURE); 45 | } 46 | 47 | printf("Connection accepted.\n"); 48 | 49 | close(new_socket); 50 | close(server_fd); 51 | 52 | return 0; 53 | } 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # **Manjaro Linux Documentation** 2 | --- 3 | ## Installation Description 4 |

5 | The documentation focuses on the installation of Manjaro Linux in a virtual environment and explores the broader concept of virtualization 6 | in modern operating systems. The document outlines the step-by-step installation process using VirtualBox, highlights system requirements, 7 | discusses challenges faced during installation, and offers solutions. It also explains the advantages and disadvantages of Manjaro Linux and 8 | provides an in-depth overview of virtualization technologies, including hypervisors, containerization, 9 | and their implementation in various operating systems. The report serves as a practical and theoretical guide to understanding OS installation 10 | and virtualization in the context of system programming coursework.

11 | 12 |

System Call Description

13 |

14 | It provide a comprehensive overview of system calls in Manjaro Linux, specifically focusing on the listen() system call used in network programming. It explains system calls as the interface between user-space applications and the OS kernel, enabling tasks like file manipulation and network communication. The document details the syntax, parameters, and return values of listen(), and delves into its kernel-level implementation through functions like sys_listen, __sys_listen, and inet_listen. It also describes how the call transitions from user space to kernel space and how the socket is prepared to accept incoming connections. A complete C code example demonstrates how to implement a simple TCP server using listen() in Manjaro Linux. 15 |

16 | --------------------------------------------------------------------------------