Operating system notes pdf

13
B.C.P.C. Department of Applied Science Prepared by Jasleen Kaur (A.P. in CSE Dept.) 1 UNIT-I (b) Working Knowledge of Computer System STRUCTURE OF THE CHAPTER Introduction to operating systems, Functions of operating systems, Features of dos and windows, Introduction to internet, features and its applications (assignment question) 1 WHAT IS OPERATING SYSTEM An operating System (OS) is an intermediary between users and computer hardware. It provides users an environment in which a user can execute programs conveniently and efficiently. In technical terms, it is a software which manages hardware. An operating System controls the allocation of resources and services such as memory, processors, devices and information. Definition: An operating system is a program that acts as an interface between the user and the computer hardware and controls the execution of all kinds of programs. Figure 1 Conceptual View of Operating System

Transcript of Operating system notes pdf

Page 1: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 1

UNIT-I (b) Working Knowledge of Computer System

STRUCTURE OF THE CHAPTER

Introduction to operating systems,

Functions of operating systems,

Features of dos and windows,

Introduction to internet, features and its applications (assignment question)

1 WHAT IS OPERATING SYSTEM

An operating System (OS) is an intermediary between users and computer hardware. It provides users an

environment in which a user can execute programs conveniently and efficiently. In technical terms, it is a

software which manages hardware. An operating System controls the allocation of resources and services

such as memory, processors, devices and information.

Definition:

An operating system is a program that acts as an interface between the user and the computer hardware

and controls the execution of all kinds of programs.

Figure 1 Conceptual View of Operating System

Page 2: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 2

Kernel: When an operating system is loaded into memory, the kernel loads first and remains in memory

until the operating system is shut down again. The kernel is responsible for low-level tasks such as disk

management, task management and memory management. The kernel provides and manages computer

resources (like CPU, memory, I/O devices), allowing other programs to run and use these resources. The

kernel also sets up memory address space for applications, loads files with application code into memory,

sets up the execution stack for programs and branches out to particular locations inside programs for

execution.

There are 5 types of kernels, namely, monolithic kernel, micro kernel, exo kernel, hybrid kernel (micro and

monolithic) and nano kernel.

1.1 VIEWS OF OPERATING SYSTEM

1.1.1 User's View

The user view of the computer varies by the interface being used.

1.1.1.1 Single User

Most computer users sit in front of a PC, consisting of a monitor, keyboard, mouse and system unit. Such

a system is designed for one user to monopolize its resources, to maximize the work that the user is

performing. In this case, the operating system is designed mostly for ease of use, with some attention

paid to performance, and none paid to resource utilization.

1.1.1.2 Multi User

Some users sit at a terminal connected to a mainframe or minicomputer. Other users are accessing the

same computer through other terminals. These users share resources and may exchange information. The

operating system is designed to maximize resource utilization.

Other users sit at workstations, connected to networks of other workstations and servers. These users

have dedicated resources at their disposal, but they also share resources such as networking and servers.

1.1.2 Systems View

We can view an operating system as a resource allocator. A computer system has many resources -

hardware and software - that may be required to solve a problem. The operating system acts as the

manager of these resources.

An operating system can also be viewed as a control program that manages the execution of user

programs to prevent errors and improper use of the computer. It is especially concerned with the

operation and control of I/O devices.

1.2 FUNCTIONS OF OPERATING SYSTEM Following are some of important functions of an operating System.

Memory Management

Process Management

Device Management

File Management

Page 3: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 3

Security

Control over system performance

Job accounting

Error detecting aids

Coordination between other software and users

i. Memory Management

Memory management refers to management of Primary Memory or Main Memory. Main memory is a

large array of words or bytes where each word or byte has its own address. Main memory provides a fast

storage that can be access directly by the CPU. So for a program to be executed, it must remain in the

main memory. A computer has four general types of memory. In order of speed, they are: high-speed

cache, main memory, secondary memory, and disk storage. The operating system must balance the needs

of each process with the different types of memory available.

Operating System does the following activities for memory management.

Keeps tracks of primary memory i.e. what part of it are in use by whom, what part are not in use.

In multiprogramming, OS decides which process will get memory when and how much.

Allocates the memory when the process requests it to do so.

