Program to send signal from child process to parent process

Assignment Help Programming Languages
Reference no: EM131086845

System Programming and Computer Control Systems

Task 1:

Control structures, Functions, Arrays and Bitwise Operations

a) Write a C program to find prime numbers up to n. The value of n should be between 6 and 30. If the value of n is less than 6 or greater than 30 it should display a relevant message

b) Write a C program to find out the sum of digits of any given number using recursion. The number should have a minimum of 4 digits and it should be your student ID. For example, if the input is 1234 then the output should be 1+2+3+4=10.

c) Write a C program for the swapping of two arrays. The output should display the two arrays before swapping and after swapping.

d) Write a C program to accept a decimal number as input and to find its binary representation and also to check if all the bits of generated binary number are bit 1 or not. If all bits are not 1 then it should display how many 1 and 0 are in the binary. For example if the input is 7 then it should display the same number 7. Its binary 111 and also a message mentioning all bits in binary 111 are bit 1 or not. The input should be between 10 and 200.

Task 2:

Virtual Instrument- LabVIEW

a) Using a graphical development environment (LabVIEW) make a Virtual Instrument (VI) for the following expressions/statements. All components of each block diagrams should be clearly explained. Also for each output a step-by-step explanation should be written at the end of the diagrams.

(i) z = (3 >> x) + (5 << y)

(ii) z = (x2^ 2)|(y & 1)

(iii) if ((a + b) >= 4)

c = (a - 2) + (b * 3)

else

c = (a + 5) * (b - 2)

Task 3:

Inter Process Communication and Files

a) Write a C program to pass integer values between parent and child processes using pipe() system call and fork() function.

b) Write a C program to send signal from child process to parent process

c) Write a C program to copy a file to another and to display a message when the file is copied. It should accept source and destination file names from command line. If source and destination files are not typed on command line, an error message should be displayed.

Task 4:

Dynamic Memory Allocation and Data Structures

a) Write a C program to implement a queue of integer data using a linked list. Create a suitable menu system that will allow the user to perform the following operations:

1. Enqueue

2. Dequeue

3. Display queue elements

4. Display queue size

5. Return front element of queue

6. Check if queue is empty

7. Quit from the application

Reference no: EM131086845

Questions Cloud

Draw a plc ladder diagram for this system : Draw a PLC ladder diagram for this system.
Difference between c language : What's the difference between C language and C ++?
Discuss why understanding research methods is necessary : Part B will discuss why understanding research methods is necessary in order to implement EBP. You may use your textbook and/or articles from peer-reviewed journals as additional references but please remember to cite in the text and include in t..
When the start button is pushed, the inlet valve opens : Draw a PLC ladder logic diagram to do the following
Program to send signal from child process to parent process : Write a C program to send signal from child process to parent process - Create a suitable menu system that will allow the user to perform.
One-time-step ohmc problem : Perform a one-time-step MC simulation of 1,000,000 paths (use Brownian motion or GARCH (1,1) or any model of your choice). Consider either a call or put payoff at this time. Use (5.67) and (5.68) to solve for the average cost of hedging and the o..
Efficiency of an algorithm in a system : Why may the efficiency of an algorithm in a system implementation have more importance than in an application's implementation?
Hermite cubic basis function expansion : Use the Hermite cubic basis functions (5.51) and (5.52) to approximate the function s2 exp[s-2 ] in the domain [-3, 3]. Begin with nodes at (-3,-2,-1,0, 1,2,3). Discretize the s -space with intervals of length 0.1, i.e. (-3.0,-2.9,-2.8,...), and a..
Describe the risks associated : Describe the risks associated with such a project. Describe an approach you would take to prepare a fixed-price and schedule estimate, and describe how your approach mitigates the risks you identified in question 1.

Reviews

Write a Review

Programming Languages Questions & Answers

  Program that creates a series of random 2d objects

Create a program (OpenGL, or DirectX) that creates a series of random 2D objects, (or 3D objects that only move in 2D), about 25 is probably good but you may need more or less and has them move around on the screen, they should wrap around the edg..

  Developing an adt with overloaded operators

The purpose of this assignment is to practice developing an ADT with overloaded operators and separate compilation. For this project we will be developing an ADT for integers.

  Implement a query functionality to the catalogue

Implement a query functionality to the Catalogue. This will return a list of Albums that match a given criteria. We specify the criteria as a search rule (based on a very simple query language) that is executed against all the Genres and albums in..

  Write program to enter numeric values-arithmetic operator

Write a program that lets the user enter 2 numeric values, and an arithmetic operator: +, -, * and /. Write a switch statement that displays the result.

  Write program to store people-s name-phone numbers in array

Write down the program which has the array of at least ten string objects which hold people's name and phone numbers.

  Write a program to enter the number of apartment units

Write a program that prompts the user to enter the number of apartment units, the rent to occupy all the units, the increase in rent that result in a vacant unit.

  Program to swap values from variables

Given two int variables, firstPlaceWinner and secondPlaceWinner , write some code that swaps their values. Declare any additional variables as necessary.

  Program to write variable declarations and function calls

Write a program whose main function is merely a collection of variable declarations and function calls. This program reads a text and outputs the letters, together with their counts.

  Prepare an application by using the user interface and

develop an application using the user interface and itemprice below to calculate the price of a pizza based on its size

  Advantages of contemporary languages allow kinds of comments

Many contemporary languages allow two kinds of comments, one in which delimiters are used on both ends (for multiple line comments), and one in which a delimiter marks only the beginning of the comment.

  Creating class savingsaccount using static variable

Create class SavingsAccount. Use static variable annualInterestRate to store annual interest rate for all account holders.

  Does the kind of values assigned to a a variable

Does the kind of values assigned to a a variable (numeric or character) influence the way SAS reads data?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd