0% found this document useful (0 votes)
71 views

Unit-I Notes PPS

The document discusses the six basic components of a computer system: 1. The input unit accepts instructions and data from outside and converts it to a computer readable format. 2. The output unit converts results from computer code to a human readable format and provides it outside. 3. The storage unit stores data, instructions, intermediate and final results. 4. The central processing unit (CPU) controls all internal and external devices and performs arithmetic and logical operations. It consists of the control unit and arithmetic logic unit (ALU). 5. The ALU is where actual computations take place through arithmetic and comparison operations on data from memory or registers. 6. The control unit directs and coordinates all the

Uploaded by

Abhir999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Unit-I Notes PPS

The document discusses the six basic components of a computer system: 1. The input unit accepts instructions and data from outside and converts it to a computer readable format. 2. The output unit converts results from computer code to a human readable format and provides it outside. 3. The storage unit stores data, instructions, intermediate and final results. 4. The central processing unit (CPU) controls all internal and external devices and performs arithmetic and logical operations. It consists of the control unit and arithmetic logic unit (ALU). 5. The ALU is where actual computations take place through arithmetic and comparison operations on data from memory or registers. 6. The control unit directs and coordinates all the

Uploaded by

Abhir999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Subject :PPS NOTES ON UNIT-I

1 COMPONENTS OF A COMPUTER SYSTEM:-


The internal architectural design of computers differs from one system model to another. However, the
basic organization remains the same for all computer systems. The following Six units (also called “The
functional units”) correspond to the Six basic operations performed by all computer systems.

There are Six basic components of a Computer System:-

1. Input Unit
2. Output Unit
3. Storage Unit
4. Central Processing Unit (CPU)
5. Arithmetic and Logic Unit (ALU)
6. Control Unit

1.1 INPUT UNIT


Data and instructions must enter the computer system before any computation can be performed on the
supplied data. The input unit that links the external environment with the computer system performs this
task. Data and instructions enter input units in forms that depend upon the particular device used. For
example, data is entered from a keyboard in a manner similar to typing, and this differs from the way in
which data is entered through a mouse, which is another type of input device. However, regardless of the
form in which they receive their inputs, all input devices must provide a computer with data that are
transformed into the binary codes that the primary memory of the computer is designed to accept. This
transformation is accomplished by units that called input interfaces. Input interfaces are designed to
match the unique physical or electrical characteristics of input devices to the requirements of the
computer system.

In short, an input unit performs the following functions.

 It accepts (or reads) the list of instructions and data from the outside world.
 It converts these instructions and data in computer acceptable format.
 It supplies the converted instructions and data to the computer system for further processing.

1.2 OUTPUT UNIT


The job of an output unit is just the reverse of that of an input unit. It supplied information and results of
computation to the outside world. Thus it links the computer with the external environment. As
computers work with binary code, the results produced are also in the binary form. Hence, before
supplying the results to the outside world, it must be converted to human acceptable (readable) form.
This task is accomplished by units called output interfaces.

In short, the following functions are performed by an output unit.

 It accepts the results produced by the computer which are in coded form and hence cannot be
easily understood by us.
 It converts these coded results to human acceptable (readable) form.
 It supplied the converted results to the outside world.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
1.3 STORAGE UNIT

The data and instructions that are entered into the computer system through input units have to be stored
inside the computer before the actual processing starts. Similarly, the results produced by the computer
after processing must also be kept somewhere inside the computer system before being passed on to the
output units. Moreover, the intermediate results produced by the computer must also be preserved for
ongoing processing. The Storage Unit or the primary / main storage of a computer system is designed to
do all these things. It provides space for storing data and instructions, space for intermediate results and
also space for the final results.

In short, the specific functions of the storage unit are to store:


 All the data to be processed and the instruction required for processing (received from input
devices).
 Intermediate results of processing.
 Final results of processing before these results are released to an output device.

1.4 CENTRAL PROCESSING UNIT

The main unit inside the computer is the CPU. This unit is responsible for all events inside the computer.
It controls all internal and external devices, performs “Arithmetic and Logical operations”. The operations
a Microprocessor performs are called “instruction set” of this processor. The instruction set is “hard
wired” in the CPU and determines the machine language for the CPU. The more complicated the
instruction set is, the slower the CPU works. Processors differed from one another by the instruction set.
If the same program can run on two different computer brands they are said to be compatible. Programs
written for IBM compatible computers will not run on Apple computers because these two architectures
are not compatible.

The control Unit and the Arithmetic and Logic unit of a computer system are jointly known as the Central
Processing Unit (CPU). The CPU is the brain of any computer system. In a human body, all major
decisions are taken by the brain and the other parts of the body function as directed by the brain.
Similarly, in a computer system, all major calculations and comparisons are made inside the CPU and
the CPU is also responsible for activating and controlling the operations of other units of a computer
system.

1.5 ARITHMETIC AND LOGIC UNIT (ALU)

The arithmetic and logic unit (ALU) of a computer system is the place where the actual execution of the
instructions take place during the processing operations. All calculations are performed and all
comparisons (decisions) are made in the ALU. The data and instructions, stored in the primary storage
prior to processing are transferred as and when needed to the ALU where processing takes place. No
processing is done in the primary storage unit. Intermediate results generated in the ALU are temporarily
transferred back to the primary storage until needed at a later time. Data may thus move from primary
storage to ALU and back again as storage many times before the processing is over. After the completion
of processing, the final results which are stored in the storage unit are released to an output device.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
The arithmetic and logic unit (ALU) is the part where actual computations take place. It consists of
circuits that perform arithmetic operations (e.g. addition, subtraction, multiplication, division over data
received from memory and capable to compare numbers (less than, equal to, or greater than).

While performing these operations the ALU takes data from the temporary storage are inside the CPU
named registers. Registers are a group of cells used for memory addressing, data manipulation and
processing. Some of the registers are general purpose and some are reserved for certain functions. It is a
high-speed memory which holds only data from immediate processing and results of this processing. If
these results are not needed for the next instruction, they are sent back to the main memory and registers
are occupied by the new data used in the next instruction.

All activities in the computer system are composed of thousands of individual steps. These steps should
follow in some order in fixed intervals of time. These intervals are generated by the Clock Unit. Every
operation within the CPU takes place at the clock pulse. No operation, regardless of how simple, can be
performed in less time than transpires between ticks of this clock. But some operations required more
than one clock pulse. The faster the clock runs, the faster the computer performs. The clock rate is
measured in megahertz (Mhz) or Gigahertz (Ghz). Larger systems are even faster. In older systems the
clock unit is external to the microprocessor and resides on a separate chip. In most modern
microprocessors the clock is usually incorporated within the CPU.

1.6 CONTROL UNIT

How the input device knows that it is time for it to feed data into the storage unit? How does the ALU
know what should be done with the data once it is received? And how is it that only the final results are
sent to the output devices and not the intermediate results? All this is possible because of the control unit
of the computer system. By selecting, interpreting, and seeing to the execution of the program
instructions, the control unit is able to maintain order and directs the operation of the entire system.
Although, it does not perform any actual processing on the data, the control unit acts as a central nervous
system for the other components of the computer. It manages and coordinates the entire computer
system. It obtains instructions from the program stored in main memory, interprets the instructions, and
issues signals that cause other units of the system to execute them.

The control unit directs and controls the activities of the internal and external devices. It interprets the
instructions fetched into the computer, determines what data, if any, are needed, where it is stored,
where to store the results of the operation, and sends the control signals to the devices involved in the
execution of the instructions.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
2 MEMORY IN COMPUTERS

Computer memory is any physical device capable of storing information temporarily like RAM
(random access memory), or permanently, like ROM (read-only memory). Memory devices utilize
integrated circuits and are used by operating systems, software, and hardware.
Memory in computers is basically divided into two parts:-

2.1 PRIMARY MEMORY


a. RAM
i. EDO RAM
ii. SDRAM
SDRAM, which is short for Synchronous DRAM, is a type of memory that
synchronizes itself with the computer's system clock. Being synchronized allows
the memory to run at higher speeds than previous memory types and
asynchronous DRAM and also supports up to 133 MHz system bus cycling. Since
1993, this is the prevalent type of memory used in computers around the world.
In the picture below is an example of a SDRAM DIMM. The original type, named
SDRAM, up to the current type, DDR3, are all derivatives of the SDRAM memory
type. Figure of SDRAM of 256 MB given below:-

iii. DDR RAM


iv. DDR2 RAM
v. DDR3 RAM
vi. DDR4 RAM
Short for double data rate four, DDR4 is a type of system memory known as
SDRAM and was released in September 2014 as the successor to DDR3. DDR4 has
bus clock speeds that range from 800 to 1600 MHz and range in storage capacity
from 4 to 128 GB per DIMM. DDR4 is also more efficient at 1.2 V when compared
to DDR3's 1.5 to 1.65 V range. Figure of DDR4 4GB RAM given below:-

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
b. ROM
i. PROM – Programmable Read only memory
ii. EPROM – Erasable Programmable Read only Memory
iii. EEPROM
Short for electrically erasable programmable read-only memory, EEPROM is a
PROM that can be erased and reprogrammed using an electrical charge. EEPROM
was developed by George Perlegos while at Intel in 1978 and unlike most memory
inside a computer, this memory remembers data when the power is turned off.
EEPROM was a replacement for PROM and EPROM chips and is used for later
computer's BIOS that were built after 1994. Having a computer with an EEPROM
allows a computer user to update the BIOS in their computer without having to
open the computer or remove any chips. Figure of EEPROM given below:-

2.1 SECONDARY MEMORY

Alternatively referred to as external memory, secondary memory, and auxiliary storage, a


secondary storage device is a non-volatile device that holds data until it is deleted or overwritten.
Secondary storage is about two orders of magnitude cheaper than primary storage. Consequently,
a hard drive or an additional, slower SSD may used as secondary storage to a primary, faster, PCIe
SSD.
Examples of secondary storage
2.1.1 Hard drive:
o A hard disk drive (sometimes abbreviated as hard drive, HD, or HDD) is a non-volatile
memory hardware device that permanently stores and retrieves data on a computer. A
hard drive is a secondary storage device that consists of one or more platters to which
data is written using a magnetic head, all inside of an air-sealed casing. Internal hard disks
reside in a drive bay, connect to the motherboard using an ATA, SCSI, or SATA cable, and
are powered by a connection to the PSU (power supply unit).
o All computers have a hard drive installed in them, which is used to store files for the
operating system, software programs, and a user's personal files. A computer cannot
function without a hard drive installed, as it requires one to function properly. Figure
below shows how a hard disk looks and how it looks inside a hard disk.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I

2.1.2 Solid-state drive


o Short for solid-state drive (or solid-state disk, although it doesn't use a disk mechanism),
an SSD is a storage medium that uses non-volatile memory as a means of holding and
accessing data. Unlike a hard drive, an SSD has no moving parts which gives it advantages
such as faster access time, noiseless operation, higher reliability, and lower power
consumption.
o As the costs have come down, SSDs have become suitable replacements for a standard
hard drive in both desktop and laptop computers. SSDs are also a great solution for
netbooks, nettops, and other applications that don't require a lot of storage. Figure below
shows an SSD.

2.1.3 USB thumb drive


o Alternatively referred to as a USB flash drive, data stick, pen
drive, memory unit, keychain drive and thumb drive, a jump
drive is a portable storage device. It is often the size of a human
thumb (hence the name), and connects to a computer via a USB
port. Flash drives are an easy way to store and transfer
information between computers and range in sizes from 2 GB
to 1 TB.
o Unlike a standard hard drive, the flash drive has no movable
parts; it contains only an integrated circuit memory chip that is
used to store data. Flash drives usually have plastic or
aluminum casings surrounding the memory chip. Figure here
shows USB flash drive.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I

2.1.4 SD card
2.1.5 CD
2.1.6 DVD
2.1.7 Floppy diskette – Figure below shows a floppy drive & inside a floppy drive

2.1.8 Tape drive


a) A tape is a magnetically thin coated piece of plastic wrapped around wheels capable of
storing data. Tape is less expensive than other storage mediums, but it is a much slower
solution because it is sequential access and is often used for backing up large amounts of
data.
b) Today, tape has mostly been abandoned for faster and more reliable solutions like disc
drives, hard drives, and flash drives that are all direct access and cloud storage.

