Professional Documents
Culture Documents
• OS goals:
Windows
Android
Linux
Ubuntu
Fedora
Mac O/S
Characteristics of OS
Services provided by an OS
• Program Development :-
It provides variety of facilities and services such as editor and debugger. Editor
is used to create or modify the program. Debugger is used to debug the program.
• Program execution :-
OPERATING SYSTEM UNIT-1
It provides some tasks to execute program. Instruction and data must be loaded
into main memory, I/O devices must be initialized and resources must be prepared.
• System access
In the case of share or public system, OS control access to the system. It must
provide protection from unauthorized user.
• Accounting
• The users of batch operating system do not interact with the computer
directly.
• Each user prepares his job on an off-line device like punch cards and
submits it to the computer operator.
• To speed up processing, jobs with similar needs are batched together and run
as a group.
• Thus, the programmers left their programs with the operator. The operator
then sorts programs into batches with similar requirements.
• The problems with Batch Systems are following.
Lack of interaction between the user and job.
CPU is often idle, because the speeds of the mechanical I/O devices are
slower than CPU.
Difficult to provide the desired priority.
• Real Life Example:
to purchase any product EMI facility is available.
Practical Batch in the Exam
Time-sharing operating systems:
www
Internet
The primary purpose of the network operating system is to allow shared file
and printer access among multiple computers in a network, typically a local
area network (LAN), a private network or to other networks.
Examples of network operating systems are Microsoft Windows Server
2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell
NetWare, and BSD.
• The advantages of network operating systems are following.
Centralized servers are highly stable.
Security is server managed.
Upgrades to new technologies and hardware can be easily integrated into the
system.
Remote access to servers is possible from different locations and types of
systems.
• The disadvantages of network operating systems are following.
High cost of buying and running a server.
Dependency on a central location for most operations.
Regular maintenance and updates are required.
• Real Life Example:
Novell NetWare, Microsoft Windows NT, Microsoft Windows
Real-time systems are used when there are rigid time requirements on the
operation of a processor or the flow of data and real-time systems can be
used as a control device in a dedicated application.
Real-time operating system has well-defined, fixed time constraints
otherwise system will fail.
For example Scientific experiments, medical imaging systems, industrial
control systems, weapon systems, robots, and home-appliance controllers,
Air traffic control system etc.
• There are two types of real-time operating systems.
Hard real-time systems
Hard real-time systems guarantee that critical tasks complete on time. For
e.g. Internal Exam, External Exam.
In hard real-time systems secondary storage is limited or missing with data
stored in ROM. In these systems virtual memory is almost never found.
Soft real-time systems
OPERATING SYSTEM UNIT-1
Soft real time systems are less restrictive. Critical real-time task gets priority
over other tasks and retains the priority until it completes. For e.g.,
Assignment Submission, Attendance.
Soft real-time systems have limited utility than hard real-time systems. For
example, Multimedia, virtual reality, Advanced Scientific Projects like undersea
exploration and planetary rovers etc.
There are two ways by which Input/output subsystems can improve the
performance and efficiency of the computer by using a memory space in the main
memory or on the disk and these two are spooling and buffering.
What is buffering?.
A buffer is an area of main memory for holding data during input and output data
transfers.
Buffering is one tool that can increase the efficiency of the operating system and
the performance of individual processes.
After the data have been read and the CPU is about to start the operations, the input
device is instructed to begin the next input operation.
Both the CPU and I/O device are busy.
I/O Buffering
Block-oriented
Information is stored in fixed sized blocks
Transfers are made a block at a time
Used for disks and tapes
Stream-oriented
Transfer information as a stream of bytes
Used for terminals, printers, communication ports, mouse, and most other devices
that are not secondary storage
Types of Buffering
• Single Buffer
• Double Buffer
• Circular Buffer
Single Buffer:
Operating system assigns a buffer in main memory for an I/O request
OPERATING SYSTEM UNIT-1
Block-oriented
• Input transfers made to buffer
• Block moved to user space when needed
• Another block is moved into the buffer
Stream-oriented
• Used a line at time
• User input from a terminal is one line at a time with carriage return signaling
the end of the line
• Output to the terminal is one line at a time
Double buffer:
• Use two system buffers instead of one
• A process can transfer data to or from one buffer while the operating system
empties or fills the other buffer
OPERATING SYSTEM UNIT-1
Circular Buffer:
• More than two buffers are used
• Each individual buffer is one unit in a circular buffer
• Used when I/O operation must keep up with process
SPOOLING
Handles I/O device data spooling as devices have different data access rates.
OPERATING SYSTEM UNIT-1
Maintains the spooling buffer which provides a waiting station where data
can rest while the slower device catches up.
Maintains parallel computation because of spooling process as a computer
can perform I/O in parallel fashion. It becomes possible to have the
computer read data from a tape, write data to disk and to write out to a tape
printer while it is doing its computing task.
Advantages
SPOOLING BUFFERING
It overlaps the input/output of It overlaps the input/output of
Basic
one job with the execution of one job with the execution of the
Difference
another job. same job.
Full form Simultaneous peripheral
No full form
(stands for) operation online
Spooling is more efficient than Buffering is less efficient than
Efficiency
buffering. spooling.
OPERATING SYSTEM UNIT-1
SPOOLING BUFFERING
It considers disk as a huge spool Buffer is a limited area in main
Consider Size
or buffer. memory.
Data is encrypted to make it safe from stealing. However, many known companies
also encrypt data to keep their trade secret from their competitors.
Encryption
Process
Decryption
process
OPERATING SYSTEM UNIT-1
Helps you to protect your confidential data such as passwords and login id
Provides confidentiality of private information
Helps you to ensure that that the document or file has not been altered
Encryption process also prevents plagiarism and protects IP
Helpful for network communication (like the internet) and where a hacker
can easily access unencrypted data.
It is an essential method as it helps you to securely protect data that you
don't want anyone else to have access.
KEY DIFFERENCE
It is a process of converting
It is a method of converting the
normal data into an unreadable
What is unreadable/coded data into its
form. It helps you to avoid any
original form.
unauthorized access to data
Location of The person who is sending the The receiver receives the data and
Conversion data to the destination. converts it.
2. The cipher text can be stored in a readable file, or transmitted over unprotected
channels.
3. To make sense of the cipher text, the receiver must decrypt (decode) it back into
clear text.
OPERATING SYSTEM UNIT-1
Then, the encryption algorithm must satisfy the following properties for any
message m
l. Dk (Ek (m))-m
3. The security of the system depends on only the secrecy of the key, and
does not depend on the secrecy of the algorithms E and D.
The secret keys must be sent securely to both the sender and receiver. Each
user has both a public and a private key, and two users can communicate
knowing only each other's public key
An algorithm based on this concept as follows. This algorithm is believed to
be almost unbreakable. The public encryption key is a pair (e, n); the private
key is a pair (d, n), where e, d, and n are positive integers. Each message is
represented as an integer between 0 and n-l (a long message is brokeń into a
series of similar messages, each of which can be represented as such an
integer). The function E and D are defined as
E(m) = me mod n = c
D(c) = CD mod n = m
The main problem is choosing the encryption and decryption keys. The integer n is
Computed as the product of two large (100 or more digits) randomly chosen prime
Number p and q with
n=p*q
OPERATING SYSTEM UNIT-1
[d, (p-1)*(q-1)] = 1
For example, Let p=5 and q=7, then, n=35 and (p-1)*(q-1) =24, since 11 is
relatively prime to 24, we can choose d=ll:• and since 11*11 mod 24 = 121 mod
24=1,e=11. suppose now m=3 then
311 = 177147
Password
Definition
Password Tips
VIRUS
Vital Information Resources Under Seize
A computer virus is a program or piece of code that is loaded into your computer
without your knowledge and runs against your wishes. Viruses can also replicate
themselves
Overwrite Virus:
It is the simplest computer virus that overwrites the code of the host computer
system's file with its own malicious code. The content of the infected file is
replaced partially or completely without changing the size of the file. Thus, it
destroys the original program code by overwriting it with its defective code. The
infected files must be deleted or replaced with a new copy as this virus cannot be
removed or disinfected.
Append Virus:
As the name suggests, this virus appends its malicious code to the end of the host
program's file. After that, it alters the file's header in a way that the file's header is
redirected to the start of the malicious code of the append virus. Thus, this code is
executed each time the program runs. However, it does not destroy the host
program; rather, it modifies it in a way that it holds the virus code and enables the
code to run itself.
Macro Virus
Macro virus alters or infects the macros of a document or data file. It is embedded
as a macro in a document and adds its codes to the macros of the document. The
virus spreads when infected documents or data files are opened in other computers.
The first macro virus, which was named concept, spread through emails with
attached Ms Word documents. It infected MsWord 6.0 and Ms Word 95
documents, which were saved using Save As option. Fortunately, it did not cause
any harm, except for displaying a message on the screen.
Boot virus or boot sector virus alters the boot sector program stored in the hard
disk or any other storage device such as floppy disks. It replaces the boot sector
program with its own malicious version. It infects the computer only when it is
used to boot up the computer. If it enters after the boot-up process, it will not infect
OPERATING SYSTEM UNIT-1
the computer. For example, if someone forgets to remove the infected floppy disk
when the pc is turned off and then turns on this pc, it runs the infected boot sector
program during the booting process.
Usually, it enters into your system through corrupt media files, infected storage
devices, and insecure computer networks. The spread of this virus is very rare
these days due to the decline in the use of floppy disk and use of boot-sector
safeguards in the present-day operating systems.
The resident virus stays permanently in the primary memory (RAM) of the
computer. When you start the computer, it becomes active and corrupts the files
and programs running on the computer.
Non-resident Virus:
Unlike the resident virus, the non-resident virus does not reside in the memory of a
computer. So, it is not executed from the computer's memory. For example,
executable viruses.
File Virus :
This type of virus infects the system by appending itself to the end of a file. It
changes the start of a program so that the control jumps to its code. After the
execution of its code, the control returns back to the main program. Its execution is
not even noticed. It is also called Parasitic virus because it leaves no file intact but
also leaves the host functional.
Multipartite Virus
Multipartite virus spreads and infects in multiple ways. It infects both the boot
sector and the executable files stored on the hard drive simultaneously. When you
turn on a computer, the boot sector virus is triggered as it latches on to the hard
drive, which has the data for starting up the computer. Once it is triggered, the
program files also get infected.
OPERATING SYSTEM UNIT-1
It is one of the commonly found computer viruses. It mainly infects the executable
files; the files with .com or .exe extensions. The virus becomes active when the
infected file is executed. The active virus overwrites the file partially or
completely. Thus it may destroy the original file partially or completely.
Trojan Horse
Executable Virus:
Polymorphic Virus:
It creates its thousands of copies itself; in each copy, it changes the sequence and
byte values to evade detection by antivirus software. Even the best antiviruses may
not be able to detect this virus. Polymorphic viruses affect data types and functions
and generally spread through spam, infected sites, and while using other malware.
Stealth Virus:
During the dormant phase, the virus is idle .The virus has accessed its victim's
computer or software, but it does not do anything yet. The virus will wait until a
"trigger" gives it the command to execute. This trigger could be anything from a
predefined date to the user taking a specific action, like double-clicking an icon.
In the propagation phase, the virus is fruitful and multiplies. The virus will start
to insert copies of itself into other programs or areas on the disk. These copies are
often altered in some way to make detection more difficult.
A dormant virus moves into this phase when it gets activated, it will now perform
the function for which it was intended.
Finally, during the execution phase, the virus gets to work. The virus's payload is
released, and the end user will begin to notice problems with their computer such
as deleted files, the system crashing, or endless popups on the screen.
Let us discuss in what ways a virus can affect your computer system. The ways are
mentioned below −
Impact of Virus
Virus Detection
However, if there is antivirus software in your computer system, then it can easily
check programs and files on a system for virus signatures.
Let us now see the different virus preventive measures. A computer system can be
protected from virus through the following −
Following are the most popular and effective antivirus from which you can choose
one for your personal computer −
OPERATING SYSTEM UNIT-1
WORM
Definition: A computer worm is a program that copies itself from one computer to
another computer.
Example: The Morris worm was one of the first computer worms distributed via
the Internet. It is considered the first worm and was certainly the first to gain
significant mainstream media attention. It was written by a graduate student at
Cornell University, Robert Morris Jr, and launched on November 2, 1988 from
MIT. The worm was released from MIT to disguise the fact that the worm
originally came from Cornell. Morris ended up with a $10,050 fine, 3 years
suspended jail sentence, and 400 hours of community service.
1. Internet Worms:
Like they do with computer networks, computer worms also target popular
websites with insufficient security. When they manage to infect the site, internet
worms can replicate themselves onto any computer being used to access the
website in question. From there, internet worms are distributed to other connected
computers through the internet and local area network connections.
2. Email Worms:
Email worms are most often distributed via compromised email attachments. They
usually have double extensions (for example, .mp4.exe or .avi.exe) so that the
recipient would think that they are media files and not malicious computer
programs. When the victims click on the attachment, copies of the same infected
file will automatically be sent to addresses from their contacts list.
Instant messaging worms are exactly the same as email worms, the only difference
being their method of distribution. Once again, they are masked as attachments or
clickable links to websites. They are often accompanied by short messages like
“LOL” or “You have to see this!” to trick the victim into thinking that their friend
is sending them a funny video to look at.
4. File-Sharing Worms:
Although illegal, file-sharing and peer-to-peer file transfers are still used by
millions of people around the world. Doing so, they are unknowingly exposing
their computers to the threat of file-sharing worms. Like email and instant
messaging worms, these programs are disguised as media files with dual
extensions.
When the victim opens the downloaded file to view it or listen to it, they will
download the worm to their computer. Even if it seems that users have downloaded
an actual playable media file, an executable malicious file could be hidden in the
folder and discreetly installed when the media file is first opened.
5. IRC Worms:
Internet Relay Chat (IRC) is a messaging app that is mostly outdated nowadays but
was all the rage at the turn of the century. Same as with today’s instant messaging
platforms, computer worms were distributed via messages containing links and
attachments. The latter was less effective due to an extra layer of protection that
prompted users to accept incoming files before any transfer could take place.