Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
71a1f50
lab0
ITu-Dev Mar 5, 2020
23dfce7
lab1.1
ITu-Dev Mar 5, 2020
e8a192d
lab1.2
ITu-Dev Mar 5, 2020
443a1b5
ex1,ex2
ITu-Dev Mar 20, 2020
e469826
ex3
ITu-Dev Mar 20, 2020
77daed8
ex1
ITu-Dev Mar 21, 2020
d989de6
Delete revert_string.o
ITu-Dev Mar 23, 2020
d3366a7
Delete libdyn_rev.so
ITu-Dev Mar 23, 2020
61900df
Delete librev_str.a
ITu-Dev Mar 23, 2020
4febe8e
Delete main.o
ITu-Dev Mar 23, 2020
3090a54
Delete rez
ITu-Dev Mar 23, 2020
ee3afa8
Delete rez_dyn
ITu-Dev Mar 23, 2020
f11f59a
microupd
ITu-Dev Apr 9, 2020
0e7e2ba
ex.2-3
ITu-Dev Apr 10, 2020
64148ee
back
ITu-Dev Apr 10, 2020
c4bf721
mupd.01
ITu-Dev Apr 10, 2020
2fc3f92
ex4
ITu-Dev Apr 11, 2020
de46c99
last upd
ITu-Dev Apr 11, 2020
7fce09e
ex.4-5
ITu-Dev Apr 11, 2020
0cdcb88
Delete a.out
ITu-Dev Apr 13, 2020
3cb70e9
ex1
ITu-Dev May 5, 2020
3af66bf
ex1
ITu-Dev May 5, 2020
3fdf08b
ex2
ITu-Dev May 6, 2020
ae93122
ex4
ITu-Dev May 6, 2020
6ce6ca3
_
ITu-Dev May 6, 2020
e44e2cd
Delete utils.o
ITu-Dev May 6, 2020
0a76f77
Delete parallel_sum
ITu-Dev May 6, 2020
f65c5c6
Update parallel_sum.c
ITu-Dev May 6, 2020
b0c36eb
Update utils.c
ITu-Dev May 6, 2020
8100b86
Update parallel_min_max.c
ITu-Dev May 6, 2020
7f7f9e1
ex2
ITu-Dev May 20, 2020
b263780
ex2.perfecto
ITu-Dev May 20, 2020
08feffa
ex3
ITu-Dev May 20, 2020
cb33306
Update deadblock.c
ITu-Dev May 20, 2020
097c3e0
Update deadblock.c
ITu-Dev May 20, 2020
d62ff4d
Update deadblock.c
ITu-Dev May 20, 2020
6fb25c7
client
ITu-Dev Jun 9, 2020
7fd3c31
server
ITu-Dev Jun 9, 2020
d16e0b2
serv&client
ITu-Dev Jun 9, 2020
0fbbf3e
full1
ITu-Dev Jun 9, 2020
a18f7b7
all done
ITu-Dev Jun 12, 2020
9c9d65d
tcpclient
ITu-Dev Jun 12, 2020
1d15830
tcpserver
ITu-Dev Jun 12, 2020
d6b1c12
udpclient
ITu-Dev Jun 12, 2020
c52dfd7
udpserver
ITu-Dev Jun 12, 2020
410c2f7
tcpserver
ITu-Dev Jun 12, 2020
9cf15af
tcpserver.c
ITu-Dev Jun 12, 2020
3b26f41
tcpclient
ITu-Dev Jun 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added lab0/hello/empty
Empty file.
6 changes: 6 additions & 0 deletions lab0/hello/newhello.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h>

int main()
{
printf("Hello World!\n");
}
6 changes: 6 additions & 0 deletions lab1/src/DateTime
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

dt=$(date '+%d/%m/%Y %H:%M:%S');
echo "$dt"

echo $PATH
15 changes: 15 additions & 0 deletions lab1/src/average.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
n=0
res=0
while read input
do
for m in $input
do

res=$(($res+$m))
n=$(($n+1))
done
done
res=$(($res/150))
echo "Кол-во чисел: $n\nСреднее арифметическое: $res"
exit 0
151 changes: 151 additions & 0 deletions lab1/src/num.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@