De-allocates the memory when the process no longer needs it or has been terminated.

ii. Process Management

Fig 2. List of processes running on computer system. Process is a program in execution. That’s why all

processes are exe files.

Page 4: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 4

In multiprogramming environment, OS decides which process gets the processor when and how much

time. This function is called process scheduling. Operating System does the following activities for

processor management.

Keeps tracks of processor and status of process. Program responsible for this task is known as

traffic controller.

Allocates the processor (CPU) to a process.

De-allocates processor when process is no longer required.

iii. Device Management

OS manages device communication via their respective drivers. Operating System does the following

activities for device management.

Keeps tracks of all devices. Program responsible for this task is known as the I/O controller.

Decides which process gets the device when and for how much time.

Allocates the device in the efficient way.

De-allocates devices.

iv. File Management

A file system is normally organized into directories for easy navigation and usage. These directories may

contain files and other directions. Operating System does the following activities for file management.

Keeps track of information, location, uses, status etc. The collective facilities are often known as

file system.

Decides who gets the resources.

Allocates the resources.

De-allocates the resources.

v. Other Important Activities

Following are some of the important activities that Operating System does.

Security -- By means of password and similar other techniques, preventing unauthorized access

to programs and data.

Control over system performance -- Recording delays between request for a service and response

from the system.

Job accounting -- Keeping track of time and resources used by various jobs and users.

Error detecting aids -- Production of dumps, traces, error messages and other debugging and error

detecting aids.

Coordination between other software and users -- Coordination and assignment of compilers,

interpreters, assemblers and other software to the various users of the computer systems.

Operating System is also Known as the Resource Manager Means Operating System will Manages all the

Resources those are Attached to the System means all the Resource like Memory and Processor and all

the Input output Devices those are Attached to the System are Known as the Resources of the Computer

System and the Operating system will Manage all the Resources of the System. The Operating System will

identify at which Time the CPU will perform which Operation and in which Time the Memory is used by

which Programs. And which Input Device will respond to which Request of the user means When the Input

Page 5: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 5

and Output Devices are used by the which Programs. So this will manage all the Resources those are

attached to the Computer System.

Operating system also acts as Control Program. A Control Program manages the execution of user

programs to prevent errors and improper use of the computer. It is concerned with operation and control

of I/O devices.

1.3 MAIN POINTS ABOUT OPERATING SYSTEMS When you're downloading files, working on a spreadsheet and listening to music, your computer just

appears to be doing these things simultaneously. In reality, the computer is switching between processes

at extremely high speeds -- so high, you don't know it. While you're under the illusion that your CPU and

operating system have a hand in every pot, your programs are under the impression that they have

complete control of the operating system at any given moment.

So really, your operating system is designed to let the CPU deal with one thing at a time. But because it's

a computer and not a harried secretary, it can multitask so fast that the user wouldn't even know.

1.4 HOW OPERATING SYSTEM CONTROLS HARDWARE In order for the operating system to talk to your hardware, it needs drivers. Drivers teach the operating

system to interact with each bit of hardware. Graphics cards, sound cards, networking cards, USB

peripherals, and everything else you connect to your computer relies on drivers. The operating system

then uses these drivers to ensure correct operation of each device.

Driver is a program that controls a device. Every device, whether it be a printer, disk drive, or keyboard,

must have a driver program. Many drivers, such as the keyboard driver, come with the operating system.

For other devices, you may need to load a new driver when you connect the device to your computer. In

DOS systems, drivers are files with a.SYS extension. In Windows environments, drivers often have a .DRV

extension. Each device has its own set of specialized commands that only its driver knows.

Fig 3. List of Drivers installed in a computer

Page 6: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 6

You can check the drivers installed on your PC by searching for device manager. Under this option, you

will get the list of drivers installed. Like in above figure, the drivers for audio input and output are

Microphones and Speakers. By right clicking it, you can check its properties, its details, update your driver,

etc.

1.5 WHAT IF YOUR PC DON’T HAVE OPERATING SYSTEM If an operating system does all the things we know it does, it seems downright impossible for a computer

to exist without one.

In reality, the earliest computers didn't have operating systems; they were huge machines tasked with

