O Sys

Faculty of Computer Studies

Course Code: TM298

Don't use plagiarized sources. Get Your Custom Essay on
O Sys
Just from $13/Page
Order Essay

Course Title: Operating Systems

Tutor Marked Assignment: Spring 20

1

9/2020

Cut-Off Date: Total Marks:

This assignment should be submitted electronically. You should write your solutions to the questions in a single word document, which is named using your short ID (6 digits), your full name, the course code and the TMA, your file name should look as follows:

TM298-TMA-Fall-2018-YourBranchName-YourID-YourFullName

Submit your document to your tutor on or preferably before the cut-off date shown above.

This TMA assesses your work of the course covering the material from
chapter one to chapter Six of the TM298 book
. The total marks for each question are shown at the end of each question. You have to
answer ALL the questions
.

Plagiarism Warning:

As per AOU rules and regulations, all students are required to submit their own TMA work and avoid plagiarism. The AOU has implemented sophisticated techniques for plagiarism detection. You must provide all references in case you use and quote another person’s work in your TMA. You will be penalized for any act of plagiarism as per the AOU’s rules and regulations.

Declaration of No Plagiarism by Student (to be signed and submitted by student with TMA work):

I hereby declare that this submitted TMA work is a result of my own efforts and I have not plagiarized any other person’s work. I have provided all references of information that I have used and quoted in my TMA work.

Name of Student:

Signature:

Date:

Question I

This question carries 40% of the marks for this assignment.

You are asked to develop a bash shell script program that collects information about the computer that is executing it and further executes some tasks (it is up to you, what the tasks should perform). We are expecting that the shell script program makes use of the following bash command categories:

[ 6 marks each]

1. Read at least two arguments from the command line

2. Process management (examples: ps, jobs and top) { I would search for specific process and try to kill it}

3. System information (examples: date, time) { I would use the time to keep track of the execution time of each task}

4. Network (examples: ssh, sftp and scp) { I would here try to connect to remote services such as ssh, ftp and http}

5. Programming (examples: java, javac, python, perl,){ I would here write script command to compile and run a JAVA or python program}

6. File permissions (examples: chmod, chown) { I would try to change the file permission for specific files}

What I suggest is to create a folder a put there all necessary files (for instance a java source file, python and/or any other file} and execute my script within this folder.

You are also asked to relate the shell command you use to the Linux operating system call, you have also to specify whether the shell command is an exactable or an internal shell command. [ 4 marks]

Question II

This question carries 40% of the marks for this assignment.

Youi are going to use the semaphores for process synchronization. Therefore, you are asked to develop a consumer and producer multithreaded program.

Let’s assume, that we have a thread (producer, we will call it producer_thread) reading data (positive integer numbers) from the keyboard, entered by a user to be stored in an array (dynamic array). (Assume that the array can hold all numbers entered without overflow.) [15 marks]

Another thread (consumer, we will call it consumer_thread) should read data from the array and write them into a file. This thread should run concurrently with the producer (producer_thread). [15 marks]

Your program should make sure that the consumer_thread can read from the array only after the producer_thread has stored new data. Both threads will stop when the user enters a negative number.

Thereafter, another thread (testing_thread) should start reading the array data as well as the file data and display them on the screen in order to verify if the consumer and producer have worked in a correctly synchronized fashion. This thread should not be synchronized with other threads, it useful for testing that consumer thread is synchronized with produce thread. [10 marks]

You are kindly asked to provide your tutor with the source code as well as screen snapshots that show the work of the testing_thread.

You are free to choose the programming language.

Question III

This question carries 20% of the marks for this assignment.

1. Given the following mix of tasks, task lengths, and arrival times, compute the completion and response time for each task, along with the average response time for the FIFO, RR, and SJF algorithms. Assume a time slice of 10 milliseconds and that all times are in milliseconds.

1

TM298, TMA Spring 2020

void acquire (struct lock *) {
}

void release (struct lock *) {
}

9. Suppose you have an operating system that has only binary semaphores.
You wish to use counting semaphores. Show how you can implement
counting semaphores using binary semaphores.

Hints: You will need two binary semaphores to implement one
counting semaphore. There is no need to use a queue – the
queuing on the binary semaphores is all you’ll need. You should
not use busy waiting. The wait() operation for the counting
semaphore will first wait on one of the two binary semaphores,
and then on the other. The wait on the first semaphore imple-
ments the queueing on the counting semaphore and the wait on
the second semaphore is for mutual exclusion.

10. [Anderson] Given the following mix of tasks, task lengths, and arrival times,
compute the completion and response time for each task, along with the
average response time for the FIFO, RR, and SJF algorithms. Assume a
time slice of 10 milliseconds and that all times are in milliseconds.

Task Length Arrival Time Completion Time Response Time

0 85 0
1 30 10
2 35 15
3 20 80
4 50 85

Average:

11. [Anderson] Are there non-trivial workloads for which Multi-level Feedback
Queue is an optimal policy? Why or why not? (A trivial workload is one
with only one or a few tasks or tasks that last a single instruction.)

3

What Will You Get?

We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.

Premium Quality

Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.

Experienced Writers

Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.

On-Time Delivery

Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.

24/7 Customer Support

Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.

Complete Confidentiality

Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.

Authentic Sources

We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.

Moneyback Guarantee

Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.

Order Tracking

You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.

image

Areas of Expertise

Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.

Areas of Expertise

Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.

image

Trusted Partner of 9650+ Students for Writing

From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.

Preferred Writer

Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.

Grammar Check Report

Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.

One Page Summary

You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.

Plagiarism Report

You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.

Free Features $66FREE

  • Most Qualified Writer $10FREE
  • Plagiarism Scan Report $10FREE
  • Unlimited Revisions $08FREE
  • Paper Formatting $05FREE
  • Cover Page $05FREE
  • Referencing & Bibliography $10FREE
  • Dedicated User Area $08FREE
  • 24/7 Order Tracking $05FREE
  • Periodic Email Alerts $05FREE
image

Our Services

Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.

  • On-time Delivery
  • 24/7 Order Tracking
  • Access to Authentic Sources
Academic Writing

We create perfect papers according to the guidelines.

Professional Editing

We seamlessly edit out errors from your papers.

Thorough Proofreading

We thoroughly read your final draft to identify errors.

image

Delegate Your Challenging Writing Tasks to Experienced Professionals

Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!

Check Out Our Sample Work

Dedication. Quality. Commitment. Punctuality

Categories
All samples
Essay (any type)
Essay (any type)
The Value of a Nursing Degree
Undergrad. (yrs 3-4)
Nursing
2
View this sample

It May Not Be Much, but It’s Honest Work!

Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.

0+

Happy Clients

0+

Words Written This Week

0+

Ongoing Orders

0%

Customer Satisfaction Rate
image

Process as Fine as Brewed Coffee

We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.

See How We Helped 9000+ Students Achieve Success

image

We Analyze Your Problem and Offer Customized Writing

We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.

  • Clear elicitation of your requirements.
  • Customized writing as per your needs.

We Mirror Your Guidelines to Deliver Quality Services

We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.

  • Proactive analysis of your writing.
  • Active communication to understand requirements.
image
image

We Handle Your Writing Tasks to Ensure Excellent Grades

We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.

  • Thorough research and analysis for every order.
  • Deliverance of reliable writing service to improve your grades.
Place an Order Start Chat Now
image

Order your essay today and save 30% with the discount code Happy