Question

In: Computer Science

note (Please solve the questions in the language of operating systems) [1] Briefly, what is the...

note (Please solve the questions in the language of operating systems)

[1] Briefly, what is the difference between:

1- Buffering & Spooling.

2- Synchronous & Asynchronous I/O.

3- CPU-bound & I/O-bound jobs.

4- Multiprogramming & Timesharing.

5- Logical & Physical addresses.

6- User & Monitor modes in Operating System.

[2] (i) Define Timesharing.

    (ii) In a one processor system, there is an interrupt clock which is set to a “time slice Q”, that is, every Q an interrupt occurs to stop the process. There is only one I/O device in the system    which is interrupted when the process needs an I/O. There are 3 processes A, B, C.

    

     Process A executes an I/O interrupt every T units of time.

     Process B executes an I/O interrupt every 2T units of time.

     Process C executes an I/O interrupt every 3T units of time.

(a) Which of the above processes will benefit the most and which is not when Q = T.

      Explain your answer

(b) Which of the above processes will benefit the most and which is not when Q = 2T.

      Explain your answer

(a) Which of the above processes will benefit the most and which is not when Q = 3T.

      Explain your answer

What is the best value should Q takes for good performance ? explain your answer in full.

[3] (a) Define DMA (Direct Memory Access).

      (b) An input device can transmit 100 characters every 4 mils 10 , if the CPU needs 2 mics to service the

            Interrupt. How much time is left for asynchronous I/O. What if it can transmit 1000 characters

            every 4 mils and the CPU also needs 2 mics for the service routine.

            What do you think? Explain your answer in details.

[4] (a) What is the interrupt types? Give examples.

      

       (b) What type of interrupt the following pieces of code in C might generate. Explain your answer.

(i)

int n = 0;

while (n = 0)

  printf(“Hello”);

            (ii)

           

            int n = 1 , m = 0, x = 10;

            while (n/!x<0.001)

                 { m +=x;

                   n++;

                 }

           

           

       [5] Draw clearly explaining briefly what is happening the following:

           

  1. Interrupt Vector
  2. Instruction Cycle with instruction cash register.
  3. System Queues and Scheduling.

Solutions

Expert Solution

Ans: -

1)

Spooling

Buffering

1. The process of holding the jobs for the operating system until unless the operating system is ready to accept and process those jobs.

Buffering is also similar to the spooling as it holds and store the data temporarily

2. Spooling can easily handle and overlap the multiple input output of the jobs simultaneously

It can overlap only one input output of the jobs at a time.

3. Spooling has large size as it uses the disk space.

It has small size area in the main memory of the system

4. Remote processing is supported by spooling.

It does not provide the remote processing.

5. It is more efficient.

It is less efficient

2)

Synchronous I/O

Asynchronous I/O

In this I/O operation the thread enters to the wait state and wait until the I/O operation is completed.

It asks kernel for the I/O request and kernel gives permission if the I/O operation gets completed.

Thread waits while I/O operation is being performed.

Thread does not wait while I/O operation is being performed.

3)

CPU Bound Jobs

I/O Bound Jobs

In this the rate execution of the jobs is restricted by the CPU speed of the system

In this the rate execution of the jobs is restricted by the I/O speed of the system

The time for the completion of any job or task is defined by the speed of the CPU

The time for the completion of any job or task is defined by the speed of the I/O of system

The interrupts occur in the system may be processed at slower speed.

When data is being consumed at higher rate than the data request rate

4)

Multiprogramming

Timesharing

When there are multiple programs exists in the memory of the system and then sharing of CPU is known as multiprogramming.

In Timesharing multiple users can access the system remotely at the same time.

Multiprogramming provides the uses of CPU for different programs and utilize the CPU time.

Timesharing allows the multiple users to access the same resource at same time.

It is used by the programs that resides inside the system.

It can be used by the users of the system

5)

Logical Address

Physical Address

CPU generates the Virtual address is known as Logical address

Physical address is the location of the data stored in the main memory unit.

It can be accessed by the users to get physical address.

It can not be directly accessed by the user.

It cannot be accessed physically

It can be accessed physically

6)

User Mode

Monitor Mode

It is the simple mode used after the booting of the system while using any application.

It is also called the Kernel mode.

While the user is using any application or software in any operating system than the system is in user mode

During the BIOS process of the system when computer gets booted then it is in kernel mode.

Mode bit is 1

Mode bit is zero

Q.2)

Timesharing: -

