ex.no2

Embed Size (px)

DESCRIPTION

ex

Citation preview

  • ex.no2b

    hduser@a2234-thinkcentre-m70e:~/jerish$ ./a.out

    parent process: process id is 3140 value of x is 6 process id of shell is 2370 child process: process id is 3141 value of x is 6 process id of parent is 3140

    ex no.2c

    hduser@a2234-thinkcentre-m70e:~/jerish$ ./a.out a.out area.sh~ farenheit.sh~ jericshel.c swap.sh area.sh farenheit.sh jeri.c jericshel.c~

    ex no.2d

    hduser@a2234-thinkcentre-m70e:~/jerish$ ./a.out child start odd nos: 1 3 5 7 9 child ends

    exno.2e

    hduser@a2234-thinkcentre-m70e:~/jerish$ cat > abc fdf df dgf gr g rgr g r dfd fd gr g dfg sr rgr g

  • sfghf h trh fgh rg rg rgdgd hduser@a2234-thinkcentre-m70e:~/jerish$ stat abc File: abc Size: 77 Blocks: 8 IO Block: 4096 regular file Device: 807h/2055d Inode: 2371125 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1003/ hduser) Gid: ( 1003/hadoopgroup) Access: 2016-02-03 15:29:52.809338455 +0530 Modify: 2016-02-03 15:29:49.797338348 +0530 Change: 2016-02-03 15:29:49.797338348 +0530 Birth: -

    hduser@a2234-thinkcentre-m70e:~/jerish$ ./a.out enter the file to be copied abc source file size=77 destination file size=77

    EX.NO;3

    hduser@a2234-thinkcentre-m70e:~/jerish$ cc fcfs.c hduser@a2234-thinkcentre-m70e:~/jerish$ ./a.out Enter the no.of process:3 Enter the no.of burst time for each process:4 8 2 4 Burst time Waiting time Turn-round time 4 0 4 8 4 12 2 12 14

    Average waiting time :5

    SJF:hduser@a2234-thinkcentre-m70e:~/jerish$ cc sjf.c hduser@a2234-thinkcentre-m70e:~/jerish$ ./a.out Enter the no.of process:3 Enter the no.of burst time for each process:5 7 4 Burst time Waiting time Turn-round time 5 0 5 7 5 12 4 12 16

  • Average waiting time :5