one program at a time. For that reason, they didn't really need operating systems. In fact, the earliest

computers required a user to physically connect and disconnect wires from a plug board to retrieve

computations. But if you don't have an operating system, can you make your computer do anything?

Yes. But you have a lot of work to do. Without an operating system using and enforcing a standard,

systematic approach to running the computer, you're put in the position of writing code (or programs)

that must tell the computer exactly what to do. So if you want to type up a document in a word processing

program, you'd have to create from scratch code that tells your computer to respond to each character

pressed on your keyboard. Then you'd have to write a code that told the computer how those responses

must translate to a screen. You'd have to tell your computer how to draw the character you want! Think

of every single option or possibility your word processing program has. You'd have to write code for every

single one of those directly onto your hard drive.

1.6 EVOLUTION OF WINDOWS OPERATING SYSTEM

1. Windows 1

Working on MS-DOS was a little bit tough for the users because it dealt with playing with various

commands. Taking this into consideration, Microsoft announced its first edition of Windows on

1983. Microsoft released the first version (Windows 1.0) on 2nd November 1985. Now, instead of

seeing the boring black screen, the user can just move a mouse to point and manage clicks through

the screen. Drop-down menus, icons and dialog boxes made the programs easier to learn and use.

2. Windows 2.0

On December 9, 1987, Microsoft released the second version of Windows, the Windows 2.0. With

the improved speed, reliability and usability, computers now started becoming a part of daily life

for some workers. Desktop icons and use of keyboard shortcuts helped to speed up the work.

3. Windows 3.0

Page 7: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 7

After launching 2 booming versions of Windows, Microsoft made an announcement concerning

its third Operating System Windows 3.0 on 22th May 1990. This new Windows Operating System

was quite handsomely popular because of its sensible performance, advanced graphics with 16

colors, and improved icons. The 3.0 edition offered full support for the Intel 386 processor. In

Windows 3.0, the improved SDK helped software developers focus more on writing programs and

less on writing device drivers. Program Manager, File Manager, Print Manager were some of the

features that got place in this edition.

4. Windows 3.1

After launching version 3.0, Microsoft launched next version Windows 3.1 which was named as

Windows NT (means New Technology). It was produced for servers and workstations. It

introduced the concept of APIs (Application Programming Interface), numerous network features,

pre-emptive multitasking concept.

5. Windows 95

Released on August 24, 1995, this was the first Operating System to have a Start button and a

Start Menu. This era of Windows made the foundation for emails, fax/modems and multimedia

games.

6. Windows 98

The major improvements that came up with this system are: functionality to open and close

programs more quickly, and support for reading DVD discs and universal serial bus (USB) devices.

7. Windows ME

ME here stands for Millennium Edition. This edition of Windows was rushed into the market on

September 2000. It had features like Internet Explorer 5.5, Windows Media Player 7, and the new

Windows Movie Maker software, which provided basic video editing and was designed to be easy

to use.

8. Windows XP

With the marathon journey of 6 years, Windows XP is one of the best-selling Operating System

and is still used at some parts of the globe. On October 25, 2001, Microsoft released Windows

XP with a rejuvenated look and feel that focused on usability and a centered Help and support

center. Awareness about the computer viruses and hackers increases, but due to online delivery

of security updates, there was calmness to a certain extent.

In addition, Navigation simplicity of the Start menu, taskbar, and Control Panel are more intuitive

in this edition of Windows.

9. Windows Vista

Windows Vista was released in 2006. This version was centered around security norms. User

Account Control helps prevent potentially harmful software from making changes to your

computer. In Windows Vista Ultimate, BitLocker Drive Encryption provides better data protection.

Many features like the taskbar, borders around Windows get a brand new look. Search gets new

emphasis and helps people find files on their PCs faster.

10. Windows 7

Released on 22 Oct 2009, it had various features like increased performance, redesigned look and

feel, touch and handwriting recognition, support for virtual hard disks, Direct Access, and kernel

improvements.

11. Windows 8 (Generation of Apps and Tiles)

Page 8: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 8

On October 2012, Microsoft launched the Windows 8 edition, the most colorful and good-looking

Operating System. Microsoft came up with a totally new interface that smartly worked on both