3. PROCESSOR IN A COMPUTER
A processor (CPU) is the logic circuitry that responds to and processes the basic instructions that drive a
computer. The CPU is seen as the main and most crucial integrated circuitry (IC) chip in a computer, as it
is responsible for interpreting most of computers commands. CPUs will perform most basic arithmetic,
logic and I/O operations, as well as allocate commands for other chips and components running in a
computer.
The term processor is used interchangeably with the term central processing unit (CPU), although strictly
speaking, the CPU is not the only processor in a computer. The GPU (graphics processing unit) is the most
notable example, but the hard drive and other devices within a computer also perform some processing
independently. Nevertheless, the term processor is generally understood to mean the CPU.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
Processors can be found in PCs, smartphones, tablets and other computers. The two main competitors
in the processor market are Intel and AMD. Figure below shows a i-3 processor.

3.1 THE BASIC ELEMENTS OF A PROCESSOR


The basic elements of a processor include:
3.1.1 The arithmetic logic unit (ALU), which carries out arithmetic and logic operations on the operands
in instructions. Below is the figure for ALU

3.1.2 The floating point unit (FPU), also known


as a math coprocessor or numeric coprocessor, a
specialized coprocessor that manipulates numbers
more quickly than the basic microprocessor
circuitry can.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
3.1.3 Registers which hold instructions and other data. Registers supply operands to the ALU and
store the results of operations.

