Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question#1 -For this homework, you are to add a new commands to the Xinu shell. The steps to follow for addng a new Shell command.

Question#1-For this homework, you are to add a new commands to the Xinu shell. The steps to follow for addng a new Shell command. Add a new file called shell/xsh XXX.c, where XXX is the name of your shell command. This file should be structured as follows:

/* xsh_XXX.c - xshXXX*/

#include

/*------------------------------------------------------------

* xsh_XXX - shell command to do whatever you want it to

*------------------------------------------------------------

*/

shellcmd xsh_XXX(int nargs, char *args[])

{

// Your code here

}

Add an entry to cmdtab in shell/shell.c for your new command. Add a prototype for your new command function to include/shprototypes.h.

Question#2- You are required to create commands for the followng tasks:

1. Create a new process with a user specified priority that starts running in an empty infinite loop after announcing its PID.

2. Create a new process with a user specified priority that starts running in an empty infinite loop after announcing its PID and calling sleep or sleepms to sleep for 10 seconds.

3. List the content of the ready list.

4. Create a new process that starts waiting on a semaphore that you created with the initial count of zero after announcing its PID.

5. Signal the given semaphore id for a specified amount of time using signal n.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

What new skills will trainers need to be successful in the future?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago