Write a shell script program with a menu in linux

Assignment Help Programming Languages
Reference no: EM131834398

Task 1 -

a) Compare multiprogramming and multitasking. You should define what these multiprocessing approaches are, and identify their similarities and differences. You might consider including diagrams to support your findings. Write no more than 500 words.

b) Discuss about microkernels and how it compares with monolithic kernels. Use suitable diagrams to illustrate the differences between them.

Task 2 -

a) Write a shell script program with a menu in Linux that does the following:

1. List the current directory

2. Call a function and fork a child to greet "Greetings". Display both parent ID and child ID

3. Generate a child process (with PID displayed) that calls a sleep function to print Hello to the screen every 5 seconds

4. Terminate/Kill the process in part 3)

5. Quit

Example:  The program will display the contents of the current directory when the user keys in 1.  The program must allow the user to quit when he keys in 5.

Task 3 -

a) Implement in code to calculate the average wait time and the average turnaround time for a Shortest Job First algorithm for 3 to 6 processes. Assume all processes arrive at T=0.

b) Each of you will be given a different scenario to do this part. Draw the Gantt chart of the processes using the Round Robin Algorithm (RR)

Calculate the average wait time and average turnaround time with RR with quantum of 3.

Task 4 -

a) Modify the given TCP server (in C code) to be a "Fun Bulletin Board Server (FBBS)". The FBBS will connect only on a fixed port. The fixed port will be based on the last 5 digits of your student number. FBBS will be able to reply based on the option entered. You will work on the code provided (C programming language)

a. Upon successful connection to FBBS, the client will be greeted with the menu as shown "This is the Fun Bulletin Board Server."

"1. Quote of the Day"

"2. News

"Enter a number:

b. The following table shows the corresponding for a  Type.

Option entered

 

One of the random responses to be displayed.

1

Part of the secret of success in life is to eat what you like and let the food fight it out inside.

- Mark Twain

 

In the right light, at the right time, everything is extraordinary.

- Aaron Rose

 

I generally avoid temptation unless I can't resist it.

- Mae West

2

World's fastest finger-snapping guy plays along amazingly to song beats

 

Next Prime Minister will not cause 'huge discontinuity': Chan Chun Sing

 

Man who stole $27,800 from father and employer jailed

 

Example 1: When user keys in "1" into the client terminal (Connected to the server), the server may reply with: "In the right light, at the right time, everything is extraordinary. - Aaron Rose" or any of the other 2 responses provided above.

Example 2: When user keys in "2", the reply may be "Next Prime Minister will not cause 'huge discontinuity': Chan Chun Sing" or any of the other 2 responses.

Any invalid type keyed in would result in a reply: "Please choose a valid option."

This part will constitute a total of 4 marks for the Task part 4.

Task 5 -

a) Activity 2 of Lab20:

1) The code below (a2q5.cc) shows a score tracking system. After entering the students' scores, the system will display the total score and the average score. However if the user does not enter any scores, there will be a runtime error in the program.

Modify the code to add (attached file) exception handling. The exception handling should take care of the data types as well as the number of students.

2) You can rewrite the whole code in python or java and apply the necessary exception(s) required to complete the answer.

Attachment:- Assignment File.rar

Reference no: EM131834398

Questions Cloud

Random variable obeying a normal probability : Suppose that the load on an airplane wing is a random variable X obeying a normal probability law with mean 1000 and variance 14,400, whereas
Identify the major business problems the project team find : Speculate on the prominent reasons General Dynamics selected the agile framework they did to use in this project.
Evaluate views of john searle and rene descartes on dualism : Compare, contrast, and evaluate the views of John Searle and René Descartes on dualism. Evaluate the views of George Berkeley and Thomas Hobbes on the mind.
Find and sketch the probability density function : In exercises let X1 and X2 be independently and uniformly distributed over the intervals 0 to 1.
Write a shell script program with a menu in linux : Write a shell script program with a menu in Linux that does the following: List the current directory. Discuss about microkernels
Uniformly distributed over the intervals : In exercises let X1 and X2 be independently and uniformly distributed over the intervals 0 to 1.
Uniformly distributed over the intervals : In exercises let X1 and X2 be independently and uniformly distributed over the intervals 0 to 1.
Determine your native conflict response behavior : Provide one (1) example that supports your conclusion. Note: This is a safe environment for everyone to share his / her personal experience.
Independent random variables : Let X1, X2, and X3 be independent random variables, each exponentially distributed with parameter A = ½.

Reviews

len1834398

1/27/2018 5:46:43 AM

Formatting & Referencing: Harvard. Here is the question. This assignment is having multiple question and programming language for them each question python, c ++ and linux bin bash shell script. if you have any doubt please let me know. Dear, For task 3, B. teacher has given a scenario as below. You can rewrite the whole code in python or java and apply the necessary exception(s) required to complete the answer.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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