3.1.4 L1 and L2cache memory: Their inclusion in the CPU saves time compared to having to get data
from random access memory (RAM). Figure shows L1 & L2 cache attachment below:

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
4.1 CPU OPERATIONS
The four primary functions of a processor are 1) fetch, 2) decode, 3) execute and 4) write back. The
figure shows the various functions.

4.1.1 Fetch- is the operation which receives instructions from program memory from a systems RAM.
4.1.2 Decode- is where the instruction is converted to understand which other parts of the CPU are
needed to continue the operation. This is performed by the instruction decoder
4.1.3 Execute- is where the operation is performed. Each part of the CPU that is needed is activated
to carry out the instructions.

4.2 COMPONENTS AND HOW CPUS WORK


The main components of a CPU are the ALU, registers and control unit. The basic functions of the ALU
and register are labeled in the above “basic elements of a processor section.” The control unit is what
operates the fetching and execution of instructions.

The processor in a personal computer or embedded in small devices is often called a microprocessor.
That term means that the processor's elements are contained in a single IC chip. Some computers will
operate using a multi-core processor—a chip containing more than one CPU. A CPU is typically a small
device with pins on it facing down in a motherboard. CPUs can also be attached to a motherboard with a
heat sink and a fan to dissipate heat.
4.2.1 TYPES OF PROCESSORS

Every PC has a Central Processing Unit (CPU) this acts as the brain of your system. It connects to the
Motherboard and works alongside the other components processing many instructions at the same time
between the different hardware and memory systems.

Advancements in CPU technology now mean systems typically come at least Dual Core, Quad Core or
more processors (on one single chip) instead of the traditional one core per chip. Now the total number
of Cores can slot into a socket as before and a single heat sink and fan can keep everything to the right
temperature.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
Most processors today are multi-core, which means that the IC contains two or more processors for
enhanced performance, reduced power consumption and more efficient simultaneous processing of
multiple tasks (see: parallel processing). Multi-core set-ups are similar to having multiple, separate
processors installed in the same computer, but because the processors are actually plugged into the
same socket, the connection between them is faster.