the touch and on mouse and keyboard. The start menu was revised in this edition with apps and

tiles that connect to people, files and websites.

12. Windows 10

The recent addition to the windows family is Windows 10. It was introduced to the world on 29

July 2015. A number of new features like Cortana, the Microsoft Edge, The Start menu, Windowed

Windows Store apps, Virtual desktops/Task View, Action Center, Revamped core apps, The Xbox

app, Continuum, Unified settings etc made their existence in this latest edition. Microsoft Edge is

the new Web browser of Windows 10 which is specially designed to be a lightweight web browser.

2 DISK OPERATING SYSTEM

DOS was the first operating system used by IBM-compatible computers. It was originally available in two

versions that were essentially the same, but marketed under two different names. "PC-DOS" was the

version developed by IBM and sold to the first IBM-compatible manufacturers. "MS-DOS" was the version

that Microsoft bought the rights to, and was bundled with the first versions of Windows. The first versions

of Windows (through Windows 95) actually ran on top of the DOS operating system. This is why so many

DOS-related files (such as .INI, .DLL, and .COM files) are still used by Windows. However, the Windows

operating system was rewritten for Windows NT (New Technology), which enabled Windows to run on its

own, without using DOS. Later versions of Windows, such as Windows 2000, XP, and Vista, also do not

require DOS.

DOS uses a command line, or text-based interface, that allows the user to type commands.

By typing simple instructions such as pwd (print working directory) and cd (change directory), the

user can browse the files on the hard drive, open files, and run programs.

While the commands are simple to type, the user must know the basic commands in order to use

DOS effectively (similar to Unix). This made the operating system difficult for novices to use, which

is why Microsoft later bundled the graphic-based Windows operating system with DOS.

DOS is still included with Windows, but is run from the Windows operating system instead of the

other way around.

The DOS command prompt can be opened in Windows by selecting "Run..." from the Start Menu

and typing cmd.

DOS translate the command issued by the user in the format that is understandable by the

computer and instruct computer to work accordingly.

It also translates the result and any error message in the format for the user to understand.

2.1 LOADING OF DOS The BOOT Record into the computer memory loads DOS. BOOT Record in turn is triggered by ROM

program already there in the computer.

The system start-up routine of ROM runs a reliability test called Power On Self Test (POST) which

initializes the chips and the standard equipment attached to the PC, and check whether

peripherals connected to the computer are working or not.

Then it tests the RAM memory.

Page 9: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 9

Once this process is over, the ROM bootstrap loader attempts to read the Boot record and if

successful, passes the control on to it.

The instructions/programs in the boot record then load the rest of the program.

After the ROM boot strap loader turns the control over to boot record, the boot tries to load

the DOS into the memory by reading the two hidden files IBMBIO.COM and IBMDOS.COM.

If these two are found, they are loaded along with the DOS command interpreter

COMMAND.COM. COMMAND.COM contains routines that interpret what is typed in through the

keyboard in the DOS command mode.

By comparing the input with the list of command, it acts by executing the required

routines/commands or by searching for the required routine utility and loads it into the memory.

2.2 WHAT IS BOOTING When the computer is switched on, the firmware program in Read Only Memory(ROM) also called Basic

Input-Output System(BIOS) reads programs and data i.e. Operating System and loads it into memory

(RAM). This process is known Boot-strapping (Booting). The OS once loaded takes control of the computer,

handles user interaction and executes application programs.

2.3 BASIC DOS COMMANDS

a) Directory Commands:

DIR: To list all or specific files of any directory on a specified disk.

Fig 4. dir command lists all the directories in the current drive

Page 10: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 10

MD or MKDIR: To make directory or subdirectory on a specified disk/drive.

Fig 5. Creating a new folder using mkdir command

CD or CHDIR: Change DOS current working directory to specified directory on specified disk or to check

for the current directory on the specified or default drive.

RMDIR or RD: Removes a specified sub-directory only when it is empty. This command cannot remove

root directory (C:\) or current working directory. Example: rmdir cse8cse11

This command will delete the folder with name csecse11.

TREE: Displays all of the directory paths found on the specified drive.

PATH: Displays or sets a sequential search path for the executable files.

Page 11: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 11

b) File Management Commands:

