From Twitter

MCA 4th Semester MCS-041 Question 2 The Sleeping-Barber Problem:

MCA 4th Semester MCS-041 Question 2 The Sleeping-Barber Problem:

QUESTION 1: A barbershop consists of a waiting room with n chairs, and the barber room containing the barber chair. If there are no customers to be served, the barber goes to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer leaves the shop. If the barber is busy, but chairs are available, then the customer sits in one of the free chairs. If the barber is asleep, the customer wakes up the barber.
Write an interactive program in C / C++ to synchronize/coordinate the barber and the customers.

Solution : 

MCA 4th semester Solved Assignment MCS-041 Operating Systems Question 1 Consider the following set of processes, with the length of the CPU-burst time given in milliseconds

QUESTION 1  : MCA 4th semester Solved Assignment  MCS-041 Operating Systems Question 1

Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:

ProcessBurst TimePriority
P1103
P231
P343
P454
P56
The processes are assumed to have arrived in the order P1, P2, P3, P4, and P5, all at the same time.
  • a. Draw Gantt charts illustrating the execution of these processes using FCFS, SJF, a non-preemptive priority (a smaller priority number implies a higher priority), and Round Robin(quantum = 1) scheduling.?
  • b. What is the turn around time of each process for each of the scheduling algorithms in part a?
  • c. What is the waiting time of each process for each of the scheduling algorithms in part a?
  • d. Explain the evaluation of each algorithm.?

SOLUTION: ....

OBJECTIVES

After going through this Unit, you should be able to:

SOME PRE-REQUISITES AND Asymptotic Bounds ASYMPTOTIC BOUNDS INTRODUCTION

We have already mentioned that there may be more than one algorithms, that solve a
given problem. In Section 3.3, we shall discuss eight algorithms to sort a given list of
numbers, each algorithm having its own merits and demerits. Analysis of algorithms,
the basics of which we study in Unit 3, is an essential tool for making well-informed
decision in order to choose the most suitable algorithm, out of the available ones if
any, for the problem or application under consideration.

ELEMEMTARY ALGORITHMICS SUMMARY

1. In this unit the following concepts have been formally or informally defined and discussed:

Problem, Solution of a Problem, Algorithm, Program, Process (all section 1.1) . Instance of a problem (Section 1.2)

OUTLINE OF ALGORITHMICS

We have already mentioned that not every problem has an algorithmic solution. The problem, which has at least one algorithmic solution, is called algorithmic or computable problem. Also, we should note that there is no systematic method (i.e., algorithm) for designing algorithms even for algorithmic problems.

BUILDING BLOCKS OF ALGORITHMS

Next, we enumerate the basic actions and corresponding instructions used in a
computer system based on a Von Neuman architecture. We may recall that an
instruction is a notation for an action and a sequence of instructions defines a
program whereas a sequence of actions constitutes a process. An instruction is also
called a statement.

Labels

(MCS-031 (6) 2011 (5) 4nf (1) 5nf (1) ACCESS CONTROL In Relational Database (1) ALGORITHMICS (5) assignment 2014 2015 (1) AVAILABLE TOOLS & ALGORITHMS (5) BCA (1) BINARY SEARCH (1) Block Nested Loop Join (1) Build and Fix Model (1) BUILDING BLOCKS OF ALGORITHMS (1) CHARACTERISTICS OF AN ALGORITHM (2) Core Java (1) Data Communication Network Security (1) DATABASE SECURITY (1) EER tool (1) ELEMEMTARY ALGORITHMICS (2) ENHANCED ER TOOLS (1) EVOLUTION (1) EXAMPLE OF AN ALGORITHM (2) Indexed Nested-Loop Join (1) install servelet engine (1) INTRODUCTION (1) Iterative Enhancement Model (1) Java Server Pages (1) JDBC (1) JSP (2) LEVELS OF DATABASE SECURITY (1) MCA (9) MCA 051 (1) MCA 3rd Semester (8) MCA 4th Semester (1) MCA 5 sem (1) MCS-031 (7) MCS-031 : DESIGN AND ANALYSIS OF ALGORITHM (14) MCS-032 (1) MCS-033 (1) MCS-034 (2) MCS-035 (1) mcs-041 (2) MCS-042 (1) mcs-043 (2) mcs-052 solved assignment (1) MCSL-036 (2) Nested loop join (1) OBJECTIVES (1) Operating System (2) OUTLINE OF ALGORITHMICS (1) Principles of Management and Information Systems (1) PROBLEMS (1) QUERY PROCESSING AND EVALUATION (1) Query processing Optimisation (1) Question Papers (8) Related Topic (9) relational Database (1) SELECT OPERATION Query Processing (1) Servlet (1) Servlet Programme (1) Servlet Programming (1) SOFTWARE DEVELOPMENT MODELS (4) SOFTWARE ENGINEERING (4) Solution (7) Solved Assignment 2013 2014 (6) SOME PRE-REQUISITES AND Asymptotic Bounds ASYMPTOTIC BOUNDS INTRODUCTION (1) STATISTICAL DATABASE SECURITY (1) structure (1) SUMMARY (1) Waterfall Model (1) Write a C program to print the following triangle (1)