In Timesharing multiple users can access the system remotely at the same time. It uses the multiprogramming and CPU scheduling to provide small part of the computer. Timesharing allows the multiple users to access the same resource at same time. It is focused on the time constraint to provide access of the system to multiple members simultaneously without any interruptions.


Related Solutions

note (Please solve the questions in the language of operating systems) [2] (i) Define Timesharing.    ...
note (Please solve the questions in the language of operating systems) [2] (i) Define Timesharing.     (ii) In a one processor system, there is an interrupt clock which is set to a “time slice Q”, that is, every Q an interrupt occurs to stop the process. There is only one I/O device in the system    which is interrupted when the process needs an I/O. There are 3 processes A, B, C.           Process A executes an I/O interrupt every...
Quick Solution Please..... OS (Operating Systems) [1] Briefly, what is the difference between: 1- Buffering &...
Quick Solution Please..... OS (Operating Systems) [1] Briefly, what is the difference between: 1- Buffering & Spooling. 2- Synchronous & Asynchronous I/O. 3- CPU-bound & I/O-bound jobs. 4- Multiprogramming & Timesharing. 5- Logical & Physical addresses. 6- User & Monitor modes in Operating System. [2] (i) Define Timesharing.      (ii) In a one processor system, there is an interrupt clock which is set to a “time slice Q”, that is, every Q an interrupt occurs to stop the process. There is...
Please solve it quickly as it is urgent AC and Refrigeration Electrical Systems Note: Think carefully...
Please solve it quickly as it is urgent AC and Refrigeration Electrical Systems Note: Think carefully about Compressor motor control circuit and main circuit and the components. For diagrams, use Microsoft word tools and also you can scan and paste in particular answer keeping in view, font number and proper line spacing. 2. Differentiate control circuit and main power circuit of three phase compressor motor. ( 4 marks)
Please answer both the questions. 1 a) Design two bits comparators using Verilog description language Note:...
Please answer both the questions. 1 a) Design two bits comparators using Verilog description language Note: Design means RTL code and Testbench covering all possible corner cases) b) How many latches will result when the following code is synthesized? Assume B is 4-bits long.                                always@(state)                                begin                                         case(state)                                       2’b00: B = 5;                                          2’b01: B = 3;                                       2’b10: B = 0;                                         endcase                                end
Please solve all of the questions, questions 1, 2, and 3. Please show all work and...
Please solve all of the questions, questions 1, 2, and 3. Please show all work and all steps. 1.) Find x(t) = Σ aktk such that tx'' = x 2.) Find x(t) = Σk>=0 aktk such that x'' = tx + 1 and x(0) = 0, x'(0) = 1 3.) Using the Frobenius method, solve t2x'' - 3tx' + (4-t)x = 0
Language is C++ NOTE: No arrays should be used to solve problems and No non-constants global...
Language is C++ NOTE: No arrays should be used to solve problems and No non-constants global variables should be used. PART A: (Minusculo Inn) Minusculo Inn has only eight guest rooms: Room Number Amenities 101 1 king size bed 102, 103,104 2 double beds 201, 202 1 queen size bed 203, 204 1 double bed & sofa bed Write a program that asks for the room number and displays the amenities. If the user enters a room number that does...
1) (note: Please also provide the excel formulas used to solve it )  You work for a...
1) (note: Please also provide the excel formulas used to solve it )  You work for a soft-drink company in the quality control division. You are interested in the standard deviation of one of your production lines as a measure of consistency. The product is intended to have a mean of 12 ounces, and your team would like the standard deviation to be as low as possible. You gather a random sample of 18 containers. Estimate the population standard deviation at...
Operating systems Explain what the critical section problem is. Please explain this in about 1-2 paragraphs.
Operating systems Explain what the critical section problem is. Please explain this in about 1-2 paragraphs.
Please answer these following questions briefly. 1. What is bond? 2. What is mutual fund? 3....
Please answer these following questions briefly. 1. What is bond? 2. What is mutual fund? 3. How much car insurance do you need? 4. What is the certificate of deposit (CD)? 5. What is a 401(k)?
Please solve questions 1 and 2. Please show all work and all steps. 1.) Find the...
Please solve questions 1 and 2. Please show all work and all steps. 1.) Find the solution xa of the Bessel equation t2x'' + tx' + t2x = 0 such that xa(0) = a 2.) Find the solution xa of the Bessel equation t2x'' + tx' + (t2-1)x = 0 such that x'a(0) = a
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT