What are the basic characteristics of a uniprocessor based, multitasking operating system ?

Uniprocessor based multitasking operating system basically works on time sharing basis. Memory of such computers is partitioned and each partition holds a process (program plus associated data). Thus a number of processes stay in memory at the same time. Processor then select one process and execute it for a fixed time (called time slice). If the process is executed completely it is removed and another waiting process is loaded into memory. It the process is not executed completely, then it is suspended temporarily and then processor execute next process for the same time slice. This is repeated for all processes waiting to be executed in memory. Once all the processes are executed in the same manner, the first suspended process is again taken up for execution. This is repeated. This process of executing processes for short intervals is called as multi-programming. A process can be at any time be in running, blocked or ready state.

What is Star Topology ?

In Star Topology all computers are connected to a central computer. All communications between computers are done through the central computer. Central computer almost act like a switching system that connect communicating computers. The main drawback of Star Topology is, in case the central computer fail, then the entire network fails. Moreover since all computers try to communicate through the central computer, it becomes a bottleneck when traffic is high.

What is Ring Topology ?

Here data is transmitted from one computer to another through a ring structure. The computer that wish to send some data sends to its immediate neighbor which forwards to its immediate neighbor and so on. Finally the data passes through the entire ring and reach the sender which removes the data from ring network. It is generally free from collision. It is slow. If a line break then entire network will fail.

What is Bus Topology ?

In Bus Topology, all communication is done through a common medium. It may be a coaxial cable or fiber or twisted pair line. Here all computers can listen to the common line but usually the computer to which the data is addressed only takes the data. Others discard the data. The main drawback of bus topology is data collisions can take place. Two computers can try to use the common physical medium at the same time. Various collision control techniques are adopted practically. As number of computers increase possibility of collision also increase.

Write a single C++ statement that subtracts the sum of x and y from z and then incrementing.

Z-(x+y)+1