lecture no. 8 - wordpress.com · lecture no. 8 operating systems prepared by : engr. m. nadeem an...

30
LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem

Upload: others

Post on 30-May-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

LECTURE No. 8

OPERATING

SYSTEMS

Prepared by : Engr. M. Nadeem

Page 2: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

An operating system (OS) is a set of programs that coordinate all the activities among

computer or mobile device hardware.

It is a software which acts as an interface between the end user and computer hardware.

Every computer must have at least one OS to run other programs.

An application like Chrome, MS Word, Games, etc. needs some environment in which it will

run and perform its task.

The OS helps you to communicate with the computer without knowing how to speak the

computer's language.

It is not possible for the user to use any computer or mobile device without having an

operating system.

What is an Operating System

Page 3: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

What is an Operating System

Page 4: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Examples of Operating System with Market Share :

Page 5: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

List of Operating Systems with the latest Market Share

Page 6: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

History of Operating systems

Operating systems were first developed in the late 1950s to manage tape storage

The General Motors Research Lab implemented the first OS in the early 1950s for their IBM 701

In the mid-1960s, operating systems started to use disks

In the late 1960s, the first version of the Unix OS was developed

The first OS built by Microsoft was DOS. It was built in 1981 by purchasing the 86-DOS software

from a Seattle company

The present-day popular OS Windows first came to existence in 1985 when a GUI was created

and paired with MS-DOS.

Page 7: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Here is a list commonly found important features of an Operating System:

starting and shutting down a computer or mobile device,

providing a user interface,

managing programs,

managing memory,

coordinating tasks,

configuring devices,

monitoring performance,

establishing an Internet connection,

providing file management and

other device or media-related tasks,

and updating operating system software,

Allow users to control a network and administer security.

Features of an Operating System

Page 8: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among
Page 9: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among
Page 10: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Operating System Functions Starting Computers and Mobile Devices

The start-up process, however, is similar for large and small computers and mobile devices, as

described in the following steps.

Step 1: When you turn on the computer or mobile device, the power supply or battery sends an

electrical current to circuitry in the computer or mobile device.

Step 2: The charge of electricity causes the processor chip to reset itself and finds the firmware

that contains start-up instructions.

Step 3: The start-up process executes a series of tests to check the various components. These

tests vary depending on the type of computer or devices and can include checking the buses,

system clock, adapter cards, RAM chips, mouse, keyboard, and drives. It also includes making

sure that any peripheral devices are connected properly and operating correctly. If any problems

are identified, the computer or device may beep, display error messages, or cease operating

depending on the severity of the problem.

Page 11: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Step 4: If the tests are successful, the kernel of the operating system and other frequently used

instructions load from the computer or mobile device’s internal storage media to its memory

(RAM). The kernel is the core of an operating system that manages memory and devices,

maintains the internal clock, runs programs, and assigns the resources, such as devices,

programs, apps, data, and information. The kernel is memory resident, which means it remains

in memory while the computer or mobile device is running. Other parts of the operating system

are nonresident; that is, nonresident instructions remain on a storage medium until they are

needed, at which time they transfer into memory (RAM).

Step 5: The operating system in memory takes control of the computer or mobile device and

loads system configuration information. The operating system may verify that the person

attempting to use the computer or mobile device is a legitimate user. Finally, the user interface

appears on the screen, and any start-up applications, such as antivirus software, run.

Operating System Functions

Starting Computers and Mobile Devices

Page 12: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

What is meant by the phrase, booting a computer?

The process of starting or restarting a computer or mobile device is called booting. Some people use

the term cold boot to refer to the process of starting a computer or mobile device from a state when it

is powered off completely. Similarly, warm boot refers to the process of restarting a computer or

mobile device while it remains powered on.

A warm boot generally is faster than a cold boot because it skips some of the operating system start-

up instructions that are included as part of a cold boot. If you suspect a hardware problem, it is

recommended that you use a cold boot to start a computer or device because this process detects

and checks connected hardware devices. If a program or app stops working, a warm boot often is

sufficient to restart the device because this process clears memory.

A boot drive is the drive from which your personal computer starts, which typically is an internal hard

drive, such as a hard disk or SSD. Sometimes, an internal hard drive becomes damaged and the

computer cannot boot from it, or you may want to preview another operating system without installing

