Jump to content

Help,,, Help,,, In C Programming


Recommended Posts

Posted

Ma avida ballo c meeda program cheyya mannadu


enty ante... master and child seperate process lo pipe use chesi communicate cheyyamannadu.

na wife ji c lo pipe ela use cheyyalo cheppara pls...
sample program emi anna unna leka pothe websites emi anna unte cheppara

here is the question
[size=1]
You will write a program that uses multiple processes to compute the sum of a set of (small) positive integers.[/size][size=1]
There are two types of processes for this homework:[/size][size=1]
I). A set of "[i]slaves[/i]" processes: Each slave process gets two small integers from its [i]argv[/i], computes its sum and returns the result using the exit system call. So, a slave process is created for every sum.[/size][size=1]
II) A "[i]master"[/i] process: This process is responsible for creating the slave processes, and coordinating the computation. Note that all the computation is done by the "[i]slave[/i]" processes. All the numbers are provided in the command line [i]argv. [/i]The [i]master [/i]process also set a timer at the start of computation to 3 seconds. If the computation has not been finished by this time, the [i]master process [/i]kills all the slaves and then exits. You should print an appropriate message(s) in this case. Note that the [i]master[/i] process may have to create multiple sets of [i]slave[/i] processes. For example, if there are 8 numbers to be added, then the [i]master[/i] process will first create 4 [i]slaves [/i]and get the result from them. At this point there are 4 numbers, and it creates 2.[/size][size=1]
[i]slaves[/i]. Finally one slave is created to compute the overall sum. To make it simpler, if the number of integers to add is odd, the [i]master[/i] adds a 0 to the list of numbers. This may happen at any step during the computation. The code for [i]master [/i]process should be compiled separately and its executable code should be called[i] master.[/i] The executable code for the [i]slave[/i] process should be called[i]slave[/i]. So, to compute the sum of the numbers 1 through 7, the command line will look like[/size][size=1]
[b]master 1 2 3 4 5 6 7[/b][/size][size=1]
Since the results are passed around by [i]exit [/i]system call, keep the numbers small (single digit). Each [i]slave[/i] process prints its process id, its operands, and their sum. Each time the [i]master [/i]gets a result from a slave, it prints the pid of the slave and the partial sum.[/size]

Posted

[quote name='lechi_podama' timestamp='1381189760' post='1304368171']
Ma avida ballo c meeda program cheyya mannadu


enty ante... master and child seperate process lo pipe use chesi communicate cheyyamannadu.

na wife ji c lo pipe ela use cheyyalo cheppara pls...
sample program emi anna unna leka pothe websites emi anna unte cheppara

here is the question

[b][size=4]You will write a program that uses multiple processes to compute the sum of a set of (small) positive integers.
There are two types of processes for this homework:
I). A set of "[i]slaves[/i]" processes: Each slave process gets two small integers from its [i]argv[/i], computes its sum and returns the result using the exit system call. So, a slave process is created for every sum.
II) A "[i]master"[/i] process: This process is responsible for creating the slave processes, and coordinating the computation. Note that all the computation is done by the "[i]slave[/i]" processes. All the numbers are provided in the command line [i]argv. [/i]The [i]master [/i]process also set a timer at the start of computation to 3 seconds. If the computation has not been finished by this time, the [i]master process [/i]kills all the slaves and then exits. You should print an appropriate message(s) in this case. Note that the [i]master[/i] process may have to create multiple sets of [i]slave[/i] processes. For example, if there are 8 numbers to be added, then the [i]master[/i] process will first create 4 [i]slaves [/i]and get the result from them. At this point there are 4 numbers, and it creates 2.
[i]slaves[/i]. Finally one slave is created to compute the overall sum. To make it simpler, if the number of integers to add is odd, the [i]master[/i] adds a 0 to the list of numbers. This may happen at any step during the computation. The code for [i]master [/i]process should be compiled separately and its executable code should be called[i] master.[/i] The executable code for the [i]slave[/i] process should be called[i]slave[/i]. So, to compute the sum of the numbers 1 through 7, the command line will look like
master 1 2 3 4 5 6 7
Since the results are passed around by [i]exit [/i]system call, keep the numbers small (single digit). Each [i]slave[/i] process prints its process id, its operands, and their sum. Each time the [i]master [/i]gets a result from a slave, it prints the pid of the slave and the partial sum.[/size][/b]
[/quote]
LTT

Posted

https://www.coursera.org/course/cplusplus4c

Posted

https://www.coursera.org/course/programming1

Posted

[quote name='ChittiNaidu' timestamp='1381191491' post='1304368324']
[url="https://www.coursera.org/course/cplusplus4c"]https://www.coursera...rse/cplusplus4c[/url]
[/quote]coursera lo python course started.,,,,,,interested ?

Posted

[quote name='Scrooge' timestamp='1381191543' post='1304368330']
coursera lo python course started.,,,,,,interested ?
[/quote]


two assignments completed apicer... old class lo...

Posted

[quote name='ChittiNaidu' timestamp='1381191681' post='1304368343']
two assignments completed apicer... old class lo...
[/quote] :3D_Smiles:
HW pm pls... copy kodatha

Posted

[quote name='Scrooge' timestamp='1381191817' post='1304368353']
:3D_Smiles:
HW pm pls... copy kodatha
[/quote]


easy undi vay..go through the course..just commands entering undi antey.. similar to the quiz..

Posted

[quote name='ChittiNaidu' timestamp='1381191883' post='1304368364']


easy undi vay..go through the course..just commands entering undi antey.. similar to the quiz..
[/quote]antha opika ledu man..... asaley costly brain

Posted

[quote name='ChittiNaidu' timestamp='1381191681' post='1304368343']
two assignments completed apicer... old class lo...
[/quote]

coursera lo free training istunnada mama python meeda.... [img]http://2.bp.blogspot.com/-pi6BtbyZhWo/UaYmtdsh89I/AAAAAAAAGdM/OGJRqnkYfTE/s1600/brahmismoking.gif[/img]

Posted

endi ra ayya.....number ni add cheyyalante intha pedda question ichhadu.....any way Nenu try chestha linux platform lo okasari aapice ki poyinaka

×
×
  • Create New...