Intel Pentium Dual Core Processors

The Intel Pentium processors with Intel dual-core technology deliver great desktop performance, low
power enhancements, and multitasking for everyday computing.

Intel Dual Core i3 CPU Logo Intel i3 Processors (Ivy Bridge)

Intel Core i3 dual core processors provide 4-way multitasking capability, runs at fixed speed ideal for
typical tasks and media playback but not games.

Intel Dual Core i5 CPU Logo Intel i5 Processors

Intel i5 usually quad core but some dual processors deliver the next level of productivity. Mostly the
same as i3 but with Intel Turbo Boost Technology, delivers extra speed when you need it. Like the i3
integrated graphics is included but is only ideal for normal use not for gaming.

Intel Dual Core i7 CPU Logo Intel i7 Processors

Intel i7 processors dual or quad core for the most demanding applications with cache and faster clock
speeds. Quad-core processors feature 8-way threading, four cores will run faster, and more L3 cache,
but will consume more power. High-end use, video and gaming with dedicated video card.

4.3 PROGRAM EXECUTION IN THE CPU


You may be wondering how the CPU is programmed. It contains a special register—the instruction
register—whose bit pattern determines what the CPU will do. Once that action has been completed, the
bit pattern in the instruction register can be changed, and the CPU will perform the operation specified
by this next bit pattern.

Most modern CPUs use an instruction queue. Several instructions are waiting in the queue, ready to be
executed. Separate electronic circuitry keeps the instruction queue full while the control unit is executing
the instructions. But this is simply an implementation detail that allows the control unit to run faster. The
essence of how the control unit executes a program is represented by the single instruction register
model.

Since instructions are simply bit patterns, they can be stored in memory. The instruction pointer register
always has the memory address of (points to) the next instruction to be executed. In order for the control
unit to execute this instruction, it is copied into the instruction register.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
The situation is as follows:
 A sequence of instructions is stored in memory.
 The memory address where the first instruction is located is copied to the program counter.
 The CPU sends the address in the program counter to memory via the address bus.
 Memory responds by sending a copy of the state of the bits at that memory location on the data
bus, which the CPU then copies into its instruction register.
 The instruction pointer is automatically incremented to contain the address of the next
instruction in memory.
 The CPU executes the instruction in the instruction register.

The above execution raises following questions:-


4.4 HOW DO WE GET THE INSTRUCTIONS INTO MEMORY?
The instructions for a program are stored in a file on a storage device; for example, a disk, device memory,
or an SD card. The computer system is controlled by an operating system. When you indicate to the
operating system that you wish to execute a program, e.g., by tapping on its icon on a touch screen, the
operating system locates a region of memory large enough to hold the instructions in the program, and
then copies them from the file to memory. The contents in the file remain unchanged.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
5. HOW DO WE CREATE A FILE ON THE DISK THAT CONTAINS THE INSTRUCTIONS?
(WRITING A PROGRAM IN A COMPUTER?)

