Overview of Operating System

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

9/15/2012

Overview of Operating System

What is Operating System

OS is system software, which may be viewed as collection of software consisting of procedures for operating the computer. It provides an environment for execution of programs (application software). Its an interface between user & computer.

9/15/2012

Computer Machine (Hardware)


Machine Language (Low Level Language)

Operating System
Human Understandable Language (High Level Language)

User / Programmer

Types of OS
Multiprogramming OS Multitasking/Multiprocessing Multiuser OS Time Sharing OS Real Time OS Distributed OS
4

9/15/2012

A Second Classification This Classification is based on the type of interface Operating System provides for the user to work in. Character User Interface (CUI)
The User has to type the commands on the command prompt to get the work completed. Ex. DOS, UNIX.

Graphical User Interface (GUI)


The User need not type any commands. He/She just point and clicks on the desired Icon to get the work done. Ex. Windows (9X, XP, NT, 2000), Linux.
5

Functions of OS

File Management Memory Management Process Management Device Management

9/15/2012

Types of Processing

Serial Processing
The job is processed at the time when it is submitted.

Batch Processing
The similar jobs are bunched together and are kept for processing at an later time.

End of Session
Queries???

9/15/2012

Data Representation

Lecture Outline
Number Systems
Binary, Octal, Hexadecimal

Representation of characters using codes Representation of Numbers


Integer, Floating Point, Binary Coded Decimal

Program Language and Data Types


10

9/15/2012

Data Representation?
Representation = Measurement Most things in the Real World actually exist as a single, continuously varying quantity Mass, Volume, Speed, Pressure, Temperature Easy to measure by representing it using a different thing that varies in the same way Eg. Pressure as the height of column
of mercury or as voltage produced by a pressure transducer

These are ANALOG measurements


11

Digital Representation
Convert ANALOG to DIGITAL measurement by using a scale of units DIGITAL measurements
In units a set of symbolic values - digits Values larger than any symbol in the set use sequence of digits Units, Tens, Hundreds Measured in discrete or whole units Difficult to measure something that is not a multiple of units in size. Eg Fractions

12

9/15/2012

Analog vs. Digital representation

13

Number Systems
Decimal number system Binary number system Hexadecimal number system Converting Negative numbers Character representation

14

9/15/2012

Number Systems - Decimal


The decimal system is a base-10 system. There are 10 distinct digits (0 to 9) to represent any quantity. For an n-digit number, the value that each digit represents depends on its weight or position. The weights are based on powers of 10.
1024 = 1*103 + 0*102 + 2*101 + 4*100 = 1000 + 20 + 4

15

Number Systems - Binary


The binary system is a base-2 system. There are 2 distinct digits (0 and 1) to represent any quantity. For an n-digit number, the value of a digit in each column depends on its position. The weights are based on powers of 2.
10112 = 1*23 + 0*22 + 1*21 + 1*20 =8+2+1 =1110

16

9/15/2012

Number Systems - Octal


Octal and hexadecimal systems provide a shorthand way to deal with the long strings of 1s and 0s in binary. Octal is base-8 system using the digits 0 to 7. To convert to decimal, you can again use a column weighted system
75128 = 7*83 + 5*82 + 1*81 + 2*80 = 391410

An octal number can easily be converted to binary by replacing each octal digit with the corresponding group of 3 binary digits 75128 = 1111010010102
17

Number Systems - Hexadecimal


Hexadecimal is a base-16 system. It contains the digits 0 to 9 and the letters A to F (16 digit values). The letters A to F represent the unit values 10 to 15. This system is often used in programming as a condensed form for binary numbers (0x00FF, 00FFh) To convert to decimal, use a weighted system with powers of 16.
18

9/15/2012

Number Systems - Hexadecimal


Conversion to binary is done the same way as octal to binary conversions. This time though the binary digits are organised into groups of 4. Conversion from binary to hexadecimal involves breaking the bits into groups of 4 and replacing them with the hexadecimal equivalent.
19

Decimal (base 10)


Uses positional representation Each digit corresponds to a power of 10 based on its position in the number The powers of 10 increment from 0, 1, 2, etc. as you move right to left
1,479 = 1 * 103 + 4 * 102 + 7 * 101 + 9 * 100

20

10

9/15/2012

Binary (base 2)
Two digits: 0, 1 To make the binary numbers more readable, the digits are often put in groups of 4
1010 = 1 * 23 + 0 * 22 + 1 * 21 + 0 * 20 =8+2 = 10 1100 1001 = 1 * 27 + 1 * 26 + 1 * 23 + 1 * 20 = 128 + 64 + 8 + 1 21 = 201

Octal Representation
Eight digits: 07 Shorter and easier to represent and store To make the binary numbers more readable, the digits are often put in groups of 4 Base 8 (octal number system)
123 = 1 * 82 + 2 * 81 + 3 * 160 = 1 * 64 + 2 * 8 + 3 * 1 = 64 + 16 + 3 22 = 83

11

9/15/2012

Hexadecimal (base 16)


Shorter & easier to read than binary 16 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F 0x often precedes hexadecimal numbers
0x123 = 1 * 162 + 2 * 161 + 3 * 160 = 1 * 256 + 2 * 16 + 3 * 1 = 256 + 32 + 3 = 291
23

Hexadecimal (base 16)


Another example
0xABC = A * 162 + B * 161 + C * 160 = 10 * 256 + 11 * 16 + 12 * 1 = 2560 + 176 + 12 = 2748

24

12

9/15/2012

Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 10000

Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
25

Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F 10

Decimal to BaseN Conversions


To convert from decimal to a different number base such as Octal, Binary or Hexadecimal involves repeated division by that number base Keep dividing until the quotient is zero Use the remainders in reverse order as the digits of the converted number

26

13

9/15/2012

Example
Decimal to Binary 1492 (decimal) = ??? (binary) Repeated Divide by 2

27

BaseN to Decimal Conversions


Multiply each digit by increasing powers of the base value and add the terms Example: 101102 = ??? (decimal)

28

14

9/15/2012

Converting
From binary or hex to decimal
Use positional representation as shown previously

From decimal to binary or hex


Keep dividing by 2 (or 16) Remainders give the digits, starting from lowest power

From binary to hex (or vice versa)

Replace each set of four binary digits by the corresponding hexadecimal digit (or vice versa)
29

From binary to Octal

Convert Decimal to Binary


22 decimal = 10110 binary Calculations: 2 |22 r. 0 2 |11 r. 1 2 | 5 r. 1 2 | 2 r. 0 2 | 1 r. 1 0
30

15

9/15/2012

Convert Decimal to Binary


22 decimal = 10110 binary Calculations: 1 0 1 1 0 32 16 8 4 2 1 22 6 2

31

Exercise
Value of 2001 in Binary, Octal and Hexadecimal

32

16

9/15/2012

Exercise
Conversion: Binary Octal Hexadecimal

33

Class Exercise
1. 2. 3. 4. 5. 6. Bin to dec: 1001 0011 Dec to bin: 105 Bin to hex: 0010 1110 1000 1011 Hex to bin: 0xFEDC Hex to dec: 0x10A Dec to hex: 165

34

17

You might also like