9981
27367
17460
3761
12827
29729
7398
3593
9680
17243
11085
10097
7011
20439
27060
32306
14902
25040
20595
664
32001
32719
5034
20138
22180
31178
24088
9068
14484
21211
21375
22452
8275
21985
18316
23063
22100
20784
29243
8469
9241
15166
13236
15632
10154
24387
19202
5957
24208
30901
28609
4957
23575
16823
30521
7254
31616
16900
17696
25770
8979
27792
7974
20215
2552
15621
20090
29962
16200
19181
19586
13996
9342
7842
19099
9608
9937
3991
20095
20145
974
4408
10549
12098
17198
13749
23168
12009
28530
29872
32750
7729
23645
14095
565
13447
22663
12744
26836
29233
18147
7685
31022
31701
5674
26612
29759
32652
3013
21876
3480
4855
20142
14936
7459
10277
17512
12110
20724
26197
9096
31686
16278
26678
209
14276
26407
20157
1737
6381
8034
476
19135
1209
26483
26180
17569
25580
26225
10119
20433
17737
24023
1166
10204
177
3433
15736
25217
24747
14 changes: 14 additions & 0 deletions lab1/src/rand
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

MAXCOUNT=150
count=1

echo

while [ "$count" -le $MAXCOUNT ]
do
number=$RANDOM
echo $number
let "count += 1"
done

15 changes: 14 additions & 1 deletion lab2/src/revert_string/revert_string.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
#include "revert_string.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


void RevertString(char *str)
{
// your code here
int len=strlen(str) - 1;
char *new_str=(char*)malloc(sizeof(char)*len);
int i;
for(i = 0; i <= len; i++){
new_str[i]=str[len-i];
//printf("\ntest: %c %c\n", str[len-i], new_str[i]);
}
strcpy(str, new_str);
//printf("\nnew: %s\n", str);
free(new_str);
}

4 changes: 3 additions & 1 deletion lab2/src/swap/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

void Swap(char *left, char *right)
{
// ваш код здесь
char temp=*left;
*left=*right;
*right=temp;
}
17 changes: 17 additions & 0 deletions lab3/src/ex5.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <unistd.h>
#include <stdio.h>

int main(int argc, char *argv[]) {
pid_t pid;

pid=fork();

if(pid==0){
printf("child process\n");
execv("sequential_min_max\n", argv);
}

printf("parent process is waiting");

return 0;
}
9 changes: 8 additions & 1 deletion lab3/src/find_min_max.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ struct MinMax GetMinMax(int *array, unsigned int begin, unsigned int end) {
struct MinMax min_max;
min_max.min = INT_MAX;
min_max.max = INT_MIN;
int i;

for(i=begin;i<end;i++){
if(array[i]>min_max.max)
min_max.max=array[i];
if(array[i]<min_max.min)
min_max.min=array[i];
}

// your code here
return min_max;
}
12 changes: 10 additions & 2 deletions lab3/src/makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
CC=gcc
CFLAGS=-I.
CFLAGS=-I. -Wall

all: parallel_min_max sequential_min_max ex5

sequential_min_max : utils.o find_min_max.o utils.h find_min_max.h
$(CC) -o sequential_min_max find_min_max.o utils.o sequential_min_max.c $(CFLAGS)

parallel_min_max : utils.o find_min_max.o utils.h find_min_max.h
$(CC) -o parallel_min_max utils.o find_min_max.o parallel_min_max.c $(CFLAGS)

ex5: ex5.o
$(CC) -o ex5 ex5.o $(CFLAGS)

utils.o : utils.h
$(CC) -o utils.o -c utils.c $(CFLAGS)

find_min_max.o : utils.h find_min_max.h
$(CC) -o find_min_max.o -c find_min_max.c $(CFLAGS)

ex5.o:
$(CC) -o ex5.o -c ex5.c $(CFLAGS)

clean :
rm utils.o find_min_max.o sequential_min_max parallel_min_max
rm utils.o find_min_max.o ex5.o sequential_min_max parallel_min_max ex5
Loading