Question

In: Computer Science

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

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

Solutions

Expert Solution

1.

1. Difference between Buffering and Spooling

S.NO Key Spooling Buffering   
1. Definition

Spooling, an acronym of Simultaneous Peripheral Operation On-line (SPOOL), puts data into a temporary working area so it can be accessed and processed by another program or resource.


On other hand Buffering is an act of storing data temporarily in the buffer. It helps in matching the speed of the data stream between the sender and receiver.


2. Internal implementation

Spooling overlaps the input and output of one job with the computation of another job.


Buffering on other hand overlaps the input and output of one job with the computation of the same job.


3. Resource Requirement

Spooling requires less resource management as compare to buffering as different resources manages the process for specific jobs.


On other hand Buffering requires more resource management as compare to spooling as same resource manages the process of same divided job.


4. Processor

Spooling can also process data at the remote sites. The spooler only has to notify when a process gets completed at the remote site so that spooler can spool next process to the remote side device.


On other hand Buffering do not support the remote processing.


5. Efficient

Spooling is more efficient than buffering.


On other hand Buffering is less efficient than spooling.


6. Size on memory

It considers disk as a huge spool or buffer.


On other hand Buffer is a limited area in main memory.


3. Differece between CPU bound and I/O bound jobs

S.NO CPU bound I/O bound
1. It means the rate at which process progresses is limited by the speed of the CPU It means the rate at which process progresses is limited by the speed of the I/O subsystem
2. A task that performs calculations on a small set of numbers, for example multiplyinf small set of matrices, is likely to be CPU bound A task that processes data from disk, for example, counting the number of lines in a file is likely to be I/O bound
3. A program is CPU bound if it would go faster if the CPU were faster A program is I/O bound if it would go faster if the I/O subsytem was faster
4.

CPU bound means the program is bottlenecked by the CPU, or central processing unit


while I/O bound means the program is bottlenecked by I/O, or input/output, such as reading or writing to disk, network, etc.


4. Difference between multiprogramming and time sharing

Multiprogramming:

In this our aim is to achieve maximum CPU ( and other System resources) utilization with SINGLE PROCESSOR (i.e. Single CPU). If we are running a SINGLE Program on a SINGLE processor , then we can’t achieve maximum CPU utilization because chances are that the Program might wait for some Input/Output operations to complete, till then CPU will remain Idle. Hence we run multiple program on SINGLE processor, so that whenever a particular program waits for some I/O or any other operations, then CPU would NOT sit idle and SWITCH to some other program to execute.

Timesharing:

It is the LOGICAL extension of Multi Programming only. The DIFFERENCE is that in Multi Programming , we do achieve effective utilization of system resources (Like CPU, Memory etc.) BUT we do NOT have any USER INTERACTIONS. While in Multi tasking (Time Sharing) we do have User Interaction (like Inputs from USER through mouse,keyboards etc) and then achieve Effective utilization of System resources. ALSO here since we are taking inputs from User , so RESPONSE TIME also matters. It gives impression to User that the entire System is dedicated for its use while it is shared among different Users.

5. Difference between Logical and Physical adresses

S.NO Logical Adresses Physical Adresses
1. The basic difference between Logical and physical address is that Logical address is generated by CPU in perspective of a program.

On the other hand, the physical address is a location that exists in the memory unit.


2.

The set of all logical addresses generated by CPU for a program is called Logical Address Space.


However, the set of all physical address mapped to corresponding logical addresses is referred as Physical Address Space.


3.

The logical address is also called virtual address as the logical address does not exist physically in the memory unit.


The physical address is a location in the memory unit that can be accessed physically.


4.

Identical logical address are generated by Compile-time and Load time address binding methods.


Identical physical address are generated by Compile-time and Load time address binding methods.


5.

The logical address generated while run-time address binding method differs from each other.


The physical address generated while run-time address binding method differs from each other.


6.

The logical address is generated by the CPU while program is running


whereas, the physical addres is computed by the MMU (Memory Management Unit).


2.

1. Time Sharing:

In computing, time-sharing is the sharing of a computing resource among many users at the same time by means of multiprogramming and multi tasking.

Time-sharing enables many people, located at various terminals, to use a particular computer system at the same time. Multitasking or Time-Sharing Systems is a logical extension of multiprogramming. Processor’s time is shared among multiple users simultaneously is termed as time-sharing.

The main difference between Time-Sharing Systems and Multiprogrammed Batch Systems is that in case of Multiprogrammed batch systems, the objective is to maximize processor use, whereas in Time-Sharing Systems, the objective is to minimize response time.

Multiple jobs are implemented by the CPU by switching between them, but the switches occur so frequently. So, the user can receive an immediate response. For an example, in a transaction processing, the processor executes each user program in a short burst or quantum of computation, i.e.; if n users are present, then each user can get a time quantum. Whenever the user submits the command, the response time is in few seconds at most.

An operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time. Computer systems which were designed primarily as batch systems have been modified to time-sharing systems.

Advantages of Timesharing operating systems are −

  • It provides the advantage of quick response.
  • This type of operating system avoids duplication of software.
  • It reduces CPU idle time.

Disadvantages of Time-sharing operating systems are −

  • Time sharing has problem of reliability.
  • Question of security and integrity of user programs and data can be raised.
  • Problem of data communication occurs.

Related Solutions

What is an operating system? What is the purpose of an OS? What are the major...
What is an operating system? What is the purpose of an OS? What are the major operating systems out there and discuss the advantages / disadvantages of them. Why is it important for a business networked environment to have an OS such as Windows Server 2012? Could a business operate its computing equipment without a “server” operating system? What sort of operating systems have you installed? What was the process like? Have you encountered problems installing operating systems before? If...
What is an operating system? What is the purpose of an OS? What are the major...
What is an operating system? What is the purpose of an OS? What are the major operating systems out there and discuss the advantages / disadvantages of them.
What is the difference between Open and Closed Circulatory Systems? What is the difference between atrioventricular...
What is the difference between Open and Closed Circulatory Systems? What is the difference between atrioventricular and semilunar valves?
What is the difference between current ratio and quick ratio. Explain with example ?
What is the difference between current ratio and quick ratio. Explain with example ?
Please briefly explain us: 1) the difference between the journal and the ledger, and 2) when...
Please briefly explain us: 1) the difference between the journal and the ledger, and 2) when accounts should be debited, and when they should be credited.
what is the difference between the cohesive energy and lattice energy ? please write all solution...
what is the difference between the cohesive energy and lattice energy ? please write all solution and step by step and cleae solution this material is solid physics .
what is the difference between analytical solution and FEA??
what is the difference between analytical solution and FEA??
1. What is the difference between operating margin and net income and why is it important...
1. What is the difference between operating margin and net income and why is it important to manage both?
What is the difference between AIS and MIS. Briefly explain?
What is the difference between AIS and MIS. Briefly explain?
Please answer with a fully detailed solution with examples. Difference between interpretive and compiler languages? What...
Please answer with a fully detailed solution with examples. Difference between interpretive and compiler languages? What are the four pillars of OOP and provide a simple example for each and code as well? What is the highest superclass in Java and why and what are the other ones and explain them as well. Describe the components involved in the processing of one web request.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT