shaico111 commited on
Commit
f34d29b
·
verified ·
1 Parent(s): b86125d

Upload batch 341 of 407

Browse files
שנה ב/סמסטר ב/מערכות הפעלה/מבחנים/2025/מועד ב 21.8.25.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34ca88db093f789a505085f7b6d52792545d9293b9dddc1756a3e75220e47a3e
3
+ size 1180177
שנה ב/סמסטר ב/מערכות הפעלה/מבחנים/שאלות ומבחנים נוספים/מבחנים-ללא-תשובות.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e023a98d54341009e78df9ed1cf78b2026300b7a984d00b7362ee253bc1081ca
3
+ size 529805
שנה ב/סמסטר ב/מערכות הפעלה/מבחנים/שאלות ומבחנים נוספים/מבחנים-עם-תשובות.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1953ea00f290fe165e402e340d139b974943502224f74c7dbf97378b9fcc849a
3
+ size 875806
שנה ב/סמסטר ב/מערכות הפעלה/מבחנים/שאלות ומבחנים נוספים/מערכות הפעלה - מבחנים.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d59801382de3b9d983443e730943741159dbbc72b050991421f350d73f3ad5b
3
+ size 3773384
שנה ב/סמסטר ב/מערכות הפעלה/מבחנים/שאלות ומבחנים נוספים/מקבץ מבחנים.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3cf96d750dc35907e9d776698471fd45a8e10011b5fe4fb7db3395cabd14c461
3
+ size 642597
שנה ב/סמסטר ב/מערכות הפעלה/מבחנים/שאלות ומבחנים נוספים/מקבץ.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:437b84ddeee5232dc2e0d4d52e6ceec53bd0aa3573a2ed564effecf2a7c1d19f
3
+ size 633144
שנה ב/סמסטר ב/מערכות הפעלה/מבחנים/שאלות ומבחנים נוספים/סיכום-שאלות-ממבחנים.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d4a0d4950ca0f115b6baade97e580df62e053e4a99a1729edf0d6de6a23feb1
3
+ size 311829
שנה ב/סמסטר ב/מערכות הפעלה/מטלות הגשה (תרגילי בית)/מטלה 1 (תרגיל בית 1) Fork-Processes/Ex1_SOL.c ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <stdio.h>
2
+ #include <unistd.h>
3
+ #include <stdlib.h>
4
+ #include <sys/types.h>
5
+ #include <sys/wait.h>
6
+ #include <wait.h>
7
+ #include <string.h>
8
+ #include <errno.h>
9
+ int main(int argc, char *argv[])
10
+ {
11
+ printf("\n######################################################\n");
12
+ printf("Hey Master,\nWelcome to your Shell!\nEnter commands or 'Leave' or 'leave' to exit\n");
13
+ printf("######################################################\n");
14
+ while (1)
15
+ {
16
+ char buf[1000];
17
+ printf("Master@Shell--> ");
18
+ fflush(stdout); // clear the buffers
19
+ fflush(stdin);
20
+ fgets(buf, 1000, stdin);
21
+ buf[strlen(buf) - 1] = 0;
22
+ if ((0 == strcmp("leave", buf)) || (0 == strcmp("Leave", buf)))
23
+ break; // Leave Commands - Break the Loop
24
+ if (!(fork())) // Child Process
25
+ {
26
+ char *path = getenv("PATH");
27
+ char *argv[2];
28
+ char command[2000];
29
+ char *cwd;
30
+ argv[0] = buf;
31
+ argv[1] = NULL;
32
+ for (cwd = strtok(path, ":"); cwd != NULL; cwd = strtok(NULL, ":"))
33
+ {
34
+ sprintf(command, "%s/%s", cwd, buf);
35
+ // printf("%s\n", command); // UNCOMMENT TO print each searched path
36
+ execv(command, argv);
37
+ }
38
+ printf("Sorry Master, Command not found!\n");
39
+ exit(1);
40
+ }
41
+ else
42
+ { // Parent Section -- waiting --
43
+ int status;
44
+ wait(&status);
45
+ printf("%d", status);
46
+ }
47
+ }
48
+ return 0;
49
+ }
שנה ב/סמסטר ב/מערכות הפעלה/מטלות הגשה (תרגילי בית)/מטלה 1 (תרגיל בית 1) Fork-Processes/Ex1_SOL.txt ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <stdio.h>
2
+ #include <unistd.h>
3
+ #include <stdlib.h>
4
+ #include <sys/types.h>
5
+ #include <sys/wait.h>
6
+ #include <wait.h>
7
+ #include <string.h>
8
+ #include <errno.h>
9
+ int main(int argc, char *argv[])
10
+ {
11
+ printf("\n######################################################\n");
12
+ printf("Hey Master,\nWelcome to your Shell!\nEnter commands or 'Leave' or 'leave' to exit\n");
13
+ printf("######################################################\n");
14
+ while (1)
15
+ {
16
+ char buf[1000];
17
+ printf("Master@Shell--> ");
18
+ fflush(stdout); // clear the buffers
19
+ fflush(stdin);
20
+ fgets(buf, 1000, stdin);
21
+ buf[strlen(buf) - 1] = 0;
22
+ if ((0 == strcmp("leave", buf)) || (0 == strcmp("Leave", buf)))
23
+ break; // Leave Commands - Break the Loop
24
+ if (!(fork()))
25
+ {
26
+ char *path = getenv("PATH");
27
+ char *argv[2];
28
+ char command[2000];
29
+ char *cwd;
30
+ argv[0] = buf;
31
+ argv[1] = NULL;
32
+ for (cwd = strtok(path, ":"); cwd != NULL; cwd = strtok(NULL, ":"))
33
+ {
34
+ sprintf(command, "%s/%s", cwd, buf);
35
+ // printf("%s\n", command); // print each searched path
36
+ execv(command, argv);
37
+ }
38
+ printf("Sorry Master, Command not found!\n");
39
+ exit(1);
40
+ }
41
+ else // Parent Section -- waiting --
42
+ {
43
+ int status;
44
+ wait(&status);
45
+ printf("%d", status);
46
+ }
47
+ }
48
+ return 0;
49
+ }
שנה ב/סמסטר ב/מערכות הפעלה/מטלות הגשה (תרגילי בית)/מטלה 1 (תרגיל בית 1) Fork-Processes/מטלה 1.c ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <stdio.h>
2
+ #include <stdlib.h>
3
+ #include <string.h>
4
+ #include <unistd.h>
5
+ #include <sys/wait.h>
6
+
7
+ #define MAX_CMD_LEN 100
8
+
9
+ int main() {
10
+ int pid;
11
+
12
+ while (1) {
13
+ char* path = getenv("PATH");
14
+ char cmd[MAX_CMD_LEN];
15
+ char* newline;
16
+
17
+ printf("Enter command: ");
18
+ fgets(cmd, MAX_CMD_LEN, stdin);
19
+
20
+
21
+ newline = strchr(cmd, '\n');
22
+ if (newline) {
23
+ *newline = '\0';
24
+ }
25
+
26
+ if (!strcmp(cmd, "leave")) {
27
+ break;
28
+ }
29
+
30
+ char* args[10];
31
+ int argc = 0;
32
+
33
+
34
+ char* arg = strtok(cmd, " ");
35
+ while (arg && argc < 10 - 1) {
36
+ args[argc++] = arg;
37
+ arg = strtok(NULL, " ");
38
+ }
39
+ args[argc] = NULL;
40
+
41
+ pid = fork();
42
+
43
+ if (pid == 0) {
44
+ char* p = strtok(path, ":");
45
+ char prog[MAX_CMD_LEN];
46
+
47
+ while (p) {
48
+ strcpy(prog, p);
49
+ strcat(prog, "/");
50
+ strcat(prog, args[0]);
51
+ execv(prog, args);
52
+ p = strtok(NULL, ":");
53
+ }
54
+
55
+
56
+ printf("%s: command not found\n", args[0]);
57
+ exit(1);
58
+ }
59
+ else if (pid > 0) {
60
+
61
+ wait(NULL);
62
+ }
63
+
64
+ return 0;
65
+ }
66
+ }
67
+
68
+