Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Unix System Calls Discussion

Unix System Calls Discussion

Unix System Calls
Advanced Operating Systems (CS 5500)- Fall 2020

Assignment 1 (60 points)

Due by 14th September (Monday) 11:59pm

You are allowed to discuss the problem and solution design with others, but the code

you submit must be your own. Your solution must include the certification of authenticity

“I certify that the code in the method functions including method function main of this

project are entirely my own work.”

Unix System Calls

Write a C or C++ program to run on a Unix platform. This program will take three

arguments. The first argument will be the pathname of a directory on the system.

The second argument will be a character string. The third argument is the

maximum number of output lines, N. Your program should display at most N

entries in the directory tree in a text file.

You need to implement three system calls: Open, Read, and Stat

Details of the system calls are given below. You can also use man command

pages to learn more about these system calls.

1. Open system call: DIR *opendir (const char *dirname)

Opendir system call opens a directory and returns a pointer to a struct DIR.

DIR represents a directory stream, which is an ordered sequence of all

directory entries in a particular directory.

2. Read system call: struct dirent *readdir (DIR *dirp)

Once the directory has been opened, you can read the directory with readdir

system call. Each time you call readdir system call, it returns another entry

in the directory.

3. Stat system call: int stat (const char *path, struct stat *sb)

Once you have the name of an entry, you can use the stat system call to get

more information about it. stat function takes two arguments, the first is a

path name and second is a pointer to struct stat, which contains information

about the file.

Submission Guidelines and Requirements 1. You can use either C or C++ for this programming assignment.

2. Your program should run on a UNIX platform

3. Include your name and UCM ID in the code

4. Add the following statement in your solution “I certify that the code in the method functions including method function main of this project are entirely my own work.”

// Your Name // Your UCM ID //Certificate of Authenticity: “I certify that the code in the method functions including method function main of this project are entirely my own work.”

5. Add comments (about the function/variable/class) to your code as much as possible

6. Zip your project including source file(s) and input text data files (if any) 7. Upload the zipped project file onto Blackboard 8. Grading standards:

a. Compiles: 40% b. Prints the correct answer on the directory passed in as an

argument: 20% c. Prints the correct answer for all subdirectories as well: 20% d. Handles error conditions gracefully: 10% e. Is well commended and well designed: 10% f. There will be automatic 10 points penalty if your program is

missing certificate of authenticity

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Blackboard Experts 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 Blackboard Experts 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. Blackboard Experts is known for 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 Blackboard Experts, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.