1. In OS, multiple jobs can run in parallel and finish faster than if they had run sequentially.
Suppose that two jobs, each of which needs 10 minutes of CPU time, start simultaneously. How
long will the last one take to complete if they run sequentially? How long if they run in parallel?
Assume 80% I/O wait.
solution:
80% I/O wait time means that a process is not in execution(i.e. CPU is sitting idle) for 80% of
the total time a process requires from CPU to complete itself(its execution). 80% I/O time means
it needs 80% of total execution time(10 minutes) to complete its I/O.
80%=80/100 = .8
Sequential execution
thus the time needed to complete a process which requires 10 minute of CPU will be = CPU time
required by process/CPU utilization=
10/CPU utilization= 10/0.2 = 50 minutes.
when two processes run sequentially(one after the other) then the total time required will be =
10/0.02 + 10/0.2 = 50+50=100 minutes
In case of parallel execution we again find the CPU utilization.. since two processes are in
parallel thus the formulae becomes-->
{1-(I/O time)^no. of processes in parallel execution} =1-(0.8)^2= 1-.64=0.36 now the CPU
utilization for 1 process will be 0.36/2=0.18 Therefore the time required will be = CPU time
required by process/CPU utilization= 10/0.18=55.5556(approx.) minutes.
Since the two processes are running in parallel thus the time required by 1 process will be the
total time required by 2 process=55.5556 minutes.
2. Explain the difference between a virus and a worm? How do they each reproduce?
solution:
The main difference between virus and worm is that, computer virus only spreads when a user
opens some affected file whereas computer worm spreads even without the knowledge of the
user. In addition to that, a computer virus can corrupt files, folders, etc. whereas worm does not
harm any file instead it creates additional space, files, shortcuts.
Firstly, let’s see what is Computer Virus?
A piece of code or a small program which is written to make change to the functions of
computer, without the knowledge of user is known as a computer virus. Basically, computer
virus carries two of the criteria, they are-
Viruses are designed by hackers, so they are different from one or the other. Some of the virus
are programmed in a way to damage your computer by infecting its program or deleting the files
or even reformatting the hard disk. Some others are only to play mischief, so you can know
something has gone wrong with your computer like, damaging or changing your audio, video or
text files by their infected files. Though some of the problems are small but still it can be quite
irritating and can create problem for users. For example, it uses lot of memory, so in result it can
interfere the execution of other programs, which can lead to some unwanted behavior of
computer system such as it crash the system or even the loss of data.
Some of the commonly known viruses are like, File infector virus, Boot Sector virus, Master
boot recor.
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
1. In OS, multiple jobs can run in parallel and finish faster than i.pdf
1. 1. In OS, multiple jobs can run in parallel and finish faster than if they had run sequentially.
Suppose that two jobs, each of which needs 10 minutes of CPU time, start simultaneously. How
long will the last one take to complete if they run sequentially? How long if they run in parallel?
Assume 80% I/O wait.
solution:
80% I/O wait time means that a process is not in execution(i.e. CPU is sitting idle) for 80% of
the total time a process requires from CPU to complete itself(its execution). 80% I/O time means
it needs 80% of total execution time(10 minutes) to complete its I/O.
80%=80/100 = .8
Sequential execution
thus the time needed to complete a process which requires 10 minute of CPU will be = CPU time
required by process/CPU utilization=
10/CPU utilization= 10/0.2 = 50 minutes.
when two processes run sequentially(one after the other) then the total time required will be =
10/0.02 + 10/0.2 = 50+50=100 minutes
In case of parallel execution we again find the CPU utilization.. since two processes are in
parallel thus the formulae becomes-->
{1-(I/O time)^no. of processes in parallel execution} =1-(0.8)^2= 1-.64=0.36 now the CPU
utilization for 1 process will be 0.36/2=0.18 Therefore the time required will be = CPU time
required by process/CPU utilization= 10/0.18=55.5556(approx.) minutes.
Since the two processes are running in parallel thus the time required by 1 process will be the
total time required by 2 process=55.5556 minutes.
2. Explain the difference between a virus and a worm? How do they each reproduce?
solution:
The main difference between virus and worm is that, computer virus only spreads when a user
opens some affected file whereas computer worm spreads even without the knowledge of the
user. In addition to that, a computer virus can corrupt files, folders, etc. whereas worm does not
harm any file instead it creates additional space, files, shortcuts.
Firstly, let’s see what is Computer Virus?
A piece of code or a small program which is written to make change to the functions of
computer, without the knowledge of user is known as a computer virus. Basically, computer
virus carries two of the criteria, they are-
Viruses are designed by hackers, so they are different from one or the other. Some of the virus
are programmed in a way to damage your computer by infecting its program or deleting the files
or even reformatting the hard disk. Some others are only to play mischief, so you can know
2. something has gone wrong with your computer like, damaging or changing your audio, video or
text files by their infected files. Though some of the problems are small but still it can be quite
irritating and can create problem for users. For example, it uses lot of memory, so in result it can
interfere the execution of other programs, which can lead to some unwanted behavior of
computer system such as it crash the system or even the loss of data.
Some of the commonly known viruses are like, File infector virus, Boot Sector virus, Master
boot record virus, Macro virus & Multipartite virus.
Now, let’s see what is Computer Worm?
In contrast worms are those programs which are normally replicating themselves from one
computer system to another without any use of host files. The main difference is that Computer
virus needs infected host file whereas there's no need for Computer Worm. Generally, Worms
exist in other files, mostly it can be found in Word or Excel documents. There main reason
behind why Computer Virus differ from Computer Worm is the way they use the infected host
file. When it comes to Computer Worm, mostly they will release a document which already have
a "worm" or say macro inside that document itself. Once, that document is released, it will go
from one computer to another.
3) Explain what is a race condition is with regards to an operating system?
solution: A race condition is an undesirable situation that occurs when a systemattempts to
perform two or more operations at the same time, but because of the nature of the system, the
operations must be done in the proper sequence to be done correctly.
In some OS some processes share data for reading and writing, then the result of operation
depend on the order in which reading and writing takes place. This condition is called race
condition. The shared data may be on main memory or it may be a shared file, the location of
shared memory doesn't change the nature of communication or the problem that arises.
4) Explain the main difference between Programmed I/O and Interrupt Driven I/O?
solution:
Programmed-driven I/O means the program is polling or checking some hardware item e.g.
mouse within a loop.
For Interrupt driven I/O, the same mouse will trigger a signal to the program to process the
mouse event.
Advantage of Programmed Driven: easy to program and understand
Disadvantages: slow and inefficient
Advantage of Interrupt Driven: fast and efficient
Disadvantage: Can be tricky to write if you are using a low level language.
3. Can be tough to get the various pieces to work well together. Usually done by the hardware
manufacturer or the OS maker e.g. Microsoft.
points to note are as follows:
Programmed-driven I/O means the program is polling or checking some hardware item e.g.
mouse within a loop.
For Interrupt driven I/O, the same mouse will trigger a signal to the program to process the
mouse event.
Advantage of Programmed Driven: easy to program and understand
Disadvantages: slow and inefficient
Advantage of Interrupt Driven: fast and efficient
Disadvantage: Can be tricky to write if you are using a low level language.
Can be tough to get the various pieces to work well together. Usually done by the hardware
manufacturer or the OS maker e.g. Microsoft.
Solution
1. In OS, multiple jobs can run in parallel and finish faster than if they had run sequentially.
Suppose that two jobs, each of which needs 10 minutes of CPU time, start simultaneously. How
long will the last one take to complete if they run sequentially? How long if they run in parallel?
Assume 80% I/O wait.
solution:
80% I/O wait time means that a process is not in execution(i.e. CPU is sitting idle) for 80% of
the total time a process requires from CPU to complete itself(its execution). 80% I/O time means
it needs 80% of total execution time(10 minutes) to complete its I/O.
80%=80/100 = .8
Sequential execution
thus the time needed to complete a process which requires 10 minute of CPU will be = CPU time
required by process/CPU utilization=
10/CPU utilization= 10/0.2 = 50 minutes.
when two processes run sequentially(one after the other) then the total time required will be =
10/0.02 + 10/0.2 = 50+50=100 minutes
In case of parallel execution we again find the CPU utilization.. since two processes are in
4. parallel thus the formulae becomes-->
{1-(I/O time)^no. of processes in parallel execution} =1-(0.8)^2= 1-.64=0.36 now the CPU
utilization for 1 process will be 0.36/2=0.18 Therefore the time required will be = CPU time
required by process/CPU utilization= 10/0.18=55.5556(approx.) minutes.
Since the two processes are running in parallel thus the time required by 1 process will be the
total time required by 2 process=55.5556 minutes.
2. Explain the difference between a virus and a worm? How do they each reproduce?
solution:
The main difference between virus and worm is that, computer virus only spreads when a user
opens some affected file whereas computer worm spreads even without the knowledge of the
user. In addition to that, a computer virus can corrupt files, folders, etc. whereas worm does not
harm any file instead it creates additional space, files, shortcuts.
Firstly, let’s see what is Computer Virus?
A piece of code or a small program which is written to make change to the functions of
computer, without the knowledge of user is known as a computer virus. Basically, computer
virus carries two of the criteria, they are-
Viruses are designed by hackers, so they are different from one or the other. Some of the virus
are programmed in a way to damage your computer by infecting its program or deleting the files
or even reformatting the hard disk. Some others are only to play mischief, so you can know
something has gone wrong with your computer like, damaging or changing your audio, video or
text files by their infected files. Though some of the problems are small but still it can be quite
irritating and can create problem for users. For example, it uses lot of memory, so in result it can
interfere the execution of other programs, which can lead to some unwanted behavior of
computer system such as it crash the system or even the loss of data.
Some of the commonly known viruses are like, File infector virus, Boot Sector virus, Master
boot record virus, Macro virus & Multipartite virus.
Now, let’s see what is Computer Worm?
In contrast worms are those programs which are normally replicating themselves from one
computer system to another without any use of host files. The main difference is that Computer
virus needs infected host file whereas there's no need for Computer Worm. Generally, Worms
exist in other files, mostly it can be found in Word or Excel documents. There main reason
behind why Computer Virus differ from Computer Worm is the way they use the infected host
file. When it comes to Computer Worm, mostly they will release a document which already have
a "worm" or say macro inside that document itself. Once, that document is released, it will go
from one computer to another.
3) Explain what is a race condition is with regards to an operating system?
5. solution: A race condition is an undesirable situation that occurs when a systemattempts to
perform two or more operations at the same time, but because of the nature of the system, the
operations must be done in the proper sequence to be done correctly.
In some OS some processes share data for reading and writing, then the result of operation
depend on the order in which reading and writing takes place. This condition is called race
condition. The shared data may be on main memory or it may be a shared file, the location of
shared memory doesn't change the nature of communication or the problem that arises.
4) Explain the main difference between Programmed I/O and Interrupt Driven I/O?
solution:
Programmed-driven I/O means the program is polling or checking some hardware item e.g.
mouse within a loop.
For Interrupt driven I/O, the same mouse will trigger a signal to the program to process the
mouse event.
Advantage of Programmed Driven: easy to program and understand
Disadvantages: slow and inefficient
Advantage of Interrupt Driven: fast and efficient
Disadvantage: Can be tricky to write if you are using a low level language.
Can be tough to get the various pieces to work well together. Usually done by the hardware
manufacturer or the OS maker e.g. Microsoft.
points to note are as follows:
Programmed-driven I/O means the program is polling or checking some hardware item e.g.
mouse within a loop.
For Interrupt driven I/O, the same mouse will trigger a signal to the program to process the
mouse event.
Advantage of Programmed Driven: easy to program and understand
Disadvantages: slow and inefficient
Advantage of Interrupt Driven: fast and efficient
Disadvantage: Can be tricky to write if you are using a low level language.
Can be tough to get the various pieces to work well together. Usually done by the hardware
manufacturer or the OS maker e.g. Microsoft.