it. In these cases, you can start the computer from a boot disk, which is removable media, such as a

CD or USB flash drive, that contains only the necessary operating system files required to start the

computer.

Page 13: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Managing Programs

An operating system can be single tasking or multitasking:

A single tasking operating system allows only one program or app to run at a time. For

example, if you are using a browser and want to check email messages, you must exit the

browser before you can run the email program. Operating systems on embedded computers

and some mobile devices use a single tasking operating system.

Most operating systems today are multitasking.

A multitasking operating system allows two or more programs or apps to reside in memory

at the same time. Using the example just cited, if you are working with a multitasking

operating system, you do not have to exit the browser to run the email program. Both

programs can run concurrently.

Page 14: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

In addition to managing applications, an operating system manages other processes. These

processes include programs or routines that provide support to other programs or hardware.

Some are memory resident. Others run as they are required. (As Shown in Figure).

Some operating systems support a single user; others support thousands of users running

multiple programs.

A multiuser operating system enables two or more users to run programs simultaneously.

Networks, servers, and supercomputers allow hundreds to thousands of users to connect at

the same time and, thus, use multiuser operating systems.

Managing Programs

Page 15: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among
Page 16: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Managing Memory

If several programs or apps are running simultaneously, your computer or mobile device may use up its

available RAM.

For example, assume an operating system requires 2 GB of RAM to run, an antivirus program — 256 MB,

a browser — 512 MB, a productivity software suite — 1 GB, and a photo editing program — 512 MB. With

all these programs running simultaneously, the total RAM required would be 4.352 GB (As Shown in

Figure).

If the computer has only 4 GB of RAM, the operating system may have to use virtual memory in order to

run all of the applications at the same time.

When a computer or mobile device runs low on available RAM, this often results in the computer or mobile

device running sluggishly.

Page 17: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

With virtual memory, the operating system allocates a portion of a storage medium, such as a hard drive or

a USB flash drive, to function as additional RAM. As you interact with a program, part of it may be in

physical RAM, while the rest of the program is on the hard drive as virtual memory. Because virtual memory

is slower than RAM, users may notice the computer slowing down while it uses virtual memory.

Virtual Memory

Page 18: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

With virtual memory, the operating system allocates a portion of a storage medium, such as a

hard drive or a USB flash drive, to function as additional RAM.

As you interact with a program, part of it may be in physical RAM, while the rest of the program is

on the hard drive as virtual memory.

Because virtual memory is slower than RAM, users may notice the computer slowing down while it

uses virtual memory.

The area of the hard drive used for virtual memory is called a swap file because it swaps

(exchanges) data, information, and instructions between memory and storage.

A page is the amount of data and program instructions that can swap at a given time.

The technique of swapping items between memory and storage, called paging, is a time-

consuming process for the computer.

When an operating system spends much of its time paging, instead of executing application

software, it is said to be thrashing.

Virtual Memory

Page 19: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Coordinating Tasks

The operating system determines the order in which tasks are processed. A task, or job, is

an operation the processor manages.

Tasks include receiving data from an input device, processing instructions, sending

information to an output device, and transferring items from storage to memory and from

memory to storage.

Sometimes, a device already may be busy processing one task when it receives a request

to perform a second task.

For example, if a printer is printing a document when the operating system sends it a

request to print another document, the printer must store the second document in memory

until the first document has completed printing.

While waiting for devices to become idle, the operating system places items in buffers. A

buffer is a segment of memory or storage in which items are placed while waiting to be

transferred from an input device or to an output device.

Page 20: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Coordinating Tasks

An operating system commonly uses buffers with printed documents. This process,

called spooling, sends documents to be printed to a buffer instead of sending them

immediately to the printer.

If a printer does not have its own internal memory or if its memory is full, the operating

system’s buffer holds the documents waiting to print while the printer prints from the

buffer at its own rate of speed.

By spooling documents to a buffer, the computer or mobile device’s processor can

continue interpreting and executing instructions while the printer prints. This allows users

to perform other activities on the computer while a printer is printing.

Multiple documents line up in a queue (pronounced Q) in the buffer. A program, called a

print spooler, intercepts documents to be printed from the operating system and places

them in the queue

Page 21: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Coordinating Tasks

Page 22: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Configuring Devices

A driver, short for device driver, is a small program that tells the operating system how to