This is a multi-step process using several programs. The programs and the files that each create
are:
1) An editor is used to create source files. (As you have done in C Programming Editor by
writing a program)
The source file is written in a programming language, e.g., C/C++. This is very similar to
creating a file with a word processor. The main difference is that an editor is based on
plain characters, while a word processor formats the text. You see all the characters that
you type in an editor, but a word processor includes many hidden formatting codes that
define things like paragraphs, bold font, etc.
2) A compiler or assembler is used to create object files. (In C a .obj file is created)
The compiler or assembler translates the programming language in a source file into the
bit patterns that can be used by a CPU (machine language). The source file contents
remains unchanged.
3) A linker is used to create an executable file. (In c a .exe file is created)
Most programs are made up of several object files. For example, a GNU/Linux installation
includes many object files that contain the machine instructions to perform common
tasks. These are programs that have already been written and compiled. Related tasks
are commonly grouped together into a single file called a library.
4) In-built Library functions: - Whenever possible, you should use the short programs in
these libraries to perform the computations your program needs rather that write it
yourself. The linker program will merge the machine code from these several object files
into one executable file.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
6 OPERATING SYSTEM
6.1 DEFINITION: It is a software that works as an interface between a user and the computer
hardware. The primary objective of an operating system is to make computer system
convenient to use and to utilize computer hardware in an efficient manner. The operating
system performs the basic tasks such as receiving input from the keyboard, processing
instructions and sending output to the screen.
6.2 WHAT IS AN OPERATING SYSTEM?
The Software is the Non-Touchable Parts of the Computer , and Software’s are those
which are used for Performing an Operation So that Software’s are just used for Making
an Application but hardware’s are those which are used for Performing an Operation .
Operating system is software that is required in order to run application programs and
utilities. It works as a bridge to perform better interaction between application programs
and hardware of the computer. Examples of operating system are UNIX, MS-DOS, MS-
Windows - 98/XP/Vista, Windows-NT/2000, OS/2 and Mac OS.
6.3 FUNCTIONS OF OPERATING SYSTEM
Operating System Means that Resource Manager, that manage all the Resources those
are Attached to the System, Memory, Processor, Input/output Devices.
Storage Management: It manage all the Storing and Accessing Files and Directories
Reading/Writing Operations.
Operating system
 Manages overall activities of a computer and the input/output devices attached
to the computer.
 It is the first software you see when you turn on the computer, and the last
software you see when the computer is turned off.
 It is the software that enables all the programs you use. At the simplest level, an
operating system does two things:
 The First is - it manages the hardware and software resources of the computer
system. These resources include the processor, memory, disk space, etc.
 The second, it provides a stable, consistent way for applications to deal with the
hardware without having-to know all the details of the hardware.
6.4 HOW OPERATING SYSTEM WORK
When you turn on the computer, the operating system program is loaded into the main
memory. This program is called the kernel. Once initialized, the system program is
prepared to run the user programs and permits them to use the hardware efficiently.
Windows 98/XP is an excellent example that supports different types of hardware
configurations from thousands of vendors and accommodates thousands of different I/O
devices like printers, disk drives, scanners and cameras.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
6.5 CLASSIFICATION OF OPERATING SYSTEM
Operating systems may be classified based on if multiple tasks can be performed
simultaneously, and if the system can be used by multiple users. It can be termed as
single-user or multi-user OS, and single-tasking or multi-tasking OS.
A multi-user system must be multi-tasking. MS-DOS and Windows 3x are examples of
single user operating system. Whereas UNIX is an example of multi-user and multitasking
operating system.
For Example if we want to Perform Some Paintings on the Screen, then we must use the
Application Software as Paint and Hardware as a Mouse for Drawing an Object. But how
the System knows what to do when Mouse Moves on the Screen and When the Mouse
Draws a Line on the System so that Operating System is Necessary which Interact between
or which Communicates with the Hardware and the Software. For Better understanding
you can see the Working of the Operating System.

The first task is very important i.e. managing the hardware and software resources, as
various processes compete to each other for getting the CPU time and memory space to
complete the task. In this regard; the operating system acts as a manager to allocate the
available resources to 'satisfy the requirements of each process.

The second task i.e. providing a consistent application interface is especially important.
A consistent application program interface (API) allows a user (or S/W developer) to write
an application program on any computer and to run this program on another computer,
even if the hardware configuration is different like as amount of memory, type of CPU or
storage disk. It shields the user of the machine from the low-level details of the machine's
operation and provides frequently needed facilities.

Process Management:It manage all the User and system Process.


