Ask Question, Ask an Expert


Ask Operating System Expert

problem 1:

A) List one advantage and one disadvantage of using:

i) Sequential systems.
ii) Concurrent systems.

B) What is the difference between cooperative multitasking and preemptive multitasking?

C) Briefly describe the meaning of each of the following:

i) Condition synchronization.
ii) All-or-nothing atomicity of a transaction.
iii) Remote Method Invocation (RMI).

D) What is the difference between the following Enterprise Java Beans: entity beans, session beans, and message-driven beans.

E) describe how cookies can be used to maintain an HTTP session. Draw an illustration to support your answer.

problem 2:

Consider the processes in the table below. You are required to apply the following scheduling policies on these processes and find f, q, and n. Also, illustrate the time lines of the processes by adding them to the figure following the table (the blue arrows at the bottom of the figure represent the arrival time of the processes).

a)  First-In, First-Out (FIFO)
b)  Shortest Job First (SJF)

1657_normalized turnaround.jpg

problem 3:

A) Consider the class below which models a counter object that has two methods to increment or decrement its only instance variable, counter. 

a) You are required to apply the wait-notify mechanism in order to make the class thread-safe. Of course the methods need to be synchronized first. Assume that the value of the counter should be kept between 0 and 10.

b) Repeat (a) using a different technique which allows multiple condition variables for different locks, and uses the Java.util.concurrent.locks package. Assume that you have two conditions: notFull and notEmpty.

public class Counter {
    private int counter = 0;
    public void increment() {
        try {
        } catch(Exception e){ 
        } finally {          
    public void decrement() {
        try {
        } catch(Exception e){            
        } finally {

B) Consider the MyClient class below. When the main method is executed, the user is asked to enter his/her name and location. This data is sent to a server located at the “localhost” (i.e. on the same computer). Copy this code to a new project in NetBeans IDE and run it.

a) Does the code run properly? Justify your answer.

b) Develop a server class, Server_toScreen, to the following specifications:

•  The server should first display a message “Waiting for next client connection…”. (use System.out.println statement here).
•  The server should listen for incoming connections at port 5555.
•  The server should read data sent to it using an instance of BufferedReader class.
•  The server should display the data sent to it on the screen. Use JOptionPane class for this part.
•  The server should keep repeating (a) to (d) in order to receive data from other clients.

In your solution document, you will need to run the project and include screenshots of the results, before and after writing the server class. The screenshots should include evidences that the code was run on your own machine.

import javax.swing.JOptionPane;
public class MyClient {
    Socket socket;
    Printpreparer out;
    public void run() throws IOException{
        String s;
        socket = new Socket("localhost", 5555);
        out = new Printpreparer(socket.getOutputStream());
s = JOptionPane.showInputDialog("What is your name?");
        s = JOptionPane.showInputDialog("Where are you now?");
    public static void main(String[] args) throws IOException {
        new MyClient().run();

C) In this problem, you will re-prepare the server class in problem (B). However, in this time the server is required to save the received data in a database instead of displaying them on the screen. This database should be located at the same computer as the server (i.e. localhost). The name of the database is clientsData, and the data will be saved in a table named CLIENTS which has two text fields: name and location. Name your server class Server_toDB.

D) Assume we have an entity bean, ClientsEntity, which models a database table, clients, with two fields: name and location. This entity bean has getter methods for all its instance variables. In this problem, you need to do the following:

a) Develop a session bean that utilizes the above entity bean in order to retrieve the names of the clients stored in the database. The session bean is stateless, and it will be accessed remotely. In your solution document, you need to provide the following:

• The code for the remote interface implemented by the session bean. The interface should include one abstract method, void getNames().

• The code for the session bean which includes implementation of the getNames() method. This method should query the clients table for all its records. Then it should create one string by concatenating all names stored in the name field of the clients table. This string should finally be returned by the method.

problem 4:

Using the AOU’s eLibrary facility and the internet, locate the paper indicated below and answer the following in your own words:

a) According to the paper, what is the problem with the current deadlock detection approaches?

b) What is name of the approach presented in the paper? List its advantages.

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M9719

Have any Question? 

Related Questions in Operating System

1 from this book you have learned a little about the

1. From this book, you have learned a little about the different file systems inWindows and Linux. To get a better handle on the differences between them, write a short memo describing three properties of each of these f ...

As the system administrator you are always looking for ways

As the system administrator, you are always looking for ways to improve your network. Although there are many different types of operating systems, there are many versions of the operating systems, as well. After much re ...

Assignmentthe power supply provides the power for all of

Assignment The power supply provides the power for all of the components of a personal computer. When replacing a power supply, it is important to consider the power needs of the internal components of the system, as wel ...

Comparison of different operating systemswrite a paper to

Comparison of Different Operating Systems Write a paper to compare and contrast the functionality of Linux, Windows (7 or higher), and Android operating systems in the following categories(also discuss which one is frien ...

Operating system assignmentpart onetopic- operating system

Operating System Assignment Part One Topic- Operating system support for mobile computing Submission Rquirements Project Proposal 1 page 1- Pages - 8 to 10 2- Power point slides 3-The project description document which e ...

Please address the followingprovide one advantage or one

Please address the following: Provide ONE advantage or ONE disadvantage of a Microkernel OS Design or a Monolithic OS Design. Provide support (back up your claims) for your view. The following are examples with proper ju ...

Assignmentscholarly activitywindows vs mac osapples mac os

ASSIGNMENT Scholarly Activity Windows vs Mac OS Apple's Mac OS is a major competitor for Windows, and many people feel very strongly about choosing one over the other. For this assignment, locate articles online that dis ...

1 the city of boston needs to be about 2 acres of green

1. The City of Boston needs to be about 2 acres of green space per 1,000 persons. You have been hired as the GIS expert by an independent consulting company to determine where the City is meeting this rule of thumb and w ...

Discussionmultithreading please respond to the

DISCUSSION "Multithreading" Please respond to the following: • Describe at least one possible effect that multithreading could have on event-driven programming when you are either developing or using a computer program. ...

1 write a shell script lab2q1sh to do the followingacreate

1. Write a shell script ( to do the following: a. Create list1.txt (use echo command) as: Football Basketball Skates Soccer ball Golf ball Shoes b. Create list2.txt (use echo command) as: Football Basketball S ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen