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

Your objective is to create a program that simulates round

Your objective is to create a program that simulates Round Robin CPU scheduling. You may write your program in C, C++, Java, or Python. If you choose C, C++, or Java you must include a Makefile. Your program will be test ...

Discuss an advantage or a disadvantage of open-source

Discuss an advantage or a disadvantage of open-source operating system. 10 lines are enough.

Programming assignment lab schedulerdispatcheryou are to

Programming Assignment Lab: Scheduler/Dispatcher You are to implement a Scheduler in C, C++ and submit the source code, which we will compile and run. Both are to be delivered to the TA as source code through NYU Classes ...

Questionpick an aspect of an historical operating system ie

Question: Pick an aspect of an historical operating system (IE. Multics) and detail how a modern system supports that function. 10 to 20 lines are enough and please provide citations or references.

Lab 1 develop system administration procedures for windows

Lab #1: Develop System Administration Procedures for Windows 8.1 Security Configuration Purpose: Develop systems administration procedures to implement systems security configuration guidance and best practices. Objectiv ...

Operating systemsprogramming assignment- virtual memory

Operating Systems Programming Assignment- Virtual Memory Manager with Paged Segments In this assignment, you will design a virtual memory manager with paged segments, and then simulate its operation for five different pa ...

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 ...

Questionin the context of the os design discussions there

Question: In the context of the OS design discussions there is a dependence on the goal of the system and the environment. This is a very important aspect of any systems design. One can argue for or against a function, b ...

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 ...

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. ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

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