From f497652e47787d070940ae1c628171bfd84eab0d Mon Sep 17 00:00:00 2001 From: lecorre Date: Wed, 22 Sep 2021 15:12:02 +0200 Subject: [PATCH] ajout fichiers --- TD1/Ex1.c | 46 ++++++++++++++++++++++++++++++++++++++++ TD1/Ex1.o | Bin 0 -> 5728 bytes TD1/Ex1a.c | 40 ++++++++++++++++++++++++++++++++++ TD1/Ex1a.h | 10 +++++++++ TD1/Makefile | 21 ++++++++++++++++++ TP2/Exemples/Exemple1.c | 25 ++++++++++++++++++++++ TP2/Exemples/Exemple2.c | 20 +++++++++++++++++ TP2/Exemples/Exemple3.c | 26 +++++++++++++++++++++++ TP2/Exemples/a.out | Bin 0 -> 16240 bytes TP2/Exercices/Ex1.c | 43 +++++++++++++++++++++++++++++++++++++ TP2/Exercices/Ex2.c | 12 +++++++++++ TP2/Exercices/Ex4.c | 15 +++++++++++++ TP2/Exercices/a.out | Bin 0 -> 16336 bytes TP2/Exercices/test.txt | 18 ++++++++++++++++ TP2/Exercices/test2.txt | 18 ++++++++++++++++ 15 files changed, 294 insertions(+) create mode 100644 TD1/Ex1.c create mode 100644 TD1/Ex1.o create mode 100644 TD1/Ex1a.c create mode 100644 TD1/Ex1a.h create mode 100644 TD1/Makefile create mode 100644 TP2/Exemples/Exemple1.c create mode 100644 TP2/Exemples/Exemple2.c create mode 100644 TP2/Exemples/Exemple3.c create mode 100755 TP2/Exemples/a.out create mode 100644 TP2/Exercices/Ex1.c create mode 100644 TP2/Exercices/Ex2.c create mode 100644 TP2/Exercices/Ex4.c create mode 100755 TP2/Exercices/a.out create mode 100644 TP2/Exercices/test.txt create mode 100644 TP2/Exercices/test2.txt diff --git a/TD1/Ex1.c b/TD1/Ex1.c new file mode 100644 index 0000000..582dc5e --- /dev/null +++ b/TD1/Ex1.c @@ -0,0 +1,46 @@ +#include +#include +#include "Ex1a.h" + + + +int main(int argc, char const *argv[]) { + int size; + int choix; + int i; + int menu = 1; + printf("Rentrez la taille de la matrice : "); + scanf("%d", &size); + + int* mat = malloc((size*size)*sizeof(int)); + for(i = 0; i<(size*size); i++) { + scanf("%d", &mat[i]); + } + + Afficher(size, mat); + + while (menu) { + printf("\n\n1. Multiplication scalaire\n2. Addition\n3. Multiplication\n4. Quitter\n\nChoix : "); + scanf("%d", &choix); + if (choix == 4) { + menu = 0; + } else if (choix == 1) { + MultiplicationScalaire(size, mat); + Afficher(size, mat); + + } else if (choix == 2) { + Addition(size, mat); + Afficher(size, mat); + + } else if (choix == 3) { + Multiplication(size, mat); + Afficher(size, mat); + } + } + + + + free(mat); + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/TD1/Ex1.o b/TD1/Ex1.o new file mode 100644 index 0000000000000000000000000000000000000000..78f374ac079b50cba5a1324e89da3254d2ecaeec GIT binary patch literal 5728 zcmbuC2~d+s7J&Z%9z-qyfe{NMi;Ad`2&1B_L&RWI1eC+UD}<0hG$a}VB3^)a1O#10 zMHdfr4jpe93l(Pv@j@LBP;nfOL1hF*Sge^*U{tnW(yhNuQnj`Fs`7Wguitz9`uh9N z3QqV`C@=KzZ5KNrc1zg1XODCahFerJVTCx73sixeh+FVhs{gDcBq4;dA1#&Zb=tV7; zM22ePuv}3CYRz+AWr&q4Y7uj8nhCd3)WG==GCuYf6=NC{IQ>lpa zM0IAu=8Ec8wpyjwpfN%Y&$H0Oz&I&hojT|Q8lw%i7XOv4kHOY5#j{hGPGIG-myG=? zK}Sc27$yae&oJ$1$gT0>!On*D(RDFQvbPOjy0gAz5$Gzd!e+I3tZdRkFZ__5<0p+iwj+3Wn|wN{fi_vJ0oSAIRY#Ue8> z(3`i>d)pTqoLa3_+K7go%{zD8|L0(*fG2A!261NovG97)U3o^? z=joXtb;XX2&#p#==bw+P&b%njJvMoEWW-FLsvko~wjKS>|83zFf$x!GZbqxs4o>(# zuFchVED1ZWdoxV&_?7yFZ2N!<2`?TGJk{gd0l(W9WmG*BTD8QN9$AuFX52&A$8Z*GXzGP04Ki z`B8H7PrjK|%mt4LBcE_<2d0+J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4uiYnk2^q{XYvH@`pJj`-+4M#1-;T`DP=!4R;$|!u*oVO34rdGJlg0bkLiaxeH9^e()n9;o zAtv2jcMQ@{8(T>Jguy;Hj=?al-?H`GYkg{$&0pBW9}q zwb+mRKS5>&A^t>%^G&5_Xc~`SF22MNm$dDdh?~lP1HPDvKjaTvg7i=FUx=8g{L^s% zr%*dvh(BQ}R58_mIqts&8$$murNp1~zYH;#e(Luh)jP#>FnTNHg!IZxn zK2Qb35tpPJ;$KMoDZ7K%AHIp$Li|Wsj2cOuZTBPgXEUhNw(vfM?-qLhmt%jje&7p2 z@;7P>a~V}2ChgyX{YMc)T+;sM5jVAdN8zIt30WstKlsKY{)C(A8~nUsP)KU=fP103 lsr?6xes_RhcW6LD?m45@dH#B$22=i(IR9J35tsD*{|63L+^+xt literal 0 HcmV?d00001 diff --git a/TD1/Ex1a.c b/TD1/Ex1a.c new file mode 100644 index 0000000..adb3c7f --- /dev/null +++ b/TD1/Ex1a.c @@ -0,0 +1,40 @@ +#include +#include + +void Afficher(int size, int* mat) { + int i; + printf("\nVoici votre matrice :\n"); + for(i = 0; i +#include +#include + +pid_t pid; // pour récupérer le pid du nouveau processus + +int main() { + + switch(pid = fork()) { + case (pid_t) -1: // l’appel de fork a échoué + perror("Création de processus"); + exit(2); + case (pid_t)0: // ici, ça concerne le processus fils + printf("valeur de fork dans le fils = %d\n",pid); + printf("je suis le processus %d de père %d\n",getpid(), getppid()); + printf("fin du processus fils\n"); + exit(0); + default: // ici, c’est le processus père + printf("valeur de fork dans le père = %d\n",pid); + printf("je suis le processus %d de père %d\n",getpid(), getppid()); + printf("fin du processus père\n"); + } + return EXIT_SUCCESS; +} diff --git a/TP2/Exemples/Exemple2.c b/TP2/Exemples/Exemple2.c new file mode 100644 index 0000000..6b65148 --- /dev/null +++ b/TP2/Exemples/Exemple2.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +int main(void) { + + int n = 5; + pid_t fils_pid; + + for (int i=0; i < n; i++) { + fils_pid = fork(); + + if (fils_pid > 0) break; + + printf("Processus %d avec père %d n=%d\n", getpid(), getppid(),i); + + } + return EXIT_SUCCESS; +} diff --git a/TP2/Exemples/Exemple3.c b/TP2/Exemples/Exemple3.c new file mode 100644 index 0000000..0d41695 --- /dev/null +++ b/TP2/Exemples/Exemple3.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include + +int main(void) { + + int n = 5; + pid_t fils_pid; + + for (int i=0; i < n; i++) { + fils_pid = fork(); + + if (fils_pid > 0) break; + + printf("Processus %d avec père %d\n", getpid(), getppid()); + } + + for (int j = 0; j < 10000; j++) { + for (int k=0; k < 1000; k++) { + ; + } + } + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/TP2/Exemples/a.out b/TP2/Exemples/a.out new file mode 100755 index 0000000000000000000000000000000000000000..6d70eb39a6858e957e6cae68ecd296a3baab8b6b GIT binary patch literal 16240 zcmeHOYitzP6~4Q+!FhOX2&5Zm@PvY7XuO!0{ESb=(h+9-eNgt_{NR`_DsMIR?QHfSEas^6MDL^Fzi7Kqfs7s)UlS1n>f$2GS z&e@%vtfQ76ZGX(QX1{yB^SF1;+!^1|-1}5G(&_bh1eXf&h(Kwy&SHY3n16^W0720r zYT$Q`xL+&*xl(eLK4<}Gt#ZLziq*td0HU8CD`oJr7A+XLhluF6SeeESL17eh9_Uwv z3X+|uQ$HD5UuaK3XDEvNEnpB0pfK9~uq*jSsTTRxQtYGlh6vdYMf6)BzXkGRoTc^{ zIiHvlJX$E9P7Hz$OHlp_;q)6LKPPsOJtMY(W#45Zemm{;kl%xf3?rPl&7uV(xAztB zqf1K`pALMP_fmU{T?aqqpOMllHVr5Go40KmjyDb`lG(Awv6kk>=52vYDzHU1jQwhY z1IJX??)}0$A*PXIe~<8#$X=4cL>9DN0SBfX{hxoNa_di?f5sO(@lM0x&Nsfi-N*P1U@$xc!%_98g7vWRDD{wdqo^!eQ-vM568iS1Y z|JpJW`4Q(Wv zND7qk5;u#kNOxPiwk5D7uw7`~y}Puyp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430 --- /dev/null +++ b/TP2/Exercices/Ex1.c @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include +#include + +int main(int argc, char const *argv[]) { + int fluxe, fluxs, readchar; + char caractere; + fluxe = open("test.txt", O_RDONLY); + fluxs = open("test2.txt", O_WRONLY | O_CREAT, 0600); + pid_t pid; + for (int i = 0; i<10;i++) { + if (fluxe) { + readchar = read(fluxe, &caractere, sizeof(char)); + + } + + if (fluxs) { + write(fluxs, &caractere, sizeof(char)); + + } + } + + pid = fork(); + if (pid == 0) { + while(readchar != 0) { + if (fluxe) { + readchar = read(fluxe, &caractere, sizeof(char)); + + } + + if (fluxs && readchar != 0) { + write(fluxs, &caractere, sizeof(char)); + } + } + close(fluxe); + close(fluxs); + + } + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/TP2/Exercices/Ex2.c b/TP2/Exercices/Ex2.c new file mode 100644 index 0000000..04ce232 --- /dev/null +++ b/TP2/Exercices/Ex2.c @@ -0,0 +1,12 @@ +#include +#include +#include + +int main(int argc, char const *argv[]) { + write(1, "mammouth", 8); + pid_t psid = fork(); + if (psid == 0) { + write(1, "\nlapinou", 8); + } + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/TP2/Exercices/Ex4.c b/TP2/Exercices/Ex4.c new file mode 100644 index 0000000..5d7bbf9 --- /dev/null +++ b/TP2/Exercices/Ex4.c @@ -0,0 +1,15 @@ +#include +#include +#include + +int main(int argc, char const *argv[]) { + pid_t pid = fork(); + if (pid == 0) { + printf("Mon père est %d\n", getppid()); + sleep(0.2); + printf("Mon nouveau père est %d\n", getppid()); + } + sleep(0.1); + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/TP2/Exercices/a.out b/TP2/Exercices/a.out new file mode 100755 index 0000000000000000000000000000000000000000..ed70d852eea4105bafba6bcc14d018b67a62d4f2 GIT binary patch literal 16336 zcmeHOZ){sv6~A_pHD!&Hwn=f@bv31hv{l?BYeUKuYA12>g3>l?leL3&Z;tIGRvkOD zpSNU?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<&I%^ zLGDi^$c@~Lfm=3AHNjR34mR$=D7djAf0IX^1KcH&M+kRfY*_R618Q*{hd39G!rqP% z;g-X4Fq(9a#GyrTZOlORC&RF}C>$ip+uBu!1J{k}L;l2&a0kbtP=$_KTrYVv6i z(L6zgvUn)sM+3@@L^R=+p>b;=_`kjz2P~AuWm1;Lgj-9jI$x&`OKv41!m zfLdeV3r=oXf$j`KFWhj;48xs}e`kIm3FnpYNP^!AJvr%jpONR4R4jElkN9yojC(>2TUg)#ASm$@#;80~r9!suc}LbLr5;Qt15L+(G%ml?VL zJYP1q-w*aUS7v*jPcynOxR9`om}PsO*M@<^F0;M9X%YzfVdnWbFfx%l7R4iw!?`cp z^L&?)>*4mZ9^(^Wk8^33c|OfpPc@m_&kdM@491l0c|OlLLyBC#x&PlJ`&QE9_XEah zgFVc0Zj0Y{fy0=vfBcD-iICr$h?Q;SJmS-E80}qT$2ekChP=tW_`b=Wf7cnmmkW&U zi0#?!vnG3t`?09iR~HRgEFJN@Q`x7jtYqkY{zH^W1~IK za}~1ZcAD*TG8m&TZa>c(kCHvt!}?g4F;!6gq@F8cd-EKU?TwflyE$tiM#y0g4LE!b w<2xv~ho5Wse*$j1!CcJXM{Y>D{ocALV?|jBIIS*Z-~1_EYaKU~j7*~VH|uKpNdN!< literal 0 HcmV?d00001 diff --git a/TP2/Exercices/test.txt b/TP2/Exercices/test.txt new file mode 100644 index 0000000..a821b56 --- /dev/null +++ b/TP2/Exercices/test.txt @@ -0,0 +1,18 @@ +Maître Corbeau, sur un arbre perché, +Tenait en son bec un fromage. +Maître Renard, par l'odeur alléché, +Lui tint à peu près ce langage : +Et bonjour, Monsieur du Corbeau. +Que vous êtes joli ! que vous me semblez beau ! +Sans mentir, si votre ramage +Se rapporte à votre plumage, +Vous êtes le Phénix des hôtes de ces bois. +À ces mots, le Corbeau ne se sent pas de joie ; +Et pour montrer sa belle voix, +Il ouvre un large bec, laisse tomber sa proie. +Le Renard s'en saisit, et dit : Mon bon Monsieur, +Apprenez que tout flatteur +Vit aux dépens de celui qui l'écoute. +Cette leçon vaut bien un fromage, sans doute. +Le Corbeau honteux et confus +Jura, mais un peu tard, qu'on ne l'y prendrait plus. \ No newline at end of file diff --git a/TP2/Exercices/test2.txt b/TP2/Exercices/test2.txt new file mode 100644 index 0000000..a821b56 --- /dev/null +++ b/TP2/Exercices/test2.txt @@ -0,0 +1,18 @@ +Maître Corbeau, sur un arbre perché, +Tenait en son bec un fromage. +Maître Renard, par l'odeur alléché, +Lui tint à peu près ce langage : +Et bonjour, Monsieur du Corbeau. +Que vous êtes joli ! que vous me semblez beau ! +Sans mentir, si votre ramage +Se rapporte à votre plumage, +Vous êtes le Phénix des hôtes de ces bois. +À ces mots, le Corbeau ne se sent pas de joie ; +Et pour montrer sa belle voix, +Il ouvre un large bec, laisse tomber sa proie. +Le Renard s'en saisit, et dit : Mon bon Monsieur, +Apprenez que tout flatteur +Vit aux dépens de celui qui l'écoute. +Cette leçon vaut bien un fromage, sans doute. +Le Corbeau honteux et confus +Jura, mais un peu tard, qu'on ne l'y prendrait plus. \ No newline at end of file