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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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