Provide C programs that exercise and demonstrate new call

Assignment Help C/C++ Programming
Reference no: EM131436310

Project -

We may require you to demo by signup on Doodle poll (see Canvas).

Brief Description:

Implement a new system call in Minix 3.2.1, along with two library functions in the system library that allow it to be called from a C program.

We will provide C programs that exercise and demonstrate the new call. In addition, modify the access control checks within Minix to perform new checks when a process tries to open a file.

Be prepared to demonstrate the system call by building your modified Minix 3 with the new system call, compiling our demo program, then running the demo program on your modified Minix 3 for the TA during the slot that you reserved.

Be prepared to discuss what you did, what problems you faced, how you solved them, what files you modified, and what you learned.

Details of System Call:

You will first modify the file system's inode structure to include a new integer value, classification, initialized to the tag value of the process that created the file on creation.

The new system call will allow

(a) the value of classification to be read by any process

(b) the value of classification to be written by a process with root access

Library procedures:

You will also implement library procedures that can be referenced by a C program to demonstrate the call. These must be included in the system library so that compiling a C program that references them will work (i.e., the references to these calls will be resolved).

The library procedures will have prototypes

int set_class(FILE* fd, int newvalue);

int get_class(FILE* fd);

Both will return the value of classification, or an error (-1).

The argument fd is a file descriptor as returned by fopen() for the file whose classification is to be accessed, and newvalue will be the new value  of the non-negative classification.

A successful call to get_class(F) that immediately follows a successful call to set_class(F,v) shall return the value v (i.e., the set_class call shall change the value of class for file F to v, which shall be returned when get_class is called).

Both the get_class() and the set_class() call shall fail if the file descriptor is invalid.

The set_class() call shall fail if the calling process does not have root access (EUID = 0).  The set_class() call shall also fail if new value is negative.

Failure shall be indicated by a return value of -1.

Appropriate error codes should be added if need be to the error numbers in the system, and errno should be set accordingly on failure. You should also do this for the set_tag and get_tag calls from Project 1.

Access Control Checks

You must modify the File System to check the tag of any process P that attempts to open a file F. If the file open requests read access, then the tag of P must be greater than or equal to the classification of F. If the file open requests write or append access, then the tag of P must be less than or equal to the classification of F. If a file is created then the file classification must be set to the tag value of the process that created it. This partially implements the BLP access control model.

Test program:

We will supply one or more simple test programs, but you may want to implement your own program(s) for testing. Our test program must compile using the system library after you have modified your Minix VM.

Helpful resources:

The Minix3.org website has many helpful documents, and we will add documents to the class website of a more specific nature.

Attachment:- Assignment Files.rar

Reference no: EM131436310

Questions Cloud

How will each event affect the amount of cash : How will each of the following events ultimately affect the amount of cash? (a) An increase in the level of inventories. (b) A rights issue of ordinary shares. (c) A bonus issue of ordinary shares. (d) Writing off part of the value of some inventorie..
What is the velocity of the block : On passing through the origin, it experiences a constant force of 3N at an angle of 60 degrees relative to the x-axis for 1.5s. What is the velocity of the block at the end of this time?
Tensile strength necessary for the cord : A 3kg sign hangs in a hall in the Physics Department. What is the tensile strength necessary for the cord that is used to hang the sign?
Define nuclear fission : Define nuclear fission and explain it with the help of the Binding Energy per Nucleon. What is the difference between the nuclear fission from a nuclear reactor and an atomic bomb?
Provide C programs that exercise and demonstrate new call : We will provide C programs that exercise and demonstrate the new call. In addition, modify the access control checks within Minix to perform new checks when a process tries to open a file
Very common in american households : In 2014 computers are very common in American households. This is primarily due to all of the following EXCEPT:
Angular magnification be if the final image : A double-convex lens of 6.25 cm focal length is used as a simple microscope. If it is held close to the eye to form an image 25 cm from the eye, where should the object be located? What is the angular magnification? What would the angular magnific..
Preceding question for when the train is rounding a corner : If you toss a coin straight upward while riding in a train, where does the coin land when the motion of the train is uniform along a straight-line track? When the train slows while the coin is in the air? Discuss and answer the preceding question ..
What is cash generated for juno plc : The following information has been taken from the financial statements of Juno plc for last year and the year before last

Reviews

len1436310

3/22/2017 3:57:47 AM

You will provide the following two documents. man page - a manual page for your library procedures in man page format (you may copy and modify an existing man page for this purpose). You must place the new man page in the proper location so that entering the command man set_class or man get_class return the man page for these calls.

len1436310

3/22/2017 3:57:40 AM

This project requires that minix 3.2.1 is used and not the most recent version of minix. I just want to confirm that this version will be used. It can be downloaded from this link: http://wiki.minix3.org/doku.php?id=www:download:start. Attached is the demo program that must be used to test the Minix system call. All of the checks must be completed. You will submit patch file(s) including all the changes made from a fresh installation of Minix 3.2.1 to existing Minix files needed to support the new call (note that this includes any changes to makefiles also and the changes needed for Project 1, as ammended) all new source files you created, along with all test files makefile to move files to the correct location (including man pages), apply patches, remake the system, and make the test program(s) man page(s) report.

Write a Review

C/C++ Programming Questions & Answers

  Write a c++ statement that prints the value

How many parameters does the function test have? What is the type of the function test?

  Uses classes with linked list

Turning a work in C++ that uses classes with a linked list to a no classes project

  Variables(x,y) be represented by any linked list forms types

How can a polynomial in two variables(x,y) be represented by any linked list forms(types)? Each node should represent a term and should contain the powers of x, and y as well as the coefficient of that term, write C++ functions to do the following

  In competitive tournament

In competitive tournaments, it is common for all the players or teams to play in a series of matches in order to determine a single winner of the entire tournament. However, a number of different tournament formats exist. Here, we will concern our..

  Find the amount in the savings act each month

Suppose you start with $1000 and each month you contribute $100. suppose that the interest rate is 6%per year compounding monthy,which is equal to 0.5% each month.

  Write a cpp program that plays a commercial video

Suppose you are writing a C++ program that plays a commercial video continuously within a kiosk at your favorite shopping mall within your hometown.

  Describe the process replace a do...while loop with an equiv

Describe the process you would use to replace a do...while loop with an equivalent while loop. What problem occurs when you try to replace a while loop with an equivalent do...while loop? Suppose you have been told that you must remove a while loop a..

  Provider database

For a review of the complete rubric used in grading this exercise, click on the Assignments tab, then on the title Case Study Part 2 - Provider Database (Access)-click on Show Rubrics if the rubric is not already displayed.

  Write a program to output accumulated values

Write a program to output accumulated values for each month, given a set amount saved each month, until the accumulated amount reaches a set goal amount.

  Support and troubleshooting checklist

Develop a support and troubleshooting checklist based on the five operating systems issues. Include:

  Define a cpp function that has two integer inputs

Define a C++ function that has two 2 integer inputs (N) and returns a double output y, where y=∑sqrt(n+0.5)/(2n+1) n=1 the value of n s'd be positive.

  Create a c++ console application

Objective: Create a C++ console application that will model the characteristics of a resistor. Create a multifile project. Create and add to the project an h file containing the resistor-class definition. Create and add to the project a cpp file cont..

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