Memory Management: Operating System also Manages the Computer Memory that is
provided to the process.
Extended Machine: It is behaves like an Extended Machine that Provides us Sharing of
Files between Multiple Users.
Mastermind: It performs Many Functions that's why we can say that Operating System is
a Mastermind.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
6.6 DIFFERENT TYPES OF OPERATING SYSTEM
There are different types of operating system those are organized by their Working.
Serial Processing:In Serial Processing operating system that use FIFO (First in First Out)
technique for processing the process.
Batch Processing:In batch processing a similar type of jobs prepared and processed.
Multi-Programming:In Multi programming Operating System Multiple Programs are
Executed on the System at a Time.
Real Time System: Real Time System are used there Requires higher and Timely
Response.
Distributed Operating System: In this Operating system Data is Stored and Processed on
Multiple Locations.
Multiprocessing: In This type of operating system there are two or More CPU in a Single
OS.
Parallel operating systems: It manage parallely all running resources of the computer
system.

6.7 CHARACTERISTICS OF OPERATING SYSTEM

1) Operating System is a Collection of Programs those are Responsible for the


Execution of other Programs.
2) Operating System is that which is Responsible for Controlling all the Input and
Output Devices those are connected to the System.
3) Operating System is that which Responsible is for Running all the Application
Software’s.
4) Operating System is that which Provides Scheduling to the Various Processes
Means Allocates the Memory to various Process those Wants to Execute.
5) Operating System is that which provides the Communication between the user
and the System.
6) Operating System is Stored into the BIOS Means in the Basic Input and Output
System means when a user Starts his System then this will Read all the instructions
those are Necessary for Executing the System Means for Running the Operating
System, Operating System Must be Loaded into the Computer For this, this will
use the Floppy or Hard Disks Which Stores the Operating System.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
7 COMPILERS
What is called a programming language is really just software, called a compiler, that
reads a text file, processes it a lot, and generates binary. Since a computer can only read
1s and 0s, and humans write better Rust than they do binary, compilers were made to
turn that human-readable text into computer-readable machine code.
A compiler can be any program that translates one text into another. For example, here
is a compiler written in Rust that turns 0s into 1s, and 1s into 0s.

7.1 WHAT A COMPILER DOES


Compilers take source code and produce binary. Since it would be pretty complicated to
go straight from complex, human readable code to ones and zeros, compilers have several
steps of processing to do before their programs are runnable:
 Reads the individual characters of the source code you give it.
 Sorts the characters into words, numbers, symbols, and operators.
 Takes the sorted characters and determines the operations they are trying to perform by
matching them against patterns, and making a tree of the operations.
 Iterates over every operation in the tree made in the last step, and generates the
equivalent binary.

7.2 PROCESS OF COMPILATION

Lexer : A program that performs lexical analysis may be termed a lexer, tokenizer, or
scanner, though scanner is also a term for the first stage of a lexer. A lexer is generally
combined with a parser, which together analyze the syntax of programming languages,
web pages, and so forth
Parser: A parser is a compiler or interpreter component that breaks data into smaller
elements for easy translation into another language. A parser takes input in the form of a
sequence of tokens or program instructions and usually builds a data structure in the form
of a parse tree or an abstract syntax tree.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
Code Generator: Code generation is the process by which a compiler's code generator
converts some intermediate representation of source code into a form (e.g., machine
code) that can be readily executed by a machine. ... The input to the code generator
typically consists of a parse tree or an abstract syntax tree.

8. ALGORITHM
It is a process or set of rules to be followed in calculations or other problem-solving
operations, especially by a computer.

8.1 QUALITIES OF A GOOD ALGORITHM