COPY: Copies one or more files from source disk/drive to the specified disk/drive.

DEL: Removes specified files from specified disk/drive.

REN: Changes the name of a file (Renaming).

ATTRIB: Sets or shows file attributes (read, write, hidden, Archive).

BACKUP: Stores or back up one or more files/directories from source disk/drive to other destination

disk/drive.

RESTORE: Restores files that were backed up using BACKUP command.

EDIT: Provides a full screen editor to create or edit a text file.

FORMAT: Formats a disk/drive for data storage and use.

c) General Commands:

TIME: sets or displays the system time.

DATE: Sets or displays system date.

CLS: To clear the screen.

VER: To check the version of Operating System installed.

If a user require help on any DOS commands he/she may type help and command name at the command

prompt.

Figure 6. DOS emulator

Page 12: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 12

DOSBox emulates an IBM PC compatible computer running a DOS operating system. Many IBM PC

compatible graphics and sound cards are also emulated. This means that original DOS programs (including

PC games) are provided an environment in which they can run correctly, even though the modern

computers have dropped support for that old environment.

An DOS operating system is called a "disk" operating system because it was stored on a floppy disk or hard

drive, as opposed to either being embedded in a ROM chip (like early versions of Mac OS were), or stored

on a cartridge, cassette, tape reel, or some other storage medium. The usage fell out of favor due to the

popularity of MS-DOS: "DOS" was thereafter used to refer only to MS-DOS or compatible operating

systems. Also the command prompt in Windows is MS-DOS.

2.4 WINDOWS FEATURES 1) Windows Easy Transfer:

One of the first things you might want to do is to transfer your files and settings from your old computer

to the brand new computer. You can do this using an Easy Transfer able, CDs or DVDs, a USB flash drive,

a network folder, or an external hard disk. You can transfer almost everything from your old computer to

the new one. User accounts, Files and Folders, Program Settings, Internet Settings and Favorites, E-mail

settings, contacts and messages.

2) Windows Anytime Upgrade:

This feature of Windows Operating System allows you to upgrade to any higher windows version available

for your system, so you can take full advantage of enhanced digital entertainment and other features.

Windows anytime upgrade helps you compare features in each Windows edition and walks you through

the upgrade process. (Windows 8 being the latest Operating system currently available for all the user

worldwide). The upgrade will cost you as per the version being selected by you.

3) Windows Basics:

If you are new to Windows or want to refresh your knowledge about areas such as security or working

with digital pictures, this features will help you to get started. Here you can learn how to help keep your

computer more secure, work with digital pictures, use the mouse and keyboard, work with files and

programs, use email, connect to and explore the internet and many more. A new user can even see video

or animations that will explain the working of the windows operating system and will show you step by

step instructions in order to configure your pc according to your desires.

4) Searching and Organizing:

Most folders in Windows have a search box in the upper- right corner. To find a file in a folder, type a part

of the file name in the search box. You can also use this feature when you don't know where a files is

actually located or when you want to do an advanced search. Since its will be an indexed searching the

results will be very quick and very close to your search entries.

5) Parental Controls:

Page 13: Operating system notes pdf

B.C.P.C. Department of Applied Science

Prepared by Jasleen Kaur (A.P. in CSE Dept.) 13

Parental Controls give you the means to decide when your children use the computer, which website they

visit, and which games they are allowed to play. You can also get reports of your children's computer

activity as well.

6) Ease of Access Center:

Ease of Access Center is the place to find and change settings that can enhance how you hear, see and

use your computer. You can adjust text size and the speed of your mouse. This is also where you can go

to set up your screen reader and find other helpful tools.

7) Default Programs:

This is a features of your Windows Operating System where you can adjust and set your default programs,

associate a file type or a protocol with a program, change and set auto play settings, set program access

and computer defaults.

8) Remote Desktop Connection:

This features helps a user with a graphical user interface to another computer. It is a proprietary protocol

developed by Microsoft especially for Windows Operating System. Basically by entering the IP address of

the other computer you can directly see that computer's desktop right on to your desktop. Normally

known as desktop sharing. Using this you can share files and data and even solve problem without having

physical access to the other computer.

Ques: Write the differences between Windows and DOS Operating System.