communicate with a specific device.

Each device connected to a computer, such as a mouse, keyboard, monitor, printer, card

reader/writer, digital camera, webcam, portable media player, or smartphone, has its own

specialized set of commands and, thus, requires its own specific driver.

When you start a computer or connect a device via a USB port, the operating system loads

the device’s driver. Drivers must be installed for each connected device in order for the

device to function properly.

Today, most devices and operating systems support Plug and Play. Plug and Play means

the operating system automatically configures new devices as you install or connect them.

Page 23: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Monitoring Performance

Operating systems typically include a performance monitor.

A performance monitor is a program that assesses and reports information

about various computer resources and devices.

For example, users can monitor the processor, drives, network, and memory

usage.

The information in performance reports helps users and administrators identify a

problem with resources so that they can try to resolve any issues. If a computer

is running extremely slow, for example, the performance monitor may determine

that the computer’s memory is being used to its maximum. Thus, you might

consider installing additional memory in the computer.

Page 24: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Functions of an Operating System

Page 25: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

In an operating system software performs each of the function:

1. Process management: Process management helps OS to create and delete processes. It

also provides mechanisms for synchronization and communication among processes.

2. Memory management: Memory management module performs the task of allocation and de-

allocation of memory space to programs in need of this resources.

3. File management:- It manages all the file-related activities such as organization storage,

retrieval, naming, sharing, and protection of files.

4. Device Management: Device management keeps tracks of all devices. This module also

responsible for this task is known as the I/O controller. It also performs the task of allocation and

de-allocation of the devices.

5. I/O System Management: One of the main objects of any OS is to hide the uniqueness of

that hardware devices from the user.

Functions of an Operating System

Page 26: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Functions of an Operating System

6. Secondary-Storage Management: Systems have several levels of storage which includes

primary storage, secondary storage, and cache storage. Instructions and data must be stored in

primary storage or cache so that a running program can reference it.

7. Security:- Security module protects the data and information of a computer system against

malware threat and authorized access.

8. Command interpretation: This module is interpreting commands given by the and acting

system resources to process that commands.

9. Networking: A distributed system is a group of processors which do not share memory,

hardware devices, or a clock. The processors communicate with one another through the

network.

10. Job accounting: Keeping track of time & resource used by various job and users.

11. Communication management: Coordination and assignment of compilers, interpreters, and

another software resource of the various users of the computer systems.

Page 27: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Types of Operating system

1- Batch Operating System

Some computer processes are very lengthy and time-consuming. To speed the same process, a

job with a similar type of needs are batched together and run as a group.The user of a batch

operating system never directly interacts with the computer. In this type of OS, every user

prepares his or her job on an offline device like a punch card and submit it to the computer

operator.

2- Multi-Tasking/Time-sharing Operating systems

Time-sharing operating system enables people located at a different terminal(shell) to use a

single computer system at the same time. The processor time (CPU) which is shared among

multiple users is termed as time sharing.

3- Multiprocessor Operating systems

A Multiprocessor system consists of several processors that share a common physical memory.

Multiprocessor system provides higher computing power and speed. In multiprocessor system all

processors operate under single operating system. Multiplicity of the processors and how they

do act together are transparent to the others.

Page 28: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

4- Real time OS

It is defined as an operating system known to give maximum time for each of the critical operations that it

performs, like OS calls and interrupt handling. Examples: Scientific experiments, medical imaging systems,

industrial control systems, weapon systems, robots, air traffic control systems, etc.

5- Distributed Operating System

Distributed systems use many processors located in different machines to provide very fast computation to

its users.

6- Network Operating System

A Network Operating System runs on a server and provides the server the capability to manage data, users,

groups, security, applications, and other networking functions. 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 include,

Microsoft Windows Server 2012, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.

7- Mobile OS

Mobile operating systems are those OS which is especially that are designed to power smartphones, tablets,

and wearables devices. Some most famous mobile operating systems are Android and iOS, but others

include BlackBerry and watch OS.

Types of Operating system

Page 29: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Difference between Firmware and Operating System

Page 30: LECTURE No. 8 - WordPress.com · LECTURE No. 8 OPERATING SYSTEMS Prepared by : Engr. M. Nadeem An operating system (OS) is a set of programs that coordinate all the activities among

Difference between 32-Bit vs. 64 Bit Operating System