1. Input and output should be defined precisely.
2. Each steps in algorithm should be clear and unambiguous.
3. Algorithm should be most effective among many different ways to solve a problem.
4. An algorithm shouldn't have computer code. Instead, the algorithm should be written in
such a way that, it can be used in similar programming languages.
8.2 EXAMPLES OF ALGORITHMS IN PROGRAMMING
Q) Write an algorithm to add two numbers entered by user.
Step 1: Start
Step 2: Declare variables num1, num2 and sum.
Step 3: Read values num1 and num2.
Step 4: Add num1 and num2 and assign the result to sum.
sum←num1+num2
Step 5: Display sum
Step 6: Stop
Q) Write an algorithm to find the largest among three different numbers entered
by user.
Step 1: Start
Step 2: Declare variables a,b and c.
Step 3: Read variables a,b and c.
Step 4: If a>b
If a>c
Display a is the largest number.
Else
Display c is the largest number.
Else
If b>c
Display b is the largest number.
Else
Display c is the greatest number.
Step 5: Stop

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I

9. FLOWCHART
A flowchart is a type of diagram that represents a workflow or process. A flowchart can
also be defined as a diagrammatic representation of an algorithm, a step-by-step
approach to solving a task. The flowchart shows the steps as boxes of various kinds, and
their order by connecting the boxes with arrows.
Symbols used in a flowchart are:-
Terminator(Start/Stop):
The terminator symbol represents the starting or ending point of the system.

Process
A box indicates some particular operation.

Document
This represents a printout, such as a document or a report.

Decision
A diamond represents a decision or branching point. Lines coming out from the
diamond indicates different possible situations, leading to different sub-processes.

aa Yes

No

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
Data
It represents information entering or leaving the system. An input might be an order
from a customer. An output can be a product to be delivered.

On-Page Reference
This symbol would contain a letter inside. It indicates that the flow continues on a
matching symbol containing the same letter somewhere else on the same page.

Off-Page Reference
This symbol would contain a letter inside. It indicates that the flow continues on a
matching symbol containing the same letter somewhere else on a different page.

Delay or Bottleneck
Identifies a delay or a bottleneck.

Flow
Lines represent flow of the sequence and direction of a process.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I
9.1 EXAMPLE OF A FLOWCHART
Draw a flowchart to add two numbers entered by user.

Draw flowchart to find the largest among three different numbers entered by user.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I

10. PSEUDOCODE
It is an informal high-level description of the operating principle of a computer program
or other algorithm. A typical pseudocode must have following characteristics.
 It uses the structural conventions of a normal programming language, but is intended
for human reading rather than machine reading.
 It typically omits details that are essential for machine understanding of the algorithm,
such as variable declarations, system-specific code and some subroutines.
 The programming language is augmented with natural language description details,
where convenient or with compact mathematical notation.
 The purpose of using pseudocode is that it is easier for people to understand than
conventional programming language code, and that it is an efficient and environment-
independent description of the key principles of an algorithm.
 It is commonly used in textbooks and scientific publications that are documenting
various algorithms, and also in planning of computer program development, for
sketching out the structure of the program before the actual coding takes place.

10.1 HOW DO YOU WRITE PSEUDOCODE?


 Start with the algorithm you are using, and phrase it using words that are easily
transcribed into computer instructions.
 Indent when you are enclosing instructions within a loop or a conditional clause.
 Avoid words associated with a certain kind of computer language

10.2 WHERE IS PSEUDOCODE USED?


Pseudocode (pronounced SOO-doh-kohd) is a detailed yet readable description of what a
computer program or algorithm must do, expressed in a formally-styled natural language
rather than in a programming language. Pseudocode is sometimes used as a detailed step
in the process of developing a program.

10.3 WHY PSEUDOCODE IS USED?


Pseudocode is not an actual programming language. So it cannot be compiled into an
executable program. The purpose of using pseudocode is an efficient key principle of an
algorithm. It is used in planning an algorithm with sketching out the structure of the
program before the actual coding takes place.

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg
Subject :PPS NOTES ON UNIT-I

10.4 EXAMPLE OF A PSEUDOCODE


Pseudocode to create a program to add 2 numbers together and then display the result.

Start Program
Enter two numbers, A, B
Add the numbers together
Print Sum
End Program

*****

Prepared by: N. Chiranjeeva Rao


Assistant Professor, CSE, BIT, Durg

You might also like