Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

C Programming Question

Description

Assignment #5 Instructions: Limited Shell

Through this programming assignment, the students will learn to do the following:

Work with processes using fork, pipe, wait, dup2, and the exec system calls.

Additional practice with a Makefile with an all target

  1. Work with the different address spaces
  2. The main idea of this assignment is to write a limited function shell that only runs a few programs from a menu.
  3. Write 4 small programs to start with followed by the menu program called newshell.

1. LETTERS

One program will output the letters in the alphabet to the screen. Make sure they are printed one at a time. They can be printed all on one line. If you already got it working one per line there will not be a deduction.

Usage would be: letters

Output would be:

ABC…

2. numbers

Program 2 would print the numerals 0-9 to the screen. Make sure they are printed one at a time, one per line.

Usage would be: numbers

0
1
2
Etc.

3. FIRSTNAME

Program 3 would print out your first name which is passed in as an argument on the command line in mixed case. This would go to the screen.

Usage would be: firstname yourfirstname

4. USERINPUT

Program 4 will accept alphabetic input from the user via stdin change it to all capital letters and print it to the screen. Do not ask the user to enter the input. Assume the user will know to input alphabetic input.

Usage would be: userinput

5. NEWSHELL

Write a parent program similar to myshell.c but called newshell which will allow the user to choose from a menu of options.

Usage would be: newshell

1 letters
2 numbers
3 firstname
4 userinput
5 letters > filename   (letters redirected to a file)
6 letters | userinput   (letters piped to userinput)
7 firstname| userinput   (names piped to userinput)
8 exit  (your program should end by leaving the infinite loop.)

These programs should be completed with the process commands fork, pipe, wait, dup2, and the 6 exec programs. The newshell program should not run any of the other programs, it should fork off children to run the programs.

Do not use any system calls. Make sure you close all file descriptors before the program ends.

Your program will earn points based upon the number of menu items that run properly.

You will need a Makefile with an all target to compile all the programs.

Unformatted Attachment Preview

Programming with
MPI
Message Passing Model
2
Processes
?Number is specified at start-up time.
?Typically, fixed throughout the execution.
?All execute same program (SPMD).
?Each distinguished by a unique ID number.
?Processes explicitly pass messages to communicate and to synchronize
with each other.
3
Advantages of Message-passing Model
?Gives programmer ability to manage the memory
hierarchy.
?Whatàlocal, whatànot?
?Portability to many architectures: can run both on
shared-memory and distributed-memory
platforms.
?Easier (though not definitely) to create a
deterministic program.
?Non-deterministic programs are very difficult to debug.
4
Circuit Satisfiability
5
check_circuit Code
/* Return 1 if ‘i’th bit of ‘n’ is 1; 0 otherwise */
#define EXTRACT_BIT(n,i) ((n&(1
Purchase answer to see full
attachment
Explanation & Answer:

1 Script

User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20