Professional Documents
Culture Documents
NEW SYLLABUS
PROTIVA
CSE Kit
5TH SEMESTER
Written by
MD. ABU SUFIYAN (OPU) AHSAN MAJUMDAR REAZ
B.cs (hons.) in Computer Science and B.cs (hons.) in Computer Science and
Engineering, National University at Shaikh Engineering, National University at
Borhanuddin Post Graduate College Dhaka City College
NAVEL KHAN SAIFUL ISLAM NAYEM
B.cs (hons.) in Computer Science and B.cs (hons.) in Computer Science and
Engineering, National University at Dhaka City Engineering, National University at
College Dhaka City College
NAJMA AKTER MYSHA
B.sc in CSE, National University
Institution Daffodil Institute of information and technology
Published By
Ar Rupak
PROTIVA PUBLICATION
168-169, Islamia Market Nilkhet
01674525040/01706600643
Published by:
AR RUPAK
PROTIVA BOOK HOUSE
01706600643 / 01674525040
This Book is protected By Copyright. Neither this book nor any part may be produced or
transmitted in any form or by any means, electronic or mechanical, including
photocopying, microfilming and recording or by any information storage, retrieval system
or otherwise, without the prior permission of the Publishers.
ই
PROTIVA BOOK HOUSE
168, Islamia Market, Nilkhet
Facebook page: https://www.facebook.com/ProtivaBookmedical
016 7452 5040/017 0660 0643
136, Islamia Market, Nilkhet
Facebook page : https://www.facebook.com/ProtivaBookmedical
016 7452 5040/017 0660 0643
ই
68-71, jame masjid shopping complex, andarkilla, chittagong,
Contact: 01817708328
Hazi Book Depot Nilkhet Milon Book Shop
Islamia Market Nilkhet, Dhaka 4 no. Goli, Islamia market, Nilkhet, Dhaka
01711831991 / 01909293090 01684066540 /01739605901
Digonto library Tofazzol Book House
Mirpur-10, Shah Ali Market, 19 Indira Rd, Farmgate, Dhaka 1215
Habib Super Market, Shop No: 107 Mobile : 01711-150101
Mobile : 01712754954 / 01798363642
FACEBOOK GROUP: CSE KIT (PROTIVA PUBLICATION)
ই
https://www.facebook.com/ProtivaBookmedical
ই
01706600643/ 01674525040
Contents
FIFTH SEMESTER
NEW SYLLABUS
CHAPTER 1
INTERFACING TECHNIQUES
1. Define the term peripherall.
(2010,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021)
Answer: Computer peripheral is a device that is connected to a computer but is not part of the
core computer architecture. The core elements of a computer are the central processing unit,
power supply, motherboard and the computer case that contains those three components.
Technically speaking, everything else is considered a peripheral device. However, this is a
somewhat narrow view, since various other elements are required for a computer to actually
function, such as a hard drive and random-access memory (or RAM).
Types of Peripheral Devices
There are many different peripheral devices, but they fall into three general categories:
1) Input devices, such as a mouse and a keyboard
2) Output devices, such as a monitor and a printer
3) Storage devices, such as a hard drive or flash drive
5. Discuss the basic interfacing unit with proper diagram. (2010, 2014, 2015, 2017, 2019)
Answer: The digital computer normally consists of the central processing unit (CPU), memory,
input devices, output devices, and storage devices as shown in Fig. Interconnecting these
components are the address, data and control buses. It is seen that each of the peripheral devices
is connected to CPU through the interface unit. These interface units generally comprise the
following:
(i) Transmit and receive data registers/buffer: As the CPU and the peripheral operate
asynchronously at different speeds, these registers and buffers (FIFO) are use to hold and
transfer data to and from the peripheral device. The length of these registers is normally the
same as the data-word length of the peripheral device.
(ii) Control registers: One or more control registers are used to capture and store the
command received from the CPU. With programmable devices, mode registers are used to
set the mode of operation of the device.
1. The control word format of the 8255 is shown in Fig. below. The contents of the control
register are called the control word that specifies the input/ output functions of each port.
2. The control word register can be accessed to write the control word by selecting AD_1 and
AD_0 in high condition i.e. both ON. This register is not available for read operation.
3. As indicated in Fig, the most significant bit (D_7) of the control word specifies either I/O
function or the BIT set/ reset function.
4. With D_7= 1, the 8255 works in the I/O modes. Port-C operates in BIT SET/RESET (BSR) mode
with D_7=0. The BSR Mode in no way affects the functioning of port-A and port-B.
5. Following steps are essential to communicate with the peripherals through the ports of the
8255
6. Determine address of ports-A, B, or C and of the control register according to the chip select
logic and the address lines AD_1 and AD_0
7. Write the control word in the control word register.
8. Write input/output instructions in order to communicate with the peripherals through ports-
A, B, and C of the 8255.
10 | Peripheral and Interfacing
It is simple, fast, and economical and does not require a 2-way communication. Letters, emails,
forums, televisions and radios are some of the examples of Asynchronous Transmission.
10. What are the differences between synchronous and asynchronous transmission?
(2012)
Give a comparative study of synchronous and asynchronous transmission? (2014)
Answer:
Basis For Comparison Synchronous Transmission Asynchronous
Transmission
Meaning Sends data in the form of blocks or Sends 1 byte or character at
frames a time
In peripheral mapped I/O interfacing, IN instruction is used to access input device and OUT
instruction is used to access output device. Each I/O device is identified by a unique 8-bit address
assigned to it. Since the control signals used to access input and output devices are different, and
all I/O device use 8-bit address, a maximum of 256 (28) input devices and 256 output devices can
be interfaced with 8085.
Peripheral and Interfacing | 13
Now it will be better for us if we discuss the topic with an example. In bellow we take an example
and discussed to show how peripheral mapped I/O interfacing work.
Memory Mapped I/O Peripheral MappedI/O
16-bit device address 8-bit device address
Data transfer between any general- Data is transfer only between accumulator and I.O
purpose register and I/O port. port
The memory map (64K) is shared between The I/O map is independent of the memory map;
I/O device and system memory. 256 input device and 256. output device can be
connected
More hardware is required to decode 16- Less hardware is required to decode 8-bit address
bit address
Arithmetic or logic operation can be Arithmetic or logical operation cannot be directly
directly performed with I/O data performed with I/O data
14. Why does the DMA generally have priority over the CPU in the case of accessing
memory? (2011,2014,2015, 2017,2019,2021)
Answer: We can transfer data direct to and from memory without the need of the CPU. The
transfer of data between a fast storage device such as magnetic disk and memory is often limited
by the speed of the CPU. Removing the CPU from the path and letting the peripheral device
manager the memory buses directly would improve the speed of transfer. This transfer technique
is called direct memory access (DMA).
During DMA transfer, the CPU is idle and has no control of the memory buses. A DMA controller
takes over the buses to manage the transfer directly between the I/O device and memory.
15. Draw the block diagram showing how a DMA controller operates in a microprocessor
system. (2011,2013,2014, 2017)
Or, what is DMA controller? Explain how DMA controller operates in a micro-computer
system? (2012, 2016, 2018)
Answer: DMA stands for Direct Memory Access. It is designed by Intel to transfer data at the
fastest rate. It allows the device to transfer the data directly to/from memory without any
interference of the CPU.
Using a DMA controller, the device requests the CPU to hold its data, address and control bus, so
the device is free to transfer data directly to/from the memory. The DMA data transfer is
initiated only after receiving HLDA signal from the CPU.
Peripheral and Interfacing | 15
DMA Operations
Following is the sequence of operations performed by a DMA −
Initially, when any device has to send data between the device and the memory, the device
has to send DMA request (DRQ) to DMA controller.
The DMA controller sends Hold request (HRQ) to the CPU and waits for the CPU to assert the
HLDA.
Then the microprocessor tri-states all the data bus, address bus, and control bus. The CPU
leaves the control over bus and acknowledges the HOLD request through HLDA signal.
Now the CPU is in HOLD state and the DMA controller has to manage the operations over
buses between the CPU, memory, and I/O devices.
16. Discuss the salient feature of a parallel programmable interface 8255. (2013)
Answer: INTEL introduced this programmable peripheral interface (PPI) chip 8255A for
interfacing peripheral devices to the 8085 system. This versatile chip 8255A is used as a general
purpose peripheral device for parallel data transfer between microprocessor and a peripheral
device by interfacing the device to the system data bus. The PPI has three programmable I/O
ports viz., Port A, Port B and Port C each of 8 bit width. Port C can be treated as two ports – Port C
upper (PC7-4) and Port lower (PC3 – 0) and these two can be independently programmed as
INPUT or OUTPUT ports also.
Salient Features
i) It is a general purpose programmable I/O device which is compatible with all INTEL
processors and also most other processors.
ii) It provides 24 I/O pins which may be individually programmed in two groups.
iii) This chip is also completely TTL compatible.
iv) It is available in 40 pin DIP and 44 pin plastic leaded chip carrier (PLCC) packages.
16 | Peripheral and Interfacing
v) It has three 8 bit ports. Port A, Port B and Port C. Port C is treated as two 4 bit ports also.
vi) This 8255 is mainly programmed in two modes (a) the I/O mode and (b) The bit set/reset
mode (BSR) mode. The I/O mode is further divided into three modes: Mode 0, Mode 1, and
Mode 2.
vii) An 8 bit control resister is used to configure the modes of 8255.
There is also another 8 bit port called control port, which decides the configuration of 8255
ports. This port is written by the microprocessor only.
17. What does PPI and PIC stand for? (2013,2015, 2017,2019)
Answer:
PPI: The Programmable peripheral interconnect (PPI) enables peripherals to interact
autonomously with each other using tasks and events independent of the CPU. The PPI allows
precise synchronization between peripherals when real-time application constraints exist and
eliminates the need for CPU activity to implement behavior which can be predefined using PPI.
PIC: A peripheral interface controller (PIC) is a type of microcontroller component that is used in
the development of electronics, computers, robotics and similar devices.
19. Discuss the EISA bus and need of PCI bus. (2013)
Answer: Extended Industry Standard Architecture (EISA) is a bus architecture that extends the
Industry Standard Architecture (ISA) from 16 bits to 32 bits. EISA was introduced in 1988 by the
Gang of Nine - a group of PC manufacturers.
EISA was designed to compete with IBM’s Micro Channel Architecture (MCA) - a patented 16 and
32-bit parallel computer bus for IBM’s PS/2 computers. EISA extended the advanced technology
(AT) bus architecture and facilitated bus sharing between multiple central processing units (CPU).
EISA is also known as Extended ISA.
Need for PCI
PCI requirements include:
Bus timing
Physical size (determined by the wiring and spacing of the circuit board)
Electrical features
Protocols
PCI specifications are standardized by the Peripheral Component Interconnect Special Interest
Group.
Today, most PCs do not have expansion cards, but rather devices integrated into the motherboard.
The PCI bus is still used for specific cards. However, for practical purposes, USB has replaced the
PCI expansion card.
During system startup the operating system searches for all PCI buses to attain information about
the resources needed for each device. The OS communicates with each device and assigns system
resources, including memory, interrupt requests and allotted input/output (I/O) space.
20. Draw and discuss the timing diagram of read and write cycle of 8085 microprocessor.
(2013)
Answer: The timing diagram of 8085 microprocessor. With help of timing diagram we can easily
calculate the execution time of instruction as well as program. Before go for timing diagram of
8085 microprocessor we should know some basic parameters to draw timing diagram of 8085
microprocessor. Those parameters are
Instruction Cycle
Machine cycle
T-state.
Now we should go for what is instruction cycle, machine cycle and t-state?
18 | Peripheral and Interfacing
Instruction Cycle
Instruction cycle is the total time taken for completing one instruction execution
Machine cycle
Machine cycle is the time required to complete one operation such as accessing either the memory
or an I/O device
T-state
T-state is the time corresponding to one clock period. It is a basic unit used to calculate the time
taken for execution of instructions and programs in a processor.
Now another important topics we should know to clear the concept on timing diagram of 8085
microprocessor. What is the control signals used in timing diagram of 8085 microprocessor?
If we go for above question then the answer is mainly we have to know five control signals to
understand timing diagram of 8085 microprocessor. Those are
IO/ M
IO/ M signal indicate whether I/O or memory operation is being carried out. A high on this signal
indicates I/O operation while a low indicates memory operation.
S0 and S1
S0 and S1 indicate the type of machine cycle in progress.
ALE
ALE is indicates the availability of a valid address on the multiplexed address/data lines. When it
is high act as a address bus and low act as a data bus.
Rd^
Read is an active low signal that indicates that data is to be read form the selected memory or i/o
device through data bus.
WR^
Write is an active low signal that indicates that data on the data bus is to be write form the
selected memory or i/o device.
In bellow table I show the status of different control signal for different operation. We should
remember that to complete our timing diagram of 8085 microprocessor.
Opcode Fetch
The lower byte of address (AD0 – AD7) is available on the multiplexed address/data bus during
T1 state of each machine cycle, except during the bus idle machine cycle.
The higher byte of address (A8 – A15) is available during T1 to T3 states of each machine cycle,
except during the bus idle machine cycle, shown in Fig
The first machine cycle of every instruction is the Opcode Fetch. This indicates the kind of
instruction to be executed by the system. The length of this machine cycle varies between 4T to 6T
states—it depends on the type of instruction. In this, the processor places the contents of the PC
on the address lines, identifies the nature of machine cycle æ (by IO/M, S0, S1) and activates the
ALE signal. All these occur in T1 State In T2 state, RD signal is activated so that the identified
memory location is read from and places the content on the data bus (D0 – D7 ).
In T3, data on the data bus is put into the instruction register (IR) and also raises the RD^ signal
thereby disabling the memory.
In T4, the processor takes the decision, on the basis of decoding the IR, whether to enter into T5
and T6 or to enter T1 of the next machine cycle.
One byte instructions that operate on eight bit data are executed in T4. Examples are ADD B, MOV
C, B, RRC, DCR C,etc.
Now see an example of memory read and memory write machine cycle.
20 | Peripheral and Interfacing
Both the Memory Read and Memory Write machine cycles are 3T states in length. In Memory
Read the contents of R/W memory (including stack also) or ROM are read while in Memory Write,
it stores data into data memory.
21. Is there any condition for transferring data between microprocessor and peripherals?
Write down them. (2019,2014,2013)
Answer: The process of data transfer between µp & peripheral is controlled either by µp or by
peripheral. Most peripheral respond slowly in comparison with the speed of the µp, it can take
five different conditions:
1-Unconditional data transfer: in this form of data transfer, the MP assumes that the
peripherals are always available, ex: data, and goes on to execute the next instruction.
2-data transfer with polling: (status check): the MP is kept in a loop to check whether data are
available, this is called polling, ex: to read from input keyboard, the MP can keep polling the port
until is pressed.
3-data transfer with interrupts: in this condition where the peripheral is ready to transfer data,
it's sends an interrupt signal to the MP. The MP stops the executions of the program accept the
data from the peripheral, and then returns to the program.
4-data transfer with ready signal: when peripheral response time is slower than MP time, the
ready signal can be used to add T-states, thus extending the execution time this processor
provides sufficient time for the peripheral to complete the data transfer.
5-data transfer with handshake signals: in this data transfer signals are exchanged between the
MP & peripheral prior to actual data transfer, these signals are called handshake signals.
Peripheral and Interfacing | 21
22. What is computer highway? Briefly describe all types of bus operations? (2018,16)
Answer:
Computer highway is a hardware system of a computer network to make a way, where computer
bus runs through. Basically computer highway is cables inside computer hardware for
communicating among internal and external peripheral device.
Types of Buses in Computer Architecture
Inside computers, there are many internal components. In order for these components to
communicate with each other, they make use of wires that are known as a ‘bus’.
A bus is a common pathway through which information flows from one computer component to
another. This pathway is used for communication purpose and it is established between two or
more computer components. We are going to check different computer bus architectures that
are found in computers.
Different Types of Computer Buses
23. With the aid of a suitable diagram, describe the central processor highways. (2015)
The full form of CPU is Central Processing Unit. Alternatively, it is also known by the name
of processor, microprocessor or a computer processor. A CPU is an electronics circuit used in a
computer that fetches the input instructions or commands from the memory unit, performs
arithmetic and logic operations and stores this processed data back to memory.
A CPU or Central Processing Unit is the heart of a computer and is installed in a socket specified
on a motherboard. Since a CPU performs a lot of calculations at a high speed, it gets heat up
quickly. To cool down the temperature of a CPU a cooling FAN is installed on it.
Components of a CPU
Control Unit
The Control Unit is an internal part of a CPU that co-ordinates the instructions and data flow
between CPU and other components of the computer. It is the CU that directs the operations of a
central processing unit by sending timing and control signals.
Arithmetic Logic Unit
The ALU is an internal electronic circuitry of a CPU that performs all the arithmetic and logical
operations in a computer. The ALU receives three types of inputs.
Control signal from CU ( Control Unit )
Data(operands) to be operated
Status information from operations done previously.
When all the instructions have been operated, the output that consists of data is stored in memory
and a status information is stored in internal registers of a CPU.
Peripheral and Interfacing | 23
Working of a CPU
All the CPUs regardless of their origin or type performs a basic instruction cycle that consists of
three steps named Fetch, decode and execute
Fetch
A program consists of a number of instructions. Various programs are stored in memory. During
this step, the CPU reads instruction that is to be operated from a particular address in the
memory. The program counter of CPU keeps the record of address of the instructions.
Decode
A circuitry called instruction decoder decodes all the instructions fetched from the memory. The
instructions are decoded to various signals that control other areas of CPU.
Execute
In the last step, the CPU executes the instruction. For example, it stores a value in the particular
register and the instruction pointer then points to other instruction that is stored in next address
location.
Clock Speed
The speed of processor is measured by the number of clock cycles a CPU can perform in a second.
The more the number of clock cycles, the more number of instructions (calculations) it can carry
out. The CPU speed is measured in Hertz. Modern Day processors have speed units of GHz.
(1GHz=1 million thousand cycles per second).
CPU Manufacturers
The 3 major giant manufacturers of CPUs used in desktop or laptops
are Intel, AMD and VIA(Embedded devices) while Qualcomm, Samsung and Apple are the top
three manufacturers of mobile processors.
Parts of a CPU:
1. ALU - The arithmetic logic unit executes all calculations within the CPU
2. CU - control unit, coordinates how data moves around
Registers, a memory location within the actual processor that work at very fast speeds. It stores
instructions which await to be decoded or executed.
1. PC - program counter - stores address of the -> next <- instruction in RAM
2. MAR - memory address register - stores the address of the current instruction being executed
3. MDR - memory data register - stores the data that is to be sent to or fetched from memory
4. CIR - current instruction register - stores actual instruction that is being decoded and
executed
5. ACC - accumulator - stores result of calculations
6. IR - interrupt register - manages requests from I/O devices. Be careful this was called the
instruction register in our video above.
Buses
1. address bus - carries the ADDRESS of the instruction or data
2. data bus - carries data between processor and the memory
3. control bus - sends control signals such as: memory read, memory write
24 | Peripheral and Interfacing
CHAPTER 2
DIGITAL INTERFACING
1. Draw and describe block diagram of 8255A. (2011,2012,2013)
Or, Draw the block diagram of 8255A programmable peripheral interface. (2016)
Answer: Figure shows the internal block diagram of 8255A. It consists of data bus buffer, control
logic and Group A and Group B controls.
Data Bus Butter: This tri-state bi-directional buffer is used to interface the internal data lilts of
8255 to the system data bus. Input or Output instructions executed by the CPU either Read date
from or Write data into the buffer. Output data from the CPU to the ports or control register, and
input data to the CPU from the ports or status register are all passed through the buffer.
Control Logic: The control logic block accepts control bus signals as well as inputs from the
address bus, and issues commands to the individual group control blocks (Group A control and
Group B control). It issues appropriate enabling signals to access the required data/control words
or status word. The input pins for the control logic section are described here.
Group A and Group B Controls: Each of the Group A and Group B control blocks receives control
words from the CPU and issues appropriate commands to the ports associated with it. The Group
A control block controls Port A and PC_7-PC_4 while the Group B control block controls Port B and
PC_3-PC_0.
Peripheral and Interfacing | 25
Port A: This has an 8-bit latched and buffered output and an 8-bit input latch. It can be
programmed in three modes: mode 0, mode 1 and mode 2.
Port B: This has an 8-bit data I/O latch/ buffer and an 8-bit data input buffer. It can be
programmed in mode 0 and mode 1.
Port C: This has one 8-bit unlatched input buffer and an 8-bit output latch/buffer. Port C can be
spitted into two parts and each can be used as control signals for ports A and B in the handshake
mode. It can be programmed for bit set/reset operation.
2. Draw the internal architecture of 8255 PPI and discuss its ports.
(2015, 2017, 2019, 2021)
Or, List the major component of 8251A programmable communication interface.
(2011, 2012, 2015, 2018)
Answer: 8251 UNIVERSAL SYNCHRONOUS ASYNCHRONOUS RECEIVER TRANSMITTER
(USART)
The 8251 is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data
communication. As a peripheral device of a microcomputer system, the 8251 receives parallel
data from the CPU and transmits serial data after conversion. This device also receives serial data
from the outside and transmits parallel data to the CPU after conversion.
The 8251 functional configuration is programmed by software. Operation between the 8251 and
a CPU is executed by program control. Table 1 shows the operation between a CPU and the device.
Pin Description
D 0 to D 7 (l/O terminal)
This is bidirectional data bus which receive control words and transmits data from the CPU and
sends status words and received data to CPU.
RESET (Input terminal)
A "High" on this input forces the 8251 into "reset status." The device waits for the writing of
"mode instruction." The min. reset width is six clock inputs during the operating status of CLK.
26 | Peripheral and Interfacing
3. Draw the block diagram showing 8259 Priority Interface Controller (PIC) connected to
8086. (2011,2018)
Answer:
It is programmed to work with either 8085 or 8086 processor. It manage 8-interrupts according
to the instructions written into its control registers. In 8086 processor, it supplies the type
number of the interrupt and the type number is programmable.
In 8085 processor, the interrupt vector address is programmable. The priorities of the interrupts
are programmable. The interrupts can be masked or unmasked individually. The 8259s can be
cascaded to accept a maximum of 64 interrupts.
Peripheral and Interfacing | 29
FUNCTIONAL BLOCK DIAGRAM OF 8259:
It has eight functional blocks. They are,
1. Control logic
2. Read Write logic
3. Data bus buffer
4. Interrupt Request Register (IRR)
5. In-Service Register (ISR)
6. Interrupt Mask Register (IMR)
7. Priority Resolver (PR)
8. Cascade buffer.
The data bus and its buffer are used for the following activities.
1. The processor sends control word to data bus buffer through D0-D7.
2. The processor read status word from data bus buffer through D0-D7.
3. From the data bus buffer the 8259 send type number (in case of 8086) or the call
opcode and address (in case of 8085) through D0-D7 to the processor.
• The processor uses the RD (low), WR (low) and A0 to read or write 8259.
• The 8259 is selected by CS (low).
• The IRR has eight input lines (IR0-IR7) for interrupts. When these lines go high, the
request is stored in IRR. It registers a request only if the interrupt is unmasked.
• Normally IR0 has highest priority and IR7 has the lowest priority. The priorities of the
30 | Peripheral and Interfacing
interrupt request input are also programmable.
• First the 8259 should be programmed by sending Initialization Command Word (ICW)
and Operational Command Word (OCW). These command words will inform 8259 about the
following,
* Type of interrupt signal (Level triggered / Edge triggered).
* Type of processor (8085/8086).
* Call address and its interval (4 or 8)
* Masking of interrupts.
* Priority of interrupts.
* Type of end of interrupts.
• The interrupt mask register (IMR) stores the masking bits of the interrupt lines to be
masked. The relevant information is send by the processor through OCW.
• The in-service register keeps track of which interrupt is currently being serviced.
• The priority resolver examines the interrupt request, mask and in-service registers and
determines whether INT signal should be sent to the processor or not.
• The cascade buffer/comparator is used to expand the interrupts of 8259.
• In cascade connection one 8259 will be directly interrupting 8086 and it is called master
8259.
• To each interrupt request input of master 8259 (IR0-IR7), one slave 8259 can be
connected. The 8259s interrupting the master 8259 are called slave 8259s.
• Each 8259 has its own addresses so that each 8259 can be programmed independently by
sending command words and independently the status bytes can be read from it.
• The cascade pins (CAS0, CAS1 and CAS2) from the master are connected to the
corresponding pins of the slave.
• For the slave 8259, the SP (low) / EN (low) pin is tied low to let the device know that it is
a slave.
• The SP (low) / EN (low) pin can be used as input or output signal.
• In non-buffered mode it is used as input signal and tied to logic-I in master 8259 and logic-0 in
slave 8259.
• In buffered mode it is used as output signal to disable the data buffers while data is
transferred from 8259A to the CPU.
4. What are the basic modes of operation of 8255, Explain with the format of control
register.
Answer:
1. The 8255 IC provides one control word register.
2. It is selected when and 0. The read operation is not allowed for
control register.
3. The bit pattern loaded in control word register specifies an I/O function for each port and the
mode of operation in which the ports are to be used.
4. There are two different control word formats which specify two basic modes:
o BSR (Bit set reset) mode
o I/O mode
Peripheral and Interfacing | 31
5. The two basic modes are selected by D7bit of control register. When D7=1D7=1 it is an I/O
mode and when D7=0D7=0; it is a BSR mode.
BSR mode-
1. The BSR mode is a port C bit set/reset mode.
2. The individual bit of port C can be set or reset by writing control word in the control register.
3. The control word format of BSR mode is as shown in the figure below
1. The pin of port C is selected using bit select bits [b b b] and set or reset is decided by bit S/R .
2. The BSR mode affects only one bit of port C at a time. 6.0The bit set using BSR mode remains
set unless and until you change the bit. So to set any bit of port C, bit pattern is loaded in
control register.
3. If a BSR mode is selected it will not affect I/O mode.
I/O modes-
There are three I/O modes of operation:
Mode 0- Basic I/O
Mode 1- Strobed I/O
Mode 2- Bi-directional I/O
The I/O modes are programmed using control register.
The control word format of I/O modes is as shown in the figure below:
32 | Peripheral and Interfacing
Hardware Interrupts
Hardware interrupt is caused by any peripheral device by sending a signal through a specified
pin to the microprocessor.
The 8086 has two hardware interrupt pins, i.e. NMI and INTR. NMI is a non-maskable interrupt
and INTR is a maskable interrupt having lower priority. One more interrupt pin associated is
INTA called interrupt acknowledge.
1) NMI
2) INTR
Software Interrupts
Some instructions are inserted at the desired position into the program to create interrupts.
These interrupt instructions can be used to test the working of various interrupt handlers. It
includes −
INT- Interrupt instruction with type number.
INT 3-Break Point Interrupt Instruction
INTO - Interrupt on overflow instruction
8. Design an interfacing circuit to interface an A/D converter using 8255A in mode 0 and
BSR mode. Discuss with Diagram.(2012)
Interfacing analog to digital data converters:
The ADC is treated as an input device by the microprocessor that starts an initializing signal to
ADC to start the conversion process. The start of conversion signal is a pulse of a specific
duration. The process of analog to dig. Conversion is a slow process and the up has to wait for the
dig. Data till the conversion is over. After the conversion is over, the ADC sends end of conversion
(EOC) signal to inform the up about it and the result is ready at the O/P buffer of ADC. These tasks
of issuing an SOC pulse to ADC, reading EOC signal from the ADC and reading the dig. The CPU
using 8255 I/O ports carries out O/P of the ADC. The time taken by the converter to calculate the
36 | Peripheral and Interfacing
equivalent digital data o/p from the moment of the SOC is called conversion delay. Successive
Approximation ADC and dual slope ADC Techniques are popular.
Whatever may be the technique for conversion, a general algorithm for ADC interfacing contains
the following steps. 1. Ensure the stability of analog I/P. 2. Issue start of conversion (SOC) pulse to
ADC 3. Read EOC (end of conversion) signal 4. Read digital data o/p of the ADC.
CHAPTER 3
MODERN DATA-ENTRY DEVICES
1. What is scanner? Explain various types of scanner. (2018,2016,2012)
Answer: A scanner is an input device that captures documents such as photographs and text.
Scanners are of many types according to their design, scanning mechanisms etc. When a
document is to be scanned, firstly a documents is converted into digital signal and then scanning
is performed on this electronic version of document.
A scanner can be connected to computer using different interface such as SCSI, TWAIN etc, but
today the most common method is USB cable.
TYPES OF SCANNER
FLATBED SCANNER
Flatbed scanners will take up some desktop space but provide a lot of bang for the buck. They look
like miniature printers with a flip-up cover protecting the glass platen. Flatbed scanners are some
of the most commonly used scanners as it has both home and office functions. The way they scan
documents is that a mechanism rolls under the document to obtain the image. For a businesses
that have a need for high processing abilities, the flatbed scanner can scan any number of
documents with a click of a button.
SHEET-FED SCANNER
Sheet-fed scanner is smaller in size than flatbed scanner. This type of scanner works like a flatbed
scanner except that the document is fed through the scanner and moves along the beam to be read
rather than the beam moving along document. This type is not useful for books, but only single
sheets.
A small size is its advantage but improper mechanism can skew the paper.
DRUM SCANNER
Drum scanner is used for scanning a document and produce at very high resolution rate. There is
no any type of scanner that will give you the kind of resolution, detail, sharpness, dynamic range,
and color rendition that drum scanning can give you. There are only a few companies that make
these scanners, considering the high cost of producing a scanner such as this. It is considered as a
tremendous upgrade to a regular flatbed scanner.
A drum scanner uses a photo-multiplier (PM) tube, which is a light sensing device. That's why it
offers a high sensitivity and good signal-to-noise ratio. The image to be scanned is placed on
spinning.
HANDHELD SCANNER
Handheld scanner is much like a flatbed scanner. Handheld scanners are small helpful electronic
devices that are widely used for digitizing printed documents. Handheld scanner provides lower
quality scanners, they are still very popular because they are small and less expensive than their
flatbed. They are able to scan items that could not fit in a flatbed scanner due to size or location.
Their function includes moving them over the material being captured with the aid of a tray to
Peripheral and Interfacing | 41
keep it in a straight line. Experience is required to operate and handle the device since it is very
important to keep the scanner straight so that a distortion-free scan is possible.
Low cost and portability is the advantages of handheld scanner but poor quality is its drawback.
3) As the scanner moves past the barcode, the cell generates a pattern of on-off pulses that
correspond to the black and white stripes. So for the code shown here ("black blackblack
white black white black black"), the cell would be "off offoff on off on off."
4) An electronic circuit attached to the scanner converts these on-off pulses into binary digits
(zeros and ones).
5) The binary digits are sent to a computer attached to the scanner, which detects the code as
11101011.
In some scanners, there's a single photoelectric cell and, as you move the scanner head past the
product (or the product past the scanner head), the cell detects each part of the black-white
barcode in turn. In more sophisticated scanners, there's a whole line of photoelectric cells and the
entire code is detected in one go.
In reality, scanners don't detect zeros and ones and produce binary numbers as their output: they
detect sequences of black and white stripes, as we've shown here, but convert them directly into
decimal numbers, giving a decimal number as their output.
Two square waves in quadrature. The direction of motion is indicated by the sign of the A-B phase
angle which, in this case, is negative because A trails B.
44 | Peripheral and Interfacing
The pulses emitted from an incremental encoder's A and B outputs are quadrature-encoded,
meaning that when the encoder is moving at a constant velocity, the duty cycle of each pulse is
50% (i.e., the waveform is a square wave) and there is a 90 degree phase difference between A
and B.[2] At any particular time, the phase difference will be positive or negative depending on the
encoder's direction of movement. In the case of a rotary encoder, the phase difference is +90° for
clockwise rotation and -90° for counter-clockwise rotation, or vice versa, depending on the device
design.
The frequency of the pulses on the A or B output is directly proportional to the encoder's velocity
(rate of position change); higher frequencies indicate rapid movement, whereas lower frequencies
indicate slower speeds.[1] Static, unchanging signals are output on A and B when the encoder is
motionless. In the case of a rotary encoder, the frequency indicates the speed of the encoder's
shaft rotation, and in linear encoders the frequency indicates the speed of linear traversal.
Conceptual drawings of sensing mechanisms
Rotary encoder, with corresponding A/B signal states shown on the right
Linear encoder; the R signal indicates the encoder is located at its reference position
Peripheral and Interfacing | 45
9. Write down the difference between OMR sad OCR. (2018,17,14,12,10)
Answer:
OMR OCR
Optical Mark Recognition. Optical Character Recognition.
A procedure through which we get the human- An action that computer performs to detect
marked data from various documents including the printed or written text and the
survey and question along with problem and tests. characters used within a paper.
OMR does not requires a complex recognition OCR requires a complex recognition engine
engine
Helps with identifying where the mark exists and Helps with identifying what the mark
finds the exact location of the alphabet or represents and hence, determines the
character. actual nature.
It has its applications in the field of grading and Becomes used for converting documents
tabulation. from the printable version to simple
version.
10. What is digitizer? Explain the operation and application of digitizer. (2016)
Answer: A Digitizer is a device which converts analog information into a digital form.
You can easily do your signatures using this pen or styles or pen on the digitizer and it is the job of
digitizer or change your signatures in bit map and send them to computer for storage.
From there, whenever needed the same shape can be regenerated.
Digitizer are very accurate devices. They are available in many sizes. The most common size is 6
into 8 inch and 12 into 18 inch. The cost of a digitizer increasers with increase in size.
Thus bigger size digitizer are very costly.
The styles used with digitizer looks like an ordinary pen. You can hold it in the same way and can
make artistic strokes on the digitizer using it . Whatever strokes you will apply on the digitizer,
the same can be seen on the screen
Working of an Digitizer:
The working of a digitizer in similar to that of a mouse with some major differences. Actually the
input from a mouse is relative to the cursor position on the screen and that is why if you draw a
line with a mouse and then pick it up and move to a different place on desk you will find that the
input continues from the last position of the cursor on the screen , where it was.
But in case of a digitizer each position on the tablet relates to a specific position on the screen.
So it traces the existing drawing more accurately and it can easily create original drawing such as
architectural drawing with precise dimensions.
The styles draws directly on the tablet and its movements are captured and translated into a
corresponding drawing on the computer.
A puck or cursor can also be used instead of styles. In both the cases the exact positions of
drawing device is detected by the tablet in terms of coordinates and is sent to the computer.
46 | Peripheral and Interfacing
11. What is MICR? Write down the working principles of MICR. (2021,2013)
Answer: MICR (magnetic ink character recognition) is a technology used to verify the legitimacy
or originality of paper documents, especially checks. Special ink, which is sensitive to magnetic
fields, is used in the printing of certain characters on the original documents. Information can be
encoded in the magnetic characters.
12. Briefly describe the code format and working principle of bar code (2017)
A barcode reader (or barcode scanner) is an optical scanner that can read printed barcodes,
decode the data contained in the barcode and send the data to a computer. Like a flatbed scanner,
it consists of a light source, a lens and a light sensor translating for optical impulses into electrical
signals. Additionally, nearly all barcode readers contain decoder circuitry that can analyze the
barcode's image data provided by the sensor and sending the barcode's content to the scanner's
output port.
How does a barcode scanner work?
It would be no good having barcodes if we didn't have the technology to read them. Barcode
scanners have to be able to read the black-and-white zebra lines on products extremely quickly
and feed that information to a computer or checkout terminal, which can identify them
immediately using a product database. Here's how they do it.
For the sake of this simple example, let's assume that barcodes are simple on-off, binary patterns
with each black line corresponding to a one and each white line a zero. (We've already seen that
real barcodes are more sophisticated than this, but let's keep things simple.)
Keyboard Encoder
A keyboard encoder is basically decimal to 8-4-2-1 BCD encoder.
The truth table for decimal to BCD conversion can be represented like as follows,
From the above truth table it is cleared that, the logical circuit of this keyboard encoder must
have 10 input parts (0 to 9) and four output parts. A, B, C and D.
48 | Peripheral and Interfacing
The circuit can be drawn by using diode and SR flip flops like this
CHAPTER 4
DISPLAY DEVICES
1. What are the basic components of CRT? (2021,2014)
Answer:
A CRT works by sweeping an electron beam of varying intensity across a phosphor-coated
screen. The basic components of the CRT are described below:
Electron Gun -- The electron gun, which consists of the cathode, choke, accelerator, and
lensing region, is the device which generates and focuses the electron beam used to project an
image on the phosphor screen.
Cathode -- The cathode is a grounded metal plate that is super-heated so that electrons are
literally jumping off the surface. Accelerator Plate -- This metal ring is held at a large, positive
voltage and is used to "grab" loose electrons from the cathode and hurl them forwards into the
lensing chamber (towards the right in the diagram).
Choke -- This metal ring is located between the cathode and accelerator plate and held at a
slightly negative charge. The electric fields from the choke help columnate the electrons; they
also can be used to quickly modulate the number of electrons in the beam and, thus, the
brightness or intensity of the picture.
Lensing Region -- The lensing region consists of two adjacent metal tubes that are located just
after the accelerator. The two tubes are held at different potentials, causing an electrostatic
lens to form at their junction. The electrons that have jumped off the cathode begin to
focus. Ideally, the focal point will occur at the point when the beam strikes the display,
thereby providing pinpoint resolution on the screen. The last metal tube of the lensing
chamber is held at the highest potential of all the electron gun components so that exiting
electrons have a very high forward velocity.
Steering Magnets -- These two sets of electromagnets are fed the retrace signals that
synchronize the drawing of the picture on the screen. The flux between each pair of magnets
will bend the electron beam, one in the horizontal direction and the other in the vertical
direction.
Phosphor Screen -- If all works well, a pinpoint electron beam strikes the screen with the
appropriate intensity and causes the phosphor to fluoresce. The intensity modulation is
synchronized with the horizontal and vertical retraces so that one frame of video is
displayed. The process repeats itself rapidly (24 frames/second for analog television) so that
the moving scene appears seamless.
54 | Peripheral and Interfacing
2. What are the basic CRT operations? (2021,2014)
Answer:
Working of CRT
The working of CRT depends on the movement of electrons beams. The electron guns generate
sharply focused electrons which are accelerated at high voltage. This high-velocity electron beam
when strikes on the fluorescent screen creates luminous spot
After exiting from the electron gun, the beam passes through the pairs of electrostatic deflection
plate. These plates deflected the beams when the voltage applied across it. The one pair of plate
moves the beam upward and the second pair of plate moves the beam from one side to another.
The horizontal and vertical movement of the electron are independent of each other, and hence
the electron beam positioned anywhere on the screen.
The working parts of a CRT are enclosed in a vacuum glass envelope so that the emitted electron
can easily move freely from one end of the tube to the other.
Disadvantages of CRT
1. Sharpness
The CRT's Gaussian beam profile produces images with softer edges that are not as sharp as
an LCD at its native resolution. Imperfect focus and color registration also reduce sharpness.
Generally sharper than LCDs at other than native resolutions.
2. Interference
All color CRTs produce annoying Moiré patterns. Many monitors include Moiré reduction,
which normally doesn't eliminate the Moiré interference patterns entirely.
3. Geometric Distortion
Subject to geometric distortion and screen regulation problems. Also affected by magnetic
fields from other equipment including other CRTs.
4. Brightness
Relatively bright but not as bright as LCDs. Not suitable for very brightly lit environments.
5. Screen Shape
Some CRTs have a rounded spherical or cylindrical shape screen. Newer CRTs are flat.
6. Emissions
CRTs give off electric, magnetic and electromagnetic fields. There is considerable controversy
as to whether any of these pose a health hazard, particularly magnetic fields. The most
authoritative scientific studies conclude that they are not harmful but some people remain
unconvinced.
7. Physical
They are large, heavy, and bulky. They consume a lot of electricity and produce a lot of heat.
Peripheral and Interfacing | 57
6. Define LCD. Explain the working principle of LCD monitor. (2021,2018,2016)
Answer: A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated
optical device that uses the light-modulating properties of liquid crystals. Liquid crystals do not
emit light directly, instead using a backlight or reflector to produce images in color
or monochrome.
How LCDs are constructed
8. Write down the advantages of LCD monitor over CRT monitor. (2016)
Answer: Older cathode ray tube (CRT) monitors are being replaced by liquid crystal display
(LCD) monitors in many homes and offices. LCD television panels are increasingly replacing CRT
televisions in homes and hotels. LCD panels offer a number of advantages over CRT monitors,
especially once the cost of purchasing LCD monitors matches the cost of the CRT models they are
replacing.
Space
LCD monitors take up much less space than CRT monitors. LCD monitors are also known as "flat
panel" monitors because they do not need the space taken up by the cathode ray tube in a
conventional CRT monitor. This means that there is more space on the physical desktop for
documents and other peripheral computer equipment.
Peripheral and Interfacing | 59
Power Consumption
LCD monitors consume less power than CRT monitors. Energy consumption of LCD monitors does
increase as screen size increases, but still remains significantly lower than that of CRT monitors.
Typical power consumption for an LCD monitor is between 25 and 50 watts, depending on the
size, while even a 15-inch CRT monitor can use between 60 and 80 watts, while 19-inch CRT
monitors use anything between 70 and 150 watts.
Brightness
LCD monitors output a much brighter image than CRT monitors due to the high peak intensity
that they generate. High peak intensity results from the fact that LCD panels have a constant back
light that illuminates the screen. This makes LCD monitors a much better choice for use in brightly
lit areas.
Screen Flicker
CRT monitors scan the screen viewing area as horizontal lines, and the rate at which the whole
screen is covered by these horizontal line scans is known as the refresh rate. CRT monitors
typically have low refresh rate, and this causes a flickering effect. This can be detrimental to
health when viewed over long periods, causing eye strain and headaches. LCD monitors are
capable of much higher refresh rates, with rates of 75 and 85 hertz being common. This means
that there is less visible flicker with an LCD monitor, making LCD monitors more comfortable to
use.
Active-matrix display:
An active-matrix display, also known as a TFT (thin-film transistor) display, uses a separate
transistor to apply charges to each liquid crystal cell and thus displays high-quality color that is
viewable from all angles.
Passive-matrix display:
A passive-matrix display uses fewer transistors, requires less power, and is less expensive than an
active-matrix display. The color on a passive-matrix display often is not as bright as an active-
matrix display. Users view images on a passive-matrix display best when working directly in front
of it.
Specifications Active Matrix LCD Passive Matrix LCD
Contrast More than 100 10 to 20
Viewing angle wide Limited
Gray scale 256 16
response time less than 50 ms 100 to 200 ms
multiplex ratio >1000 480
Size less than 14 inch upto 17 inch
Manufacturability complex Simple
Cost high Moderate
resolution allows very high resolution allows high resolution
Number of rows Not limited to 50 rows Limited to 50 rows
control of Sub-pixel Each of the sub pixel is individually Each of the sub pixel is not
controlled by isolated thin film individually controlled by an
transistor (TFT). isolated TFT.
11. List out the difference between LCD and LED. (2019,2017)
Answer:
LED vs LCD:
LED LCD
LEDs Consume more power than LCDs. LCD Consumes very less power.
Due to high power requirement, LCD can be driven directly from IC chips.
LED requires external interface circuits (called as Driver Circuits are not required.
LED Driver Circuit) when driven from ICs.
The brightness level is very good for LEDs LCDs have moderate brightness level.
Commercially available LEDs have operating Comparatively less temperature limit.
temperature range of -40 to 85 degree celcius. The temperature range is limited to -20
to 60 degree celcius.
Life time is around 1,00,000 hours Due to chemical degradation the life time
Peripheral and Interfacing | 61
is 50,000 hours.
LEDs have wide viewing angle. The viewing angle for LCD is 100 degree
The viewing angle is 150 degree
Operating voltage range is 1.5V to 5VDC. Operating voltage range is 3 to 20 VDC.
12. What is transducer? Write down about active and passive transducer.
(2021, 2018, 2016, 2012)
Answer: A transducer is a device that converts energy from one form to another. Usually a
transducer converts a signal in one form of energy to a signal in another.
Transducers are often employed at the boundaries of automation, measurement, and control
systems, where electrical signals are converted to and from other physical quantities (energy,
force, torque, light, motion, position, etc.). The process of converting one form of energy to
another is known as transduction.
Active Transducer
The transducer whose output is obtained in the form of voltage or current without any additional
auxiliary source is known as the active transducer. It works on the principle of conversion of
energy from one form to another. The active transducer is also known as the self-generating
transducer because they self-develop their electrical output signal. The energy requires for
generating the output signals are obtained from the physical quantity which is to be
measured.
Example: The Piezo electrical crystal is the example of the natural active transducer. The crystal
has the property of producing the output voltage when the external force applied to them. The
piezoelectric crystal is placed between the two metallic electrodes. When the force applied to the
crystal, the voltage induces across it.
Passive Transducer
In passive transducer, the output is obtained by changing the physical properties (resistance,
inductance, and capacitance) of the material. In other words, the passive transducer takes
power from the external energy source for transduction. The word transduction means
conversion of energy from one form to another.
62 | Peripheral and Interfacing
Example: The linear potentiometer is the examples of the passive transducer. It is used for
measuring the displacement. The POT requires the external power source ei for work. It measures
the linear displacement xi.
Consider the L is the length of the potentiometer. Ri is their total internal resistance and xi is their
input displacement. The output voltage is calculated by the formula shown below.
15. Draw the circuit of multiplexed LED interfacing with IC-7447 and explain the working
procedure. (2015,11)
The Light Emitting Diode (LED), finds its place in many applications in this modern electronic
fields. One of them is the Seven Segment Display. Seven-segment displays contains the
arrangement of the LEDs in “Eight” (8) passion, and a Dot (.) with a common electrode, lead
(Anode or Cathode). The purpose of arranging it in that passion is that we can make any number
out of that by switching ON and OFF the particular LED’s. Here is the block diagram of the Seven
Segment LED arrangement.
64 | Peripheral and Interfacing
Pin configuration of a seven segment display:
17. Draw and explain the circuit to drive a single seven segment LED display. (2017)
Answer:
Figure shows a circuit that you might connect to a parallel port on a microcomputer to drive a
single 7-segment, common-anode display. For a common-anode display, a segment is tuned on by
applying a logic low to it.
• The 7447 converts a BCD code applied to its inputs to the pattern of lows required to display the
number represented by the BCD code. This circuit connection is referred to as a static display
because current is being passed through the display at all times.
68 | Peripheral and Interfacing
• Each segment requires a current of between 5 and 30mA to light. Let’s assume you want a
current of 20mA. The voltage drop across the LED when it is lit is about 1.5V.
• The output low voltage for the 7447 is a maximum of 0.4V at 40mA. So assume that it is
about 0.2V at 20mA. Subtracting these two voltage drop from the supply voltage of 5V leaves
3.3V across the current limiting resistor. Dividing 3.3V by 20mA gives a value of 168Ω for the
current-limiting resistor. The voltage drops across the LED and the output of 7447 are not
exactly predictable and exact current through the LED is not critical as long as we don’t exceed
its maximum rating.
Statement: Interface an 8-digit 7 segment LED display using 8255 to the 8085 microprocessor
system and write an 8085 assembly language routine to display message on the display.
HARDWARE FOR EIGHT DIGIT SEVEN SEGMENT DISPLAY INTERFACE
Fig. shows the multiplexed eight 7-segment display connected in the 8085 system using 8255. In
this circuit port A and port B are used as simple latched output ports. Port A provides the segment
data inputs to the display and port B provides a means of selecting a display position at a time for
multiplexing the displays. A0-A7 lines are used to decode the addresses for 8255. For this circuit
different addresses are:
PA = 00H PB = 01H
PC = 02H CR = 03H.
The register values are chosen in Fig. such that the segment current is 80 mA. This current is
required to produce an average of 10 mA per segment as the displays are multiplexed. In this type
of display system, only one of the eight display position is 'ON' at any given instant. Only one digit
is selected at a time by giving low signal on the corresponding control line. Maximum anode
current is 560 mA (7-segments x 80 mA = 560 mA), but the average anode current is 70 mA.
Peripheral and Interfacing | 69
19.Define the following terms: (2021)
(i) Resolution
(ii)Refresh Rate
(i)Resolution: Resolution refers to the level of detail or clarity in an image, video, display, or any
other visual representation. It is a measurement of the number of pixels or dots that can be
displayed horizontally and vertically in an image or on a screen. In digital imaging and display
technologies, resolution is typically expressed as the total number of pixels or dots in the
horizontal and vertical dimensions. For example, a resolution of 1920x1080 indicates that there
are 1920 pixels in the horizontal direction and 1080 pixels in the vertical direction. Resolution can
affect the sharpness, clarity, and level of detail in an image or display. Higher resolutions generally
offer more precise and detailed visuals, while lower resolutions may result in pixelation or less
detailed representations .Different devices and media have different standard resolutions. Some
common examples include:
Full HD (1920x1080): Commonly used for high-definition television (HDTV) and computer
monitors.
4K Ultra HD (3840x2160 or 4096x2160): Provides significantly higher detail and clarity
than Full HD.
8K Ultra HD (7680x4320): Offers even greater levels of detail and is used in advanced
displays and professional video production.
Various resolutions for digital cameras, ranging from lower resolutions (e.g., 2
megapixels) to higher resolutions (e.g., 20 megapixels or more).
It's important to note that resolution is just one aspect of image quality. Other factors, such as
color depth, contrast, and refresh rate, also contribute to the overall visual experience.
Regenerate response
(ii) Refresh Rate: Refresh rate refers to the number of times per second that a display updates
or refreshes its image. It is measured in Hertz (Hz), which represents the number of times the
display can redraw the entire screen in one second. A higher refresh rate means that the display
can refresh the image more frequently, resulting in smoother and more fluid motion. This is
particularly noticeable when viewing fast-paced content, such as video games or sports events.
The refresh rate is closely related to the concept of frames per second (fps) in video. The fps
represents the number of unique images or frames displayed per second, while the refresh rate
represents how many times the display can show those frames. For example, if a display has a
refresh rate of 60 Hz, it means that it can update the image 60 times per second. This is commonly
referred to as a 60 Hz refresh rate. Similarly, a display with a 120 Hz refresh rate can update the
image 120 times per second, resulting in smoother motion.
70 | Peripheral and Interfacing
CHAPTER 5
PRINTERS
1. What is printer? How many types of printer? Explain them briefly. (2016)
Answer: A printer is a output device that accepts text and graphic output from a computer and
transfers the information to paper, usually to standard size sheets of paper. Printers vary in size,
speed, sophistication, and cost. In general, more expensive printers are used for higher-resolution
color printing.
Different types of printer:-
There are many types of printers. But they are generally divided into two types. They are
Impact printers
Non-Impact printers
Impact Printers: In this hammers or pins strike against a ribbon and paper to print the text. This
mechanism is known as electro-mechanical mechanism. They are of two types.
Character Printer: It prints only one character at a time. It has relatively slower speed. Eg. Of
them is Dot matrix printers.
Dot Matrix Printer: It prints characters as combination of dots. Dot matrix printers are the most
popular among serial printers. These have a matrix of pins on the print head of the printer which
form the character. The computer memory sends one character at a time to be printed by the
printer. There is a carbon between the pins & the paper. The words get printed on the paper when
the pin strikes the carbon. There are generally 24 pins.
Line printer:-
As the name implies, print an entire line of text at a time. Three principal designs existed.
In drum printers, a drum carries the entire character set of the printer repeated in each column
that is to be printed.
Non-Impact Printers: There printers use non-Impact technology such as ink-jet or laser
technology. There printers provide better quality of O/P at higher speed. These printers are of
two types:
Ink-Jet Printer: It prints characters by spraying patterns of ink on the paper from a nozzle or jet.
It prints from nozzles having very fine holes, from which a specially made ink is pumped out to
create various letters and shapes. The ink comes out of the nozzle in a form of vapors. After
passing through a reflecting plate, it forms the desired letter/shape at the desired place.
Peripheral and Interfacing | 71
Laser Printer is a type of printer that utilizes a laser beam to produce an image on a drum. The
light of the laser alters the electrical charge on the drum wherever it hits. The drum is then rolled
through a reservoir of toner, which is picked up by the charged portions of the drum. Finally, the
toner is transferred to the paper through a combination of heat and pressure.
3. What are the difference between laser printer and ink-jet printer? (2014)
Answer: Comparison chart
Inkjet Printer versus Laser Printer comparison chart
Inkjet Printer Laser Printer
cost for basic printer Costly the laser printer. Less costly.
Printing speed 6 pages a minute 20 pages a minute
Color printing Yes More expensive models
Black and white quality Good Superior for small fonts
Advantages
The main benefit behind these printers is probably its efficiency and speed at
printing. Laser printers are also known as 'page printers' as they print documents a page at a
time, and performs it at a very fast rate.
They furnish highest potential production in comparison with the other types of printers. This
is generally due to the technology behind it as laser printers utilize electro-photography for
printing which results in potential output.
While it is a small issue, noise can be very unproductive and disturbing specially at a work
place, laser printers are highly optimized and barely emits any sound.
They also offer user-friendliness with other features like self-printing, where printing maybe
done without supervision thus addition productivity at the workplace.
Peripheral and Interfacing | 75
Disadvantages
Laser Printer Wireless
With the extra benefits in comparison with other printers, they are a lot more costly.
Laser printers are considerable and utilize complicated technology and perform fast output,
the result of which is a relatively large hardware gadget which can take up a lot of space.
As they are non-impact printers, multipart stationary cannot be used thus double printing
cannot be simultaneously performed.
While the cost is an issue, an initial venture only maybe worth it based on your organization's
or personal requirements, any way maintenance, servicing and mend of this hardware gadget
is also very high thus laser printers aren't very economical.
Laser printers are also known to be dangerous to the atmosphere and your health. Due to the
high voltages when running the machine, small amounts of ozone are generated which can
damage the ozone layer. Some laser printers are also known to emit particles that are
suspected to cause respiratory diseases.
5. Discuss the advantages of laser printer over Dot matrix printer. (2013)
Answer: the advantages of laser printer over Dot matrix printer
Print Quality
A typical laser printer has a resolution of 1,200 dots per inch, or dpi. It achieves this level of detail
through the use of microscopic toner powder, high-performance electronics and precision optics.
Many laser printers have color capability at the same high resolution. Some dot matrix printers
achieve 240 dpi by making repeated passes over the same printed area, though documents
produced this way take at least twice as long to print as those printed at normal quality. As a dot
matrix printer's output color depends on the ribbon, virtually none offer choices beyond black and
red.
Speed
A typical desktop laser printer turns out about four full-color pages per minute; for black-and-
white text, this rises to 25 pages per minute. Dot matrix printers are typically rated at between
200 and 600 characters per second, or about 50 pages per minute in draft mode. Some high-
output dot matrix printers achieve 1,100 characters per second, or 100 pages per minute,
although the print quality is low-resolution text.
Noise
Dot matrix technology prints by striking an inked ribbon with a column of metal pins. At the
speeds required for printing, the pins move very rapidly, producing a loud buzz. Sound-deadening
equipment covers reduce the noise to tolerable levels for office use. Laser printers are quiet by
comparison. The paper-feed mechanism produces light clicking sounds, but no sound deadening is
necessary for a laser printer.
Costs
Laser and dot matrix printers have roughly comparable initial purchase prices: as of October
2012, dot matrix models run between $250 to $600, and you can find low-end laser printers for
under $100, though most range between $150 to $600. The per-page cost for dot matrix printers
is lower, at .15 to .2 cents per page; laser printers cost from 1 to 9 cents per page. Dot matrix
printers use inexpensive ribbons and have little other maintenance; however, the toner cartridges
used for laser printing figure heavily into operating costs.
76 | Peripheral and Interfacing
6. What are the advantages of impact printer over non-impact printers? [2020]
The Advantages of Impact Printers
Impact printing, also known as dot matrix printing, used to be the predominant type of printer
before non-impact printers, like laser printers, were introduced in the mid-1980s.
Cost
Impact printers are the lowest-cost printing technology, and recent advancements continue to
improve and enhance this. They have both the lowest-cost price per page and the printers
themselves tend to be affordable due to the simplicity of the technology, which consists of an
actuator impacting ribbon to make a mark on paper.
Reliability
Impact printers are well-known for their reliability and for their ability to work in harsh
conditions and environments, such as heat, cold, humidity and dust, without breaking down. Their
technology is less delicate than that of inkjet or laser printers, so they require less maintenance
and have operational issues less frequently.
Applications
Impact printers' ability to print multi-page documents like forms and carbon copies and their bar-
code printing capability is unmatched by lasers and inkjets. Additionally, they are ideal for data-
logging because they can use scrolls of paper rather than just single pages. Impact printers can
also be used to print on heat-sensitive labels and for condensed printing applications.
Performance
Besides being low maintenance and able to withstand harsher treatment, impact printers have
improved performance in particular environments. For example, although their printing quality
may be lower than more expensive laser printers, they can print at high speeds. This is an
advantage in environments where print quantity is more important the print quality.
Droplets formation
Firstly droplets with the same volume need to be produced. For the continuous printers, the ink is
pushed out from the orifice by the pressure and separated into the drops by the charge electrode
according to the character data. For the DOD printer, however, they eject droplet by applying
voltage, which will change the volume of the channel (piezo-electrically driven) or produce bubble
in the channel (thermal driven) to jet the ink out.
Image generation
Then the ink droplets print on the substrate. For the continuous printers, the droplets are loaded
with certain amount of charges, and distracted from their straight trajectory under the deflecting
electrode to land at desired places. For the DOD printer, by moving the substrate, the droplets jet
to the right place as they only produced when it is demanded.
Cost The price of needles for an The price of ink required for a non-
Effectiveness impact printer is less than the impact printer becomes its biggest
other parts. drawback.
Speed Slower Faster
Type Dot-matrix printer, Daisy wheel Inkjet printers, photo printers, laser
printers, line printer, Drum printers, thermal printers, mobile
printers, chain printers, and band printers, plotters, and large-format
printers. printers.
78 | Peripheral and Interfacing
Tool Uses either needle or other Only uses ink or laser to perform a
pointy objects. function.
Step 1: Printer Controller Receives Page Data & Creates Raster Image
80 | Peripheral and Interfacing
As you provide the print command, the computer encodes the data using 'Printer Command
Language', 'Adobe Postscript' language or 'XML Page Specification' to describe the entire page in
terms of vector graphics. This information is received by the 'Printer Controller'. It reads the data,
arranges the page according to specifications and then orders the 'Raster Image Processor'
embedded within the printer to convert it into a bitmap or raster image. This image is temporarily
stored in the printer memory, after which actual printing process begins.
Step 2: Rolling Photoreceptor Drum is positively charged
Central to the working of the laser printer is a rolling photoconductive drum, which can hold
charge on its surface until exposed to light, which makes it discharge. Light photons incident on
the drum's surface improve the conductivity in that region to make it locally discharge in that
area. You may interpret this as photons erasing the stored charge in incident region. Using a high
voltage corona wire, the drum is either positively or negatively charged. In the course of this
discussion, let us assume that the drum is positively charged.
Step 3: Laser Draws an Electrostatic Image of Page on Photosensitive Surface
This rolling drum is then exposed to light output of the laser. Using a complex system made up of
mirrors and lenses, the laser 'draws' the bitmap image on the surface of the drum. According to
the data fed to the raster processor, the laser photon stream hits the moving surface of the
photosensitive drum. The region where photons hit the drum gets discharged creating a net
negative charge on the surface of the drum. Part by part, the entire bitmap or raster image is
etched onto the drum in the form of a negative electrostatic image! Imagine a glass windows
surface coated with dust. Just as you can 'draw' on the window by wiping off dust from the glass
surface with a finger, so does a laser draw an image on the drum by wiping off positive charge.
Once the entire image is drawn, the drum rolls further.
Step 4: Positively Charged Toner Particles Are Embedded in Negative Regions
Along the drum path, a toner developer is placed, which subjects the surface to come in contact
with 'positively charged' toner particles. The toner is a dry powder made up of pigment and a
plastic polymer. Since unlike charges attract and like charges repel, the positively charged surface
of the drum doesn't pull any toner particles. Only the negatively charged (discharged) region on
the drum, which makes up the page image attracts or pulls toner particles to the surface. Thus
toner particles get embedded on the drum, right over the embedded electrostatic image of the
page!
Step 5: Paper Passes Over Drum to Print Image
Now this toner embedded drum surface comes in contact with negatively charged paper. As the
paper surface comes in contact with the drum, only the positively charged toner particles stick to
the paper, creating an exact image of the page (That's right, because unlike charges attract)! Now
the paper rolling out has toner particles attached to it.
Step 6: Heated Rollers Fuse Toner on Paper
This page is then passed through hot Teflon coated rollers which melt plastic in the toners, to
make it stick on paper, providing us with a printed paper that is the exact physical copy of the soft
copy on computer! It then rolls out, ready to be picked up and used for whatever purpose it is
printed.
Peripheral and Interfacing | 81
CHAPTER 6
STORAGE DEVICES
1. What is optical disk? How many types of optical disk? Explain them briefly.(2017)
Answer An optical disk is any computer disk that uses optical storage techniques and technology
to read and write data. It is a computer storage disk that stores data digitally and uses laser beams
(transmitted from a laser head mounted on an optical disk drive) to read and write data.
. Optical disks can store much more data -- up to 6 gigabytes (6 billion bytes) -- than most portable
magnetic media, such as floppies. There are three basic types of optical disks:
CD-ROM :Like audio CDs, CD-ROMs come with data already encoded onto them. The data
is permanent and can be read any number of times, but CD-ROMs cannot be modified.
WORM : Stands for write-once, read -many. With a WORM disk drive, you can write data
onto a WORM disk, but only once. After that, the WORM disk behaves just like a CD-ROM.
Erasable: Optical disks that can be erased and loaded with new data, just like magnetic
disks. These are often referred to as EO (erasable optical) disks.
These three technologies are not compatible with one another; each requires a different type of
disk drive and disk. Even within one category, there are many competing formats, although CD-
ROMs are relatively standardized.
Half step excitation mode is a combination of one phase on and two phase on full step modes. This
results in half the basic step angle. This smaller step angle provides smoother operation due the
increased resolution of the angle.
The block of ROM has 'n' input lines and 'm' output lines. Each bit combination of the input
variables is known as an address. Each bit combination that comes out through output lines is
called a word. The number of bits per word is equal to the number of output lines, m.
The address of a binary number refers to one of the addresses of n variables. So, the number of
possible addresses with 'n' input variables is 2n. An output word has a unique address, and as
there are 2n distinct addresses in a ROM, there are 2n separate words in the ROM. The words on
the output lines at a given time depends on the address value applied to the input lines.
Internal Structure of ROM:
The internal structure comprises two basic components: decoder and OR gates. A decoder is a
circuit that decodes an encoded form (such as binary coded decimal, BCD) to a decimal form. So,
the input is in binary form, and the output is its decimal equivalent. All the OR gates present in the
ROM will have outputs of the decoder as their output. Let us take an example of 64 x 4 ROM. The
structure is shown in the following image.
88 | Peripheral and Interfacing
This Read Only Memory consists of 64 words of 4 bits each. So, there would be four output lines,
and one of the 64 words available on the output lines is determined from the six input lines as we
have only six inputs because in this ROM we have 26 = 64, so we can specify 64 addresses or
minterms. For each address input, there is a unique selected word. For example, if the input
address is 000000, word number 0 will be selected and applied to the output lines. If the input
address is 111111, word number 63 is selected and applied to the output lines.
Types of ROM:
1) Masked Read Only Memory (MROM):
It is the oldest type of read only memory (ROM). It has become obsolete so it is not used anywhere
in today's world. It is a hardware memory device in which programs and instructions are stored at
the time of manufacturing by the manufacturer. So it is programmed during the manufacturing
process and can't be modified, reprogrammed, or erased later.
The MROM chips are made of integrated circuits. Chips send a current through a particular input-
output pathway determined by the location of fuses among the rows and columns on the chip. The
current has to pass along a fuse-enabled path, so it can return only via the output the
manufacturer chooses. This is the reason the rewriting and any other modification is not
impossible in this memory.
2) Programmable Read Only Memory (PROM):
PROM is a blank version of ROM. It is manufactured as blank memory and programmed after
manufacturing. We can say that it is kept blank at the time of manufacturing. You can purchase
and then program it once using a special tool called a programmer.
In the chip, the current travels through all possible pathways. The programmer can choose one
particular path for the current by burning unwanted fuses by sending a high voltage through
them. The user has the opportunity to program it or to add data and instructions as per his
Peripheral and Interfacing | 89
requirement. Due to this reason, it is also known as the user-programmed ROM as a user can
program it.
To write data onto a PROM chip; a device called PROM programmer or PROM burner is used. The
process or programming a PROM is known as burning the PROM. Once it is programmed, the data
cannot be modified later, so it is also called as one-time programmable device.
Uses: It is used in cell phones, video game consoles, medical devices, RFID tags, and more.
3) Erasable and Programmable Read Only Memory (EPROM):
EPROM is a type of ROM that can be reprogramed and erased many times. The method to erase
the data is very different; it comes with a quartz window through which a specific frequency of
ultraviolet light is passed for around 40 minutes to erase the data. So, it retains its content until it
is exposed to the ultraviolet light. You need a special device called a PROM programmer or PROM
burner to reprogram the EPROM.
Uses: It is used in some micro-controllers to store program, e.g., some versions of Intel 8048 and
the Free scale 68HC11.
4) Electrically Erasable and Programmable Read Only Memory (EEPROM):
ROM is a type of read only memory that can be erased and reprogrammed repeatedly, up to
10000 times. It is also known as Flash EEPROM as it is similar to flash memory. It is erased and
reprogrammed electrically without using ultraviolet light. Access time is between 45 and 200
nanoseconds.
The data in this memory is written or erased one byte at a time; byte per byte, whereas, in flash
memory data is written and erased in blocks. So, it is faster than EEPROM. It is used for storing a
small amount of data in computer and electronic systems and devices such as circuit boards.
Uses: The BIOS of a computer is stored in this memory.
5) FLASH ROM:
It is an advanced version of EEPROM. It stores information in an arrangement or array of memory
cells made from floating-gate transistors. The advantage of using this memory is that you can
delete or write blocks of data around 512 bytes at a particular time. Whereas, in EEPROM, you can
delete or write only 1 byte of data at a time. So, this memory is faster than EEPROM.
It can be reprogrammed without removing it from the computer. Its access time is very high,
around 45 to 90 nanoseconds. It is also highly durable as it can bear high temperature and intense
pressure.
Uses: It is used for storage and transferring data between a personal computer and digital
devices. It is used in USB flash drives, MP3 players, digital cameras, modems and solid-state drives
(SSDs). The BIOS of many modern computers are stored on a flash memory chip, called flash BIOS.
RAM
RAM, which stands for Random Access Memory, is a hardware device generally located on the
motherboard of a computer and acts as an internal memory of the CPU. It allows CPU store data,
program, and program results when you switch on the computer. It is the read and write memory
of a computer, which means the information can be written to it as well as read from it.
Types of RAM:
Integrated RAM chips can be of two types:
1. Static RAM (SRAM):
2. Dynamic RAM (DRAM):
90 | Peripheral and Interfacing
Both types of RAM are volatile, as both lose their content when the power is turned off.
1) Static RAM:
Static RAM (SRAM) is a type of random access memory that retains its state for data bits or holds
data as long as it receives the power. It is made up of memory cells and is called a static RAM as it
does not need to be refreshed on a regular basis because it does not need the power to prevent
leakage, unlike dynamic RAM. So, it is faster than DRAM.
It has a special arrangement of transistors that makes a flip-flop, a type of memory cell. One
memory cell stores one bit of data. Most of the modern SRAM memory cells are made of six CMOS
transistors, but lack capacitors. The access time in SRAM chips can be as low as 10 nanoseconds.
Whereas, the access time in DRAM usually remains above 50 nanoseconds.
Furthermore, its cycle time is much shorter than that of DRAM as it does not pause between
accesses. Due to these advantages associated with the use of SRAM, It is primarily used for system
cache memory, and high-speed registers, and small memory banks such as a frame buffer on
graphics cards.
The Static RAM is fast because the six-transistor configuration of its circuit maintains the flow of
current in one direction or the other (0 or 1). The 0 or 1 state can be written and read instantly
without waiting for the capacitor to fill up or drain. The early asynchronous static RAM chips
performed read and write operations sequentially, but the modern synchronous static RAM chips
overlap read and write operations.
The drawback with Static RAM is that its memory cells occupy more space on a chip than the
DRAM memory cells for the same amount of storage space (memory) as it has more parts than a
DRAM. So, it offers less memory per chip.
Peripheral and Interfacing | 91
2) Dynamic RAM:
Dynamic Ram (DRAM) is also made up of memory cells. It is an integrated circuit (IC) made of
millions of transistors and capacitors which are extremely small in size and each transistor is
lined up with a capacitor to create a very compact memory cell so that millions of them can fit on a
single memory chip. So, a memory cell of a DRAM has one transistor and one capacitor and each
cell represents or stores a single bit of data in its capacitor within an integrated circuit.
The capacitor holds this bit of information or data, either as 0 or as 1. The transistor, which is also
present in the cell, acts as a switch that allows the electric circuit on the memory chip to read the
capacitor and change its state.
The capacitor needs to be refreshed after regular intervals to maintain the charge in the capacitor.
This is the reason it is called dynamic RAM as it needs to be refreshed continuously to maintain its
data or it would forget what it is holding. This is achieved by placing the memory on a refresh
circuit that rewrites the data several hundred times per second. The access time in DRAM is
around 60 nanoseconds.
We can say that a capacitor is like a box that stores electrons. To store a ?1? in the memory cell,
the box is filled with electrons. Whereas, to store a ?0?, it is emptied. The drawback is that the box
has a leak. In just a few milliseconds the full box becomes empty. So, to make dynamic memory
work, the CPU or Memory controller has to recharge all the capacitors before they discharge. To
achieve this, the memory controller reads the memory and then writes it right back. This is called
refreshing the memory and this process continues automatically thousands of times per second.
So, this type of RAM needs to be dynamically refreshed all the time.
92 | Peripheral and Interfacing
Types of DRAM:
i) Asynchronous DRAM:
This type of DRAM is not synchronized with the CPU clock. So, the drawback with this RAM is that
CPU could not know the exact timing at which the data would be available from the RAM on the
input-output bus. This limitation was overcome by the next generation of RAM, which is known as
the synchronous DRAM.
ii) Synchronous DRAM:
SDRAM (Synchronous DRAM) began to appear in late 1996. In SDRAM, the RAM was synchronized
with the CPU clock. It allowed the CPU or to be precise the memory controller to know the exact
clock cycle or timing or the number of cycles after which the data will be available on the bus. So,
the CPU does not need for the memory accesses and thus the memory read and write speed can be
increased. The SDRAM is also known as the single data rate SDRAM (SDR SDRAM) as data is
transferred only at each rising edge of the clock cycle. See the image in the following description.
iii) DDR SDRAM:
Peripheral and Interfacing | 93
The next generation of the synchronous DRAM is known as the DDR RAM. It was developed to
overcome the limitations of SDRAM and was used in PC memory at the beginning of the year 2000.
In DDR SDRAM (DDR RAM), the data is transferred twice during each clock cycle; during the
positive edge (rising edge) and the negative edge (falling edge) of the cycle. So, it is known as the
double data rate SDRAM.
There are different generations of DDR SDRAM which include DDR1, DDR2, DDR3, and DDR4.
Today, the memory that we use inside the desktop, laptop, mobile, etc., is mostly either DDR3 or
DDR4 RAM. Types of DDR SDRAM:
a) DDR1 SDRAM:
DDR1 SDRAM is the first advanced version of SDRAM. In this RAM, the voltage was reduced from
3.3 V to 2.5 V. The data is transferred during both the rising as well as the falling edge of the clock
cycle. So, in each clock cycle, instead of 1 bit, 2 bits are being pre-fetched which is commonly
known as the 2 bit pre-fetch. It is mostly operated in the range of 133 MHz to the 200 MHz.
Furthermore, the data rate at the input-output bus is double the clock frequency because the data
is transferred during both the rising as well as falling edge. So, if a DDR1 RAM is operating at 133
MHz, the data rate would be double, 266 Mega transfer per second.
ii) DDR2 SDRAM:
It is an advanced version of DDR1. It operates at 1.8 V instead of 2.5V. Its data rate is double the
data rate of the previous generation due to the increase in the number of bits that are pre-fetched
during each cycle; 4 bits are pre-fetched instead of 2 bits. The internal bus width of this RAM has
been doubled. For example, if the input-output bus is 64 bits wide, the internal bus width of it will
be equal to 128 bits. So, a single cycle can handle double the amount of data.
iii) DDR3 SDRAM:
In this version, the voltage is further reduced from 1.8 V to the 1.5 V. The data rate has been
doubled than the previous generation RAM as the number of bits that are pre-fetched has been
increased from 4 bits to the 8 bits. We can say that the internal data bus width of RAM has been
increased 2 times than that of the last generation.
94 | Peripheral and Interfacing
iv) DDR4 SDRAM:
In this version, the operating voltage is further reduced from 1.5 V to 1.2 V, but the number of bits
that can be pre-fetched is same as the previous generation; 8 bits per cycle. The Internal clock
frequency of the RAM is double of the previous version. If you are operating at 400 MHz the clock
frequency of the input-output bus would be four times, 1600 MHz and the transfer rate would be
equal to 3200 Mega transfer per second.
When evaluating storage devices, several criteria are considered to determine their suitability for
specific needs. Here are some common evaluation criteria for storage devices:
1. Capacity: Capacity refers to the amount of data that a storage device can hold. It is usually
measured in bytes (such as gigabytes, terabytes, or petabytes). Higher capacity is desirable for
storing large amounts of data, while smaller capacity may be sufficient for basic storage needs.
2. Performance: Performance measures how quickly data can be read from or written to the
storage device. Factors affecting performance include data transfer rates, access times, and
input/output operations per second (IOPS). High-performance storage devices are preferred
for tasks that require fast data access, such as gaming, video editing, and database
applications.
3. Reliability: Reliability is critical for ensuring data integrity and preventing data loss. Factors
like Mean Time Between Failures (MTBF), error correction capabilities, and endurance play a
role in determining the reliability of a storage device. Reliability is particularly important for
critical applications and enterprise environments where data integrity is crucial.
4. Durability: Durability refers to a storage device's ability to withstand physical stress,
including shocks, vibrations, and temperature variations. Robust construction and design
features like shock resistance or temperature tolerance are important for storage devices that
will be exposed to harsh environments or used in portable devices.
5. Compatibility: Compatibility is essential to ensure that the storage device can be used with
the intended system or device. Factors to consider include the interface (e.g., SATA, USB,
Thunderbolt), file system compatibility (e.g., NTFS, FAT32), and operating system support
(e.g., Windows, macOS, Linux).
6. Scalability: Scalability refers to the ability to expand the storage capacity of the device as
needed. Some storage devices, like NAS systems, offer expandable storage through additional
drive bays or support for external storage expansion. Scalability is important when future
storage needs may grow over time.
Peripheral and Interfacing | 95
7. Cost: Cost considerations include the initial purchase cost of the storage device as well as
ongoing maintenance costs. Different storage technologies have varying price points, and the
cost should align with the specific storage requirements and budget constraints.
8. Power Efficiency: Power efficiency is important, especially for portable devices or systems
that prioritize energy conservation. Storage devices that consume lower power can extend
battery life and reduce energy costs in larger deployments.
9. Data Protection and Security: For sensitive data, data protection and security features such
as encryption, data redundancy, and secure erase capabilities are crucial to safeguard against
unauthorized access or data loss.
10. Warranty and Support: The warranty and support offered by the storage device
manufacturer can provide peace of mind and assistance in case of any issues or failures.
The relative importance of these evaluation criteria depends on the specific use case and
requirements of the storage solution. It's essential to consider these factors and prioritize them
according to the intended purpose and environment of the storage device.
10)What is back up? Write down the importance of back up. (2021)
Back up: Backup refers to the process of creating copies or duplicates of important data, files, or
systems to protect against data loss, accidental deletion, hardware failures, disasters, or other
unforeseen events. The backup serves as a safeguard to restore the original data or system in case
the primary copy becomes inaccessible or corrupted.
Importance of back up: The importance of backups cannot be overstated. Here are some key
reasons why backups are crucial:
1. Data Loss Prevention: Data loss can occur due to various reasons, such as hardware failures,
software glitches, human errors, malware attacks, natural disasters, or theft. Backups provide
a safety net by creating copies of valuable data. If the original data becomes corrupted,
inaccessible, or lost, backups can be used to restore the data and minimize the impact of data
loss.
2. Disaster Recovery: In the event of a system failure, data corruption, or a catastrophic event
like a fire or flood, backups play a vital role in disaster recovery. They enable organizations
and individuals to recover their data and systems quickly, reducing downtime and allowing
them to resume normal operations as soon as possible.
3. Accidental Deletion and Human Error: Human errors, such as accidental file deletions,
formatting the wrong drive, or overwriting critical data, are common and can result in
significant data loss. Backups serve as a safety measure, providing a way to retrieve the
deleted or modified files and restore them to their original state.
4. Protection against Malware and Cyberattacks: The threat of malware, ransomware, and
other cyberattacks continues to increase. These malicious activities can encrypt, damage, or
delete data, making it inaccessible or irrecoverable. Having backups allows users to restore
their systems and data to a clean state, eliminating the need to pay ransom or suffer from
permanent data loss.
5. Business Continuity: For businesses, data is a crucial asset. Regular backups are essential for
business continuity, ensuring that critical data, customer information, financial records, and
operational data can be recovered in case of disruptions. Backups help minimize the impact of
data loss on business operations, customer trust, and revenue.
6. Version Control and Data Recovery: Backups allow for version control, enabling users to
revert to previous versions of files or systems. This is beneficial when mistakes are made or
when specific versions of data or configurations need to be accessed. It also provides a way to
Peripheral and Interfacing | 97
recover from software updates or system changes that cause compatibility issues or
unexpected behavior.
CHAPTER 7
DATA COMMUNICATION AND NETWORK
1. Explain the methods of parallel data transfer. (2015,2018)
Answer: When data is sent using parallel data transmission, multiple data bits are transmitted
over multiple channels at the same time. This means that data can be sent much faster than using
serial transmission methods.
From previous discussions, we know that microcontrollers make use of TTL level UART while the
PC serial port uses RS-232. Since both standards uses similar software protocol, both of them are
able to communicate via UART. However, because of the differences in voltage level and polarity,
we will need a level shifter to interface the TTL level UART with the RS-232. Nowadays, this can
be easily done with the commonly available IC such as the MAX232 from Maxim.
In this way, this unit selects one of the three registers- data buffer register, control register, status
register.
102 | Peripheral and Interfacing
3. Modem control (modulator/demodulator) –
A device converts analog signals to digital signals and vice-versa and helps the computers to
communicate over telephone lines or cable wires. The following are active-low pins of Modem.
DSR: Data Set Ready signal is an input signal.
DTR: Data terminal Ready is an output signal.
CTS: It is an input signal which controls the data transmit circuit.
RTS: It is an output signal which is used to set the status RTS.
4. Transmit buffer –
This block is used for parallel to serial converter that receives a parallel byte for conversion into
serial signal and further transmission onto the common channel.
TXD: It is an output signal, if its value is one, means transmitter will transmit the data.
5. Transmit control –
This block is used to control the data transmission with the help of following pins:
TXRDY: It means transmitter is ready to transmit data character.
TXEMPTY: An output signal which indicates that TXEMPTY pin has transmitted all the
data characters and transmitter is empty now.
TXC: An active-low input pin which controls the data transmission rate of transmitted
data.
6. Receive buffer –
This block acts as a buffer for the received data.
RXD: An input signal which receives the data.
7. Receive control –
This block controls the receiving data.
RXRDY: An input signal indicates that it is ready to receive the data.
RXC: An active-low output signal which controls the data transmission rate of received data.
SYNDET/BD: An input or output terminal. External synchronous mode-input terminal and
asynchronous mode-output terminal.
In order to achieve this communication, both the sending and receiving DCEs must use the same
modulating method (e.g., FSK), much the way that if you want to communicate to someone who
understands one particular language, and then you must speak the particular language.
A straight-through or "one to one" cable is used to connect a DTE device (PC) to a DCE device
(modem or other communications device). The transmit and receive lines are not cross-connected
in this case, hence the name. The StarTech MXT100FF is an example of a straight-through cable.
Simple Null Modem Cable
If you connect two DTE's or two DCE's using a straight serial cable, then the TD pin on each device
are connected to each other, and the RD pin on each device are connected to each other.
Therefore, to connect two like devices, you must use a null modem cable. As shown below, null
modem cables cross the transmit and receive lines in the cable.
13. Show the major signal groups for the GPIB (IEEE488) bits. (2014)
Answer: The GPIB or General Purpose Interface Bus or IEEE 488 bus is still one of the more
popular and versatile interface standards available today.
GPIB is widely used for enabling electronics test equipment to be controlled remotely, although it
was also used in a many other applications including general computer communications.
The IEEE 488 bus is a parallel bus, (see "IEEE 488 bus lines," below), transferring eight data bits
at a time. In addition to the eight data I/O bits, the bus has eight control signals, including three
handshake lines and five bus-management lines. Also included in the bus are eight ground lines
used for shielding and ground returns. The maximum data rate over the standard IEEE bus is 1
MB/sec., although there is a proposal making its way through the standards-approval process
that would speed up the bus to 8 MB/sec. In either case, the actual throughput you will obtain
from the system will be much lower than the maximum data rate.
Peripheral and Interfacing | 109
To connect test equipment to a computer using the IEEE 488 bus, you need to install an interface
card in the computer. These are available from several sources and are relatively inexpensive.
This card, along with the software necessary to use it, turns the computer into the "system
controller." The system controller can talk and listen to other devices on the bus, and control bus
operation.
110 | Peripheral and Interfacing
Within IEEE 488, the equipment on the bus falls into three categories, although items can fulfill
more than one function:
Controller: As the name suggests, the controller is the entity that controls the operation of
the bus. It is usually a computer and it signals that instruments are to perform the various
functions. The GPIB controller also ensures that no conflicts occur on the bus. If two talkers
tried to talk at the same time then data would become corrupted and the operation of the
whole system would be seriously impaired. It is possible for multiple controllers to share the
same bus; but only one can act as a controller at any particular time.
Listener: A listener is an entity connected to the bus that accepts instructions from the bus.
An example of a listener is an item such as a printer that only accepts data from the bus
Talker: This is an entity on the bus that issues instructions / data onto the bus.
Many items will fulfil more than one function. For example a voltmeter which is controlled over
the bus will act as a listener when it is being set up, and then when it is returning the data, it will
act as a talker. As such it is known as a talker / listener.
Accordingly, there exists two basic categories of Null modem. They are:
Female-to-female end null modem – They are mostly used in such processes in which there
is a requirement to interconnect two DTE systems.
Male to male end null modem – They are mostly used in such processes in which there is a
requirement to interconnect two DCEs. Equivalent of this null modem would be used to
connect two DCE systems.
Depending on the type of communication under use, this Null modem will consist extra
connections. In this case, DB25 connector will be required. For example: Synchronous type of
communication needs extra connection for timing signals.
The various signals, their pin configurations and direction is described below:
Peripheral and Interfacing | 111
It was a
time, when null modem cables were commonly used for remote operations or file transfer
between computers. However, now a days, virtual null modem is also being used in place of null
modem cable. A virtual null modem is a method by which different computer applications can be
connected directly with the help of a virtual serial port. In other words we can say it as a virtual
null modem is a software application which simulates a hardware null modem within the
computer. A virtual null modem contains all features of a null modem cable in it. A virtual Null
modem has following advantage over physical Null modem cable:
very high transmission speed of serial data
Cable length restrictions no longer exist.
Possibility of unlimited number of virtual connections.
Computer’s physical serial ports remain free.
17. How will you use IC-8251 USART with a modem for transmitting data over a long range?
(2014, 2019)
8251 universal synchronous asynchronous receiver transmitter (USART) acts as a mediator
between microprocessor and peripheral to transmit serial data into parallel form and vice versa.
1. It takes data serially from peripheral (outside devices) and converts into parallel data.
2. After converting the data into parallel form, it transmits it to the CPU.
3. Similarly, it receives parallel data from microprocessor and converts it into serial form.
4. After converting data into serial form, it transmits it to outside device (peripheral).
18. Describe the function of major signals in the RS-232C standard (2014)
RS-232C is a long-established standard ("C" is the current version) that describes the physical
interface and protocol for relatively low-speed serial data communication Networks between
computers and related devices.
RS-232 Mechanical Specification
There is a standardized pin out for RS-232 on a DB25 connector, as shown in Figure.
Peripheral and Interfacing | 113
The essential feature ofRS-232 is that the signals are carried as single voltages referred to a
common ground on pin 7. In its simplest form, the RS-232:C interface consis;9'of only two wires
for data and ground. The ground is the absolute voltage reference for all the interface circuitry,
the point in the circuit from which all voltages are measured. Data on pin 2 of the DTE is
transmitted, while the same data on pin 2 of a DCE (modem) is received data as shown in Figure.
Data is transmitted and received on pins 2 and 3, respectively. Data Set Ready (DSR) is an
indication from the Data set (the modem or DSU/CSU) that it is on. Similarly, DTR indicates that
the DTE is on. Carrier Detect (CD) indicates that carrier for the transmission data is on.
Pins 4 and 5 carry the Request to Send (RTS) and Clear to Send (CTS) signals. In most situations,
RTS and CTS are constantly on the communication session. However, where the DTE is connected
to a multipoint line, RTS is used to turn the carrier on the modem on and off. On a multipoint line,
it is imperative that only one station is transmitting at a time. When a station wants to transmit, it
raises RTS. The modem turns on carrier, typically waits a few milliseconds for carrier to stabilize,
and raises CTS.
The DTE transmits when it sees CTS up. When the station has finished its transmission, it drops
RTS and the modem drops CTS and carrier together.
114 | Peripheral and Interfacing
In synchronous serial data transfer, the sending computer puts the data byte it wants to send
into an internal shift register.
The sending computer uses a clock to shift the 8 data bits out of the shift register onto an
external data pin.
The receiving computer puts the data from the sending computer on the input of an internal
shift register.
The receiving computer uses the clock from the sending computer to shift the data into its
shift register.
After 8 clock ticks, the data has been transferred from the sending computer to the receiving
computer.
116 | Peripheral and Interfacing
20. Write a program to communicate between two microprocessor using 8255. (2010)
Program:
.OUTPUT 2500AD
CONTROL EQU FFC6H ;control port address for 8255
PORTA EQU FFC0H ;porta address for 8255
PORTB EQU FFC2H ;portb address for 8255
PORTC EQU FFC4H ;portc address for 8255
KWAD EQU F800 : 4EEDH
DBDTA EQUF800 : 4F1FH
DSEG SEGMENT
ORG 0000 : 4000H
MSG DB 'Enter channel No',0h
DSEG ENDS
CSEG SEGMENT
ASSUME CS : CSEG, DS : DSEG
ORG 0000 : 5000H
;displaying message on LCD
Callfarf800 : 4bb1h ;clear display
movdi, 80h ;display in upper line
MOV SI, offset MSG ;
CALLFAR f800 : 4FC0h ;display output routine
MOV AX, 0000H
MOV DS, AX
;AD00: CALL FAR KWAD ;get key for channel selection
MOV CX, SI
MOV AL, 90H ;control word for PPI
MOV DX, CONTROL
Peripheral and Interfacing | 117
OUT DX, AL ;portA->i/p port,portB->o/p port
;portC->o/p port.
AD00: MOV AL, CL ;output channel number
MOV DX, PORTC
OUT DX, AL ;start conversion
MOV AL, 0FH ;PC7 (START/ALE) set
MOV DX, CONTROL
OUT DX, AL
PUSH CX
MOV CX, 3FFFH
DEL1: LOOP DEL1
POP CX
MOV AL, 0EH ;PC7 reset
MOV DX, CONTROL
OUT DX, AL ;look for EOC
MOV AL, 0CH ;reset PC6 to read EOC
OUT DX, AL
AD01: MOV DX, PORTA
IN AL, DX ;poll the EOC line which
AND AL, 80H ;is connected to PA7 line
CMP AL, 80H
JNZ AD01 ;if EOC (PA7) is high read the digital value otherwise again check for EOC
(PA7) line
MOV AL, 0DH ;set OE (PC6) to read value
MOV DX, CONTROL
OUT DX, AL ;before reading data from ADC set PC6 line
MOV DX, PORTA
IN AL, DX ;read digital value
MOV AH, 00H
MOV SI, AX
PUSH CX
CALL FAR DBDTA ;display digital value
POP CX
JMP AD00
CSEG ENDS
END
118 | Peripheral and Interfacing
A straight-through or "one to one" cable is used to connect a DTE device (PC) to a DCE device
(modem or other communications device). The transmit and receive lines are not cross-connected
in this case, hence the name.
Simple Null Modem Cable
Peripheral and Interfacing | 119
Null Modem Cable with Handshake
A Null Modem or "crossover" cable is used to connect to DTE devices together. For this to work,
the Transmit (TxD) pin of one device needs to be connected to the Receive (RxD) pin of the other
device, and vice versa.
To enable handshaking between the two devices, the Request to Send (RTS) pin of one device
must be connected to the Clear to Send (CTS) pin of the other device, and the Data Set Ready
(DSR) pin is connected to the Data Terminal Ready (DTR) pin of the other.
Null modem adapters can also be used at the end of a straight-through serial cable to cross the
lines.
ELDs are quite similar to capacitors except for the phosphor layer. You can think of an ELD as a
"lossy capacitor" in that it becomes electrically charged and then loses its energy in the form of
light. The insulator layers are necessary to prevent arcing between the two conductive layers.
Applications:
1. Industrial Machines – Stepper motors are used in automotive gauges and machine tooling
automated production equipment’s.
2. Security – new surveillance products for the security industry.
3. Medical – Stepper motors are used inside medical scanners, samplers, and also found inside
digital dental photography, fluid pumps, respirators and blood analysis machinery.
122 | Peripheral and Interfacing
4. Consumer Electronics – Stepper motors in cameras for automatic digital camera focus and
zoom functions.
And also have business machines applications, computer peripherals applications.
To make the motor shaft turn, first one electromagnet is given power, which makes the gear’s
teeth magnetically attracted to the electromagnet’s teeth. The point when the gear’s teeth are thus
aligned to the first electromagnet, they are slightly offset from the next electromagnet. So when
the next electromagnet is turned ON and the first is turned OFF, the gear rotates slightly to align
with the next one and from there the process is repeated. Each of those slight rotations is called a
step, with an integer number of steps making a full rotation. In that way, the motor can be turned
by a precise. Stepper motor doesn’t rotate continuously, they rotate in steps. There are 4 coils
with 90o angle between each other fixed on the stator. The stepper motor connections are
determined by the way the coils are interconnected. In stepper motor, the coils are not connected
together. The motor has 90o rotation step with the coils being energized in a cyclic order,
determining the shaft rotation direction. The working of this motor is shown by operating the
switch. The coils are activated in series in 1 sec intervals. The shaft rotates 90 o each time the next
coil is activated. Its low speed torque will vary directly with current.
Figure: Conceptual drawing of a rotary incremental encoder sensor mechanism, with the
corresponding logic states of the A and B signals
Figure: Two square waves in quadrature. The direction of rotation is indicated by the sign
of the A-B phase angle which, in this case, is negative because A trails B.
A rotary incremental encoder has two output signals, A and B, which issue square waves in
quadrature when the encoder shaft rotates. The square wave frequency indicates the speed of
shaft rotation, whereas the A-B phase relationship indicates the direction of rotation.
Some rotary incremental encoders have an additional "index" output (typically labeled Z), which
emits a pulse when the shaft passes through a particular angle. Once every rotation, the Z signal is
asserted, typically always at the same angle, until the next AB state change. This is commonly used
in radar systems and other applications that require a registration signal when the encoder shaft
is located at a particular reference angle.
Unlike absolute encoders, an incremental encoder does not keep track of, nor do its outputs
indicate the absolute position of the mechanical system to which it is attached. Consequently, to
determine the absolute position at any particular moment, it is necessary to "track" the absolute
position with an incremental encoder interface.
124 | Peripheral and Interfacing
5. GPIB (2011,2012,2014,2016,2017,2020,2021)
Answer: The GPIB or General Purpose Interface Bus or IEEE 488 bus is still one of the more
popular and versatile interface standards available today.
GPIB is widely used for enabling electronics test equipment to be controlled remotely, although it
was also used in a many other applications including general computer communications.
The IEEE 488 bus is a parallel bus, (see "IEEE 488 bus lines," below), transferring eight data bits at
a time. In addition to the eight data I/O bits, the bus has eight control signals, including three
handshake lines and five bus-management lines. Also included in the bus are eight ground lines
used for shielding and ground returns. The maximum data rate over the standard IEEE bus is 1
MB/sec., although there is a proposal making its way through the standards-approval process that
would speed up the bus to 8 MB/sec. In either case, the actual throughput you will obtain from the
system will be much lower than the maximum data rate.
Peripheral and Interfacing | 125
To connect test equipment to a computer using the IEEE 488 bus, you need to install an interface
card in the computer. These are available from several sources and are relatively inexpensive.
This card, along with the software necessary to use it, turns the computer into the "system
controller." The system controller can talk and listen to other devices on the bus, and control bus
operation.
Within IEEE 488, the equipment on the bus falls into three categories, although items can fulfill
more than one function:
Controller: As the name suggests, the controller is the entity that controls the operation of
the bus. It is usually a computer and it signals that instruments are to perform the various
functions. The GPIB controller also ensures that no conflicts occur on the bus. If two talkers
tried to talk at the same time then data would become corrupted and the operation of the
whole system would be seriously impaired. It is possible for multiple controllers to share the
same bus; but only one can act as a controller at any particular time.
Listener: A listener is an entity connected to the bus that accepts instructions from the bus.
An example of a listener is an item such as a printer that only accepts data from the bus
Talker: This is an entity on the bus that issues instructions / data onto the bus.
Many items will fulfill more than one function. For example a voltmeter which is controlled over
the bus will act as a listener when it is being set up, and then when it is returning the data, it will
act as a talker. As such it is known as a talker / listener. Advantages & disadvantages of GPIB
Like any other technology, GPIB has advantages and disadvantages that need to be weighed up
when considering its use.
Advantages
Simple & standard hardware interface
Interface present on many bench instruments
Rugged connectors & connectors used (although some insulation displacement cables appear
occasionally).
Possible to connect multiple instruments to a single controller
Disadvantages
Bulky connectors
Cable reliability poor - often as a result of the bulky cables.
Low bandwidth - slow compared to more modern interfaces
Basic IEEE 422 does not mandate a command language (SCPI used in later implementations
but not included on all instruments.
GPIB capability is included on a large number of bench instruments, but when opting to use the
facility to build a system, it is necessary to consider all the advantages and disadvantages before
committing time and cost to its use.
6. DMAC (2017)
DMA stands for Direct Memory Access. It is designed by Intel to transfer data at the fastest rate. It
allows the device to transfer the data directly to/from memory without any interference of the
CPU.
Using a DMA controller, the device requests the CPU to hold its data, address and control bus, so
the device is free to transfer data directly to/from the memory. The DMA data transfer is
initiated only after receiving HLDA signal from the CPU.
126 | Peripheral and Interfacing
DMA
Operations
Following is the sequence of operations performed by a DMA −
Initially, when any device has to send data between the device and the memory, the device
has to send DMA request (DRQ) to DMA controller.
The DMA controller sends Hold request (HRQ) to the CPU and waits for the CPU to assert the
HLDA.
Then the microprocessor tri-states all the data bus, address bus, and control bus. The CPU
leaves the control over bus and acknowledges the HOLD request through HLDA signal.
Now the CPU is in HOLD state and the DMA controller has to manage the operations over
buses between the CPU, memory, and I/O devices.
Working of an Digitizer :
The working of a digitizer in similar to that of a mouse with some major differences. Actually the
input from a mouse is relative to the cursor position on the screen and that is why if you draw a
line with a mouse and then pick it up and move to a different place on desk you will find that the
input continues from the last position of the cursor on the screen , where it was.
But in case of a digitizer each position on the tablet relates to a specific position on the screen.
So it traces the existing drawing more accurately and it can easily create original drawing such as
architectural drawing with precise dimensions.
The styles draws directly on the tablet and its movements are captured and translated into a
corresponding drawing on the computer.
A puck or cursor can also be used instead of styles. In both the cases the exact positions of
drawing device is detected by the tablet in terms of coordinates and is sent to the computer.
In order to achieve this communication, both the sending and receiving DCEs must use the same
modulating method (e.g., FSK), much the way that if you want to communicate to someone who
understands one particular language, then you must speak the particular language.
An incremental encoder provides a specified amount of pulses in one rotation of the encoder. The
output can be a single line of pulses (an “A” channel) or two lines of pulses (an “A” and “B”
channel) that are offset in order to determine rotation. This phasing between the two signals is
called quadrature. Learn more about quadrature encoder output here.
The typical assembly of an incremental encoder consists of a spindle assembly, PCB, and cover.
The PCB contains a sensor array that creates just two primary signals for the purpose of position
and speed.
Peripheral and Interfacing | 133
Optionally, additional signals can be provided:
An index or ‘Z’ channel can be provided as one pulse per revolution signal for homing and pulse
count verification on the A and/or B channels. This index can be gated to either A or B in their
various states. It can also be un-gated and vary in width.
Commutation (U, V, W) channels can also be provided on some encoders. These signals are
aligned to the commutation windings found on servo motors. They also ensure that the drive or
amplifier for those motors apply current to each winding in the correct sequence and at the
correct level.
Incremental Encoder Alternatives
Resolvers
Resolvers are electro-mechanical precursors to encoders, based on technology going back to
World War II. An electrical current creates a magnetic field along a central winding. There are two
windings that are perpendicular to each other. One winding is fixed in place, and the other moves
as the object moves. The changes in the strength and location of the two interacting magnetic
fields allow the resolver to determine the motion of the object.
The simplicity of the resolver design makes it reliable in even extreme conditions, from cold and
hot temperature ranges to radiation exposure, and even mechanical interference from vibration
and shock. However, the forgiving nature of resolvers for both origin and application assembly
comes at the expense of their ability to work in complex application designs because it cannot
produce data with enough accuracy. Unlike incremental encoders, resolvers only output analog
data, which can require specialized electronics to connect with.
Absolute Encoder
Absolute encoders work in situations where accuracy for both speed and position, fail tolerance,
and interoperability matters more than system simplicity. The absolute encoder has the ability to
"know where it is" in reference to its position in case of system power-down and restart if the
encoder were to move during a power-down.
The absolute encoder itself understands the positioning information – it doesn’t need to rely on
outside electronics to provide a baseline index for the encoder position. Especially when
compared to resolvers and incremental encoders, the obvious strength of absolute encoders is
how their positioning accuracy affects the overall application performance, so it is typically the
encoder of choice for higher precision applications such as CNC, medical and robotics
Incremental Encoder Applications
An Incremental Encoder is designed to be versatile and customizable to fit a wide variety of
applications. The three broad categories of applications based on environment are:
Heavy Duty: demanding environment with a high probability of contaminants and moisture,
higher temperature, shock, and vibration requirements as seen in pulp, paper, steel, and wood
mills.
Industrial Duty: general factory operating environment which requires standard IP ratings,
moderate shock, vibration, and temperature specs as seen in food and beverage, textile,
generally factory automation plants.
Light Duty/Servo: controlled environment with high accuracy and temperature
requirements such as robotics, electronics, and semiconductors.
134 | Peripheral and Interfacing
18. Scanner (2015)
A scanner is a device that captures images from photographic prints, posters, magazine pages, and
similar sources for computer editing and display. Scanners come in hand-held, feed-in, and flatbed
types and for scanning black-and-white only, or color. Very high resolution scanners are used for
scanning for high-resolution printing, but lower resolution scanners are adequate for capturing
images for computer display. Scanners usually come with software, such as Adobe's Photoshop
product, that lets you resize and otherwise modify a captured image.
Scanners usually attach to your personal computer with a Small Computer System Interface
( SCSI ). An application such as Photoshop uses the TWAIN program to read in the image.
Some major manufacturers of scanners include: Epson, Hewlett-Packard, Microtek, and Relisys
The basic principle of a scanner is to analyze an image and reproduce it to a digital one using the
optical character recognition techniques.
Prominent features of a scanner include:
Reliability - Unlike certain forms of data transmission, scanning involves only transfer of hard
images to digital forms. The role of the end-user is limited in case of scanning. And as they are
not dependent on two-way communication, they can also help in storing important
information or transmitting important information.
Efficiency - Modern scanners are built for efficiency and speed. And it comes with ease of use
as well as convenience.
Quality - Scanning ensures the best resolution possible for digital images. Compared to fax
machines, which may find it difficult to reproduce the accurate details, scanners can
reproduce images with high resolution and precisions. They are quite useful for photography
and engineering arenas.
Cost saving - One of the biggest advantage of scanning is the replacement of physical
files/forms with digital ones. Along with saving physical space, which has to be used for
storage, there are also environmental benefits by using scanner.
How is a scanner connected?
A scanner can be connected to a computer using many different interfaces although today is
most commonly connected to a computer using a USB cable.
Fire wire
Parallel
SCSI
USB
Other types of computer scanners
There are also other types of scanners that can be used with a computer.
Sheetfed scanner - scans paper by feeding it into the scanner
Handheld scanner - scans text and images by dragging the device over the page you
want to scan
Card scanner - designed to scan business cards
Peripheral and Interfacing | 135
19. Parallel Data transfer method (2015)
When data is sent using parallel data transmission, multiple data bits are transmitted over
multiple channels at the same time. This means that data can be sent much faster than using serial
transmission methods.
Parallel communication transmits all bits in parallel. It requires 8 wires, one for each bit
of the data so that all 8bits are sent at the same time:
136 | Peripheral and Interfacing
Advantages of plotters
Plotters can work on very large sheets of paper while maintaining high resolution.
They can print on a wide variety of flat materials including plywood, aluminum, sheet
steel, cardboard, and plastic.
Plotters allow the same pattern to be drawn thousands of times without any image
degradation.
Disadvantages of plotters
Plotters are quite large when compared to a traditional printer.
Plotters are also much more expensive than a traditional printer.
When was the first plotter invented?
The first plotter was invented in 1953 by Remington-Rand. It was used in conjunction with
the UNIVAC computer to created technical drawings.
Peripheral and Interfacing | 139
22. PCI (2018,14,13)
A Peripheral Component Interconnect Bus (PCI bus) connects the CPU and expansion boards such
as modem cards, network cards and sound cards. These expansion boards are normally plugged
into expansion slots on the motherboard.
The PCI local bus is the general standard for a PC expansion bus, having replaced the Video
Electronics Standards Association (VESA) local bus and the Industry Standard Architecture (ISA)
bus. PCI has largely been replaced by USB.
This term is also known as conventional PCI or simply PCI.
PCI requirements include:
Bus timing
Physical size (determined by the wiring and spacing of the circuit board)
Electrical features
Protocols
PCI specifications are standardized by the Peripheral Component Interconnect Special Interest
Group.
Today, most PCs do not have expansion cards, but rather devices integrated into the motherboard.
The PCI bus is still used for specific cards. However, for practical purposes, USB has replaced the
PCI expansion card.
During system startup the operating system searches for all PCI buses to attain information about
the resources needed for each device. The OS communicates with each device and assigns system
resources, including memory, interrupt requests and allotted input/output (I/O) space
Here is the RS232 cable wiring configuration that is recommended by Microsoft that includes full
authentication handshaking.
This is the industry standard for RS232 null modem connections. It uses a cable developed by
Microsoft that is manufactured with seven wires.
142 | Peripheral and Interfacing
Virtual Null Modem Emulator
Null modem cables do not provide for high-speed data transmission. Theoretically, the maximum
throughput speed of a null modem connection is limited by the speed of the serial port that
connects it to the computer. This maximum of 115 kb/s is never reached as the transfer speed is
impacted by the length of cable used to make the connection.
Higher transmission speeds can be achieved by using the specialized software of a null modem
emulator. This application creates a virtual null modem connection between two computers. It
employs a virtual null modem cable to connect to the machine’s serial ports.
Virtual null modem software allows you to create pairs of virtual COM ports. The software enables
bi-directional data transmission between serial ports. Data that is transmitted to one COM port in
the pair is also simultaneously received by the other port in the pair.
Using virtual null modem software to transmit data is a much more efficient method of
communication than that which can be achieved with a physical null modem cable.
A quality null modem emulator such as Virtual Com Port Driver by Eltima allows you to emulate
baud rate and enables full Hand Flow control. This application supports all standard line signals
like RTS/CTS, DRT/DSR, RING, and ERROR. A virtual null modem emulator also enables you to
simulate line breaks in serial connections.
An LCD
An LCD is either made up of an active matrix display grid or a passive display grid. Most of the
Smartphone’s with LCD display technology uses active matrix display, but some of the older
displays still make use of the passive display grid designs. Most of the electronic devices mainly
depend on liquid crystal display technology for their display. The liquid has a unique advantage of
having low power consumption than the LED or cathode ray tube.
Liquid crystal display screen works on the principle of blocking light rather than emitting light.
LCD’s requires backlight as they do not emits light by them. We always use devices which are
made up of LCD’s displays which are replacing the use of cathode ray tube. Cathode ray tube
draws more power compared to LCD’s and are also heavier and bigger.
How LCDs are constructed?
Reference Books:
1) Behrouz A. Forouzan, Data Communications and Networking, 4th Edition.
2) William Stallings, Data and Computer Communications, Published by Pearson, 8th Edition.
148 | Data and Telecommunications
CHAPTER 1 PAGE NO: 153
INTRODUCTION TO DATA COMMUNICATION MODEL
1) What is data communication? (2021,2020, 2017,2016,2015,2014,2013,2012,2009)
2) Explain data communication characteristics. (2020, 2017,2015)
3) Describe simplified data communication model with proper diagram.(2021,2016, 2014,2013)
4) Briefly describe major communication tasks that involved in data communication. (2008)
5) Describe different types of LAN topologies. (2017)
6) Distinguish between LAN and WAN. (2008)
7) State the difference between TCP/IP with OSI reference Model. (2020, 2017, 2013)
8) What is protocol? What are the key elements of protocol? (2021,2017, 2014, 2013)
9) State the differences between connections less and connection oriented Protocol.
(2016, 2013)
10) Discuss the layers of OSI reference model. (2021,2020, 2016,2014)
11) Describe the layers of TCP/IP model. (2015)
12) Write down the difference between simplex, half duplex and full duplex transmission mode.
(2016, 2013)
13) Write down the difference between circuit switching and packet switching. (2014)
14) What is the difference between a port address, a logical address and a physical address?
[2014]
15) Describe VSAT configuration. [2015,2018]
16) What is transmission impairments? Explain it. [2015]
17) What is IP address? Classify its types. [2015]
18) How does sky propagation differ from line of sight propagation? [2014]
19) What is ISDN? Describe different types of channels used in ISDN? [2021]
20) What is the fundamental purpose of data communication? [2021,2010]
21) Define ATM. Describe ATM architecture protocol. [2021,2015]
22) Define Standard. [2011]
23) Define different type of noise? [2020,2018]
24) What do you understand by QoS of ATM? Brief about ATM service categories. [2021]
CHAPTER 1
INTRODUCTION
1) What is data communication? (2021,2020,2017,2016,2015,2014,2013,2012,2009)
Solution: Data communication refers to the exchange of data between a source and a receiver
via form of transmission media such as a wire cable. Data communication is said to be local if
communicating devices are in the same building or a similarly restricted geographical area.
8) What is protocol? What are the key elements of protocol? (2021,2017, 2014, 2013)
Solution: Communication is achieved by having the corresponding, or peer, layers in two systems
communicate. The peer layers communicate by means of formatted blocks of data that obey a set
of rules or conventions known as a protocol. The key features of a protocol are:
Syntax – The term ‘Syntax’ refers to the structure or format of the data, meaning the order in
which they are presented.
Semantics – The word ‘Semantics’ refers to the meaning of each section of bits.
Timing – The term ‘Timing ‘refers to two characteristics: when data should be sent and how
fast they can be sent.
164 | Data and Telecommunications
9) State the differences between connections less and connection oriented Protocol.
(2016, 2013)
Solution:
BASIS OF CONNECTION-ORIENTED CONNECTION-LESS PROTOCOL
COMPARISON PROTOCOL
Prior Connection Necessary Not required
Requirement
Reliability Ensures reliable transfer of data. Not guaranteed.
Congestion Unlikely Occur likely.
Packet forwarding Packets sequentially travel to their Packets reach the destination
destination node and follows the randomly without following the
same route. same route.
Delay There is a delay in transfer of Because to the absence of
information, but once the connection connection establishment phase,
is established faster delivery can be the transmission is faster.
achieved.
Resource Need to be allocated. No prior allocation of the
Allocation resource is required.
The transmitting computer software gives the data to be transmitted to the applications layer,
where it is processed and passed from layer to layer down the stack with each layer performing
its designated functions. The data is then transmitted over the physical layer of the network until
the destination computer or another device receives it. At this point the data is passed up through
the layers again, each layer performing its assigned operations until the data is used by the
receiving computer’s software.
All of the necessary and desirable operations required are grouped together in a logical sequence
at each of the layers. Each layer is responsible for specific functions:
Layer 7 – application: This layer works with the application software to provide
communications functions as required. It verifies the availability of a communications partner and
the resources to support any data transfer. It also works with end applications such as domain
name service (DNS), file transfer protocol (FTP), hypertext transfer protocol (HTTP), Internet
message access protocol (IMAP), post office protocol (POP), simple mail transfer protocol (SMTP),
Telenet, and terminal emulation.
Layer 6 – presentation: This layer checks the data to ensure that it is compatible with the
communications resources. It ensures compatibility between the data formats at the applications
level and the lower levels. It also handles any needed data formatting or code conversion, as well
as data compression and encryption.
Layer 5 – session: Layer 5 software handles authentication and authorization functions. It also
manages the connection between the two communicating devices, establishing a connection,
maintaining the connection, and ultimately terminating it. This layer verifies that the data is
delivered as well.
Layer 4 – transport: This layer provides quality of service (QoS) functions and ensures the
complete delivery of the data. The integrity of the data is guaranteed at this layer via error
correction and similar functions.
Layer 3 – network: The network layer handles packet routing via logical addressing and
switching functions.
Layer 2 – data link: Layer 2 operations package and unpack the data in frames.
166 | Data and Telecommunications
Layer 1 – physical: This layer defines the logic levels, data rate, physical media, and data
conversion functions that make up the bit stream of packets from one device to another.
12) Write down the difference between simplex, half duplex and full duplex transmission
mode. (2016, 2013)
Solution:
BASIS FOR SIMPLEX HALF DUPLEX FULL DUPLEX
COMPARISON
Direction of Communication is Communication is two- Communication is
Communication unidirectional. directional but, one at two directional and
a time. done
simultaneously.
Send/Receive A sender can send data A sender can send as A sender can send as
but, cannot receive. well as receive the data well as receive the
but one at a time. data simultaneously.
Performance The half duplex and full The full duplex mode Full duplex has
duplex yields better yields higher better performance
performance than the performance than half as it doubles the
Simplex. duplex. utilization of
168 | Data and Telecommunications
bandwidth.
Example Keyboard and monitor. Walkie-Talkies. Telephone.
13) Write down the difference between circuit switching and packet switching. (2014)
Solution: Circuit Switching vs. Packet Switching: Comparison Chart
Circuit Switching Packet Switching
A physical path is established which is Data is divided into small units called packets
dedicated to a single connection between the with each packet carrying small header
two end points. containing signaling information.
Data transmission takes place after the circuit is Dynamic route is established for each packet
established for the duration of the transmission. which carries the routing information.
A dedicated routing path is followed Each data packet may take a different route to
throughout the transmission and no other user reach the destination, making it flexible
is allowed to use the circuit. throughout the session.
It follows a uniform path throughout the There is no end to end reservation of links.
session.
Data doesn’t carry the signaling information Each data packet carries the signaling
and moves on its own. information containing source and
destination addresses in the packet header.
It’s ideal for voice communication and the delay It’s mainly used for data and voice
is uniform. communication, and the delay is not uniform.
It is connection oriented which is implemented It is connectionless and is implemented at
at physical layer. network layer.
14) What is the difference between a port address, a logical address and a physical address?
(2014)
Through logical address the systems identify a network (source to destination). after identifying
the network physical address is used to identify the host on that network. The port address is
used to identify the particular application running on the destination machine.
Logical Address: An IP address of the system is called logical address. This address is the
combination of Net ID and Host ID. This address is used by network layer to identify a particular
network (source to destination) among the networks. This address can be changed by changing
the host position on the network. So it is called logical address.
Physical address: Each system having a NIC(Network Interface Card) through which two systems
physically connected with each other with cables. The address of the NIC is called Physical
address or mac address. This is specified by the manufacturer company of the card. This address
is used by data link layer.
Port Address: There are many application running on the computer. Each application run with a
port no.(logically) on the computer. This port no. for application is decided by the Kernal of the
OS. This port no. is called port address.
Data and Telecommunications - 169
15) Describe VSAT configuration. [2015]
Solution: VSATs (Very Small Aperture Terminals) is a two way, lost cost, Ground micro station for
transmitting data to and from communication satellites. A VSAT has a dish antenna with
diameters between 75 cm to 1 m, which is very small in comparison with 10 m diameter of a
standard GEO antenna. It accesses satellites in geosynchronous orbits or geostationary orbits.
Data rates in VSATs ranges from 4 Kbps to 16 Mbps.
Configurations of VSATs:
Star Topology – This has a central uplink site which transmits data from and to each VSAT
through the satellite.
Mesh Topology − Each VSAT transmits data via the satellite to the other stations. The above
diagram shows mesh topology of VSATs.
Combination of the above
Uses of VSATs:
In narrowband data − e.g. point – of – sale transactions using debit cards or credit cards, RFID
data
In broadband data − e.g. Internet access to remote locations, VoIP
Mobile communications
Maritime communication
Attenuation – It means loss of energy. The strength of signal decreases with increasing distance
which causes loss of energy in overcoming resistance of medium. This is also known as attenuated
signal. Amplifiers are used to amplify the attenuated signal which gives the original signal back.
Attenuation is measured in decibels (dB). It measures the relative strengths of two signals or one
signal at two different point.
Attenuation (dB) = 10 log10 (P2/P1)
P1 is power at sending end and P2 is power at receiving end.
Distortion – It means change in the shape of signal. This is generally seen in composite signals
with different frequencies. Each frequency component has its own propagation speed travelling
through a medium. Every component arrive at different time which leads to delay distortion.
Therefore, they have different phases at receiver end from what they had at senders end.
Noise – The random or unwanted signal that mixes up with the original signal is called noise.
There are several types of noise such as induced noise, crosstalk noise, thermal noise and impulse
noise which may corrupt the signal.
Induced noise comes from sources such as motors and appliances. These devices act as sending
antenna and transmission medium act as receiving antenna. Thermal noise is movement of
electrons in wire which creates an extra signal.
18) How does sky propagation differ from line of sight propagation? [2014]
Solution:
Sky propagation is not limited to send signals to receivers, line-of-sight is dependent on direction,
range and objects which may occur between sender and receiver.
Sky propagation is not limited in sense of distance of source and destination and not restricted by
being in range or in direction with antennas. In this case, signals are sent towards space and then
signals have vast range to reach receivers back to the earth. We should consider this thing, Sky is
the beyond the troposphere and ionosphere. When signals gone beyond these spheres so when
satellite will reflect those signals back, they will have much vast access to receivers.
On other hand line-of-sight propagation is limited because of earth curvature. If antennas (source
and target) are not directional, not facing each other or something preventing to establish the
connection so communication won’t be made.
24) What do you understand by QoS of ATM? Brief about ATM service categories. [2021]
Quality of Service (QoS) is a type of Networking Technology that can guarantee a specific level
of output for a specific connection, path, or type of traffic. QoS mechanisms provide control on
both quality and availability of bandwidth whereas another network provides only a best-effort
delivery.
QoS feature is used when there is traffic congestion in-network, it gives priority to certain real-
time media. A high level of QoS is used while transmitting real-time multimedia to eliminate
latency and dropouts. Asynchronous Transfer Mode (ATM) is a networking technology that uses
a certain level of QoS in data transmission.
The Quality of Service in ATM is based on following: Classes, User-related attributes, and
Network-related attributes.
Data and Telecommunications - 175
These are explained as following below.
1. Classes :
The ATM Forum defines four service classes that are explained below –
1. Constant Bit Rate (CBR) –
CBR is mainly for users who want real-time audio or video services. The service
provided by a dedicated line. For example, T line is similar to CBR class service.
2. Variable Bit Rate (VBR) –
VBR class is divided into two sub classes –
(i) Real-time (VBR-RT) :
The users who need real-time transmission services like audio and video and they also use
compression techniques to create a variable bit rate, they use VBR-RT service class.
(ii) Non-real Time (VBR-NRT) :
The users who do not need real-time transmission services but they use compression
techniques to create a variable bit rate, then they use VBR-NRT service class.
3. Available Bit Rate (ABR) –
ABR is used to deliver cells at a specific minimum rate and if more network capacity is
available, then minimum rate can be exceeded. ABR is very much suitable for applications
that have high traffic.
4. Unspecified Bit Rate (UBR) –
UBR class and it is a best-effort delivery service that does not guarantee anything.
CHAPTER 2
DATA TRANSMISSION
1) Define analog and digital signal. (2021,2017)
Solution: Analog Signal
An analog signal is a continuous wave denoted by a sine wave (pictured below) and may vary in
signal strength (amplitude) or frequency (time). The sine wave's amplitude value can be seen as
the higher and lower points of the wave, while the frequency (time) value is measured in the sine
wave's physical length from left to right.
There are many examples of analog signals around us. The sound from a human voice is analog,
because sound waves are continuous, as is our own vision, because we see various shapes and
colors in a continuous manner due to light waves. Even a typical kitchen clock having its hands
moving continuously can be represented as an analog signal.
Attenuation – It means loss of energy. The strength of signal decreases with increasing distance
which causes loss of energy in overcoming resistance of medium. This is also known as attenuated
signal. Amplifiers are used to amplify the attenuated signal which gives the original signal back.
Distortion – It means change in the shape of signal. This is generally seen in composite signals
with different frequencies. Each frequency component has its own propagation speed travelling
through a medium. Every component arrive at different time which leads to delay distortion.
Therefore, they have different phases at receiver end from what they had at senders end.
Noise – The random or unwanted signal that mixes up with the original signal is called noise.
There are several types of noise such as induced noise, crosstalk noise, thermal noise and impulse
noise which may corrupt the signal.
Noise may be divided into four categories:
• Thermal noise
• Intermediation noise
Data and Telecommunications - 179
• Crosstalk
• Impulse noise
In this formula, B is the bandwidth of the channel, L is the number of signal levels used to
represent data, and r is the bit rate in bits per second.
According to the formula, we might think that, given a specific bandwidth, we can have any bit
rate we want by increasing the number of signal levels.
Although the idea is theoretically correct, practically there is a limit. When we increase the
number of signal levels, we impose a burden on the receiver. If the number of levels in a signal is
just 2, the receiver can easily distinguish between a 0 and a 1. If the level of a signal is 64, the
receiver must be very sophisticated to distinguish between 64 different levels. In other words,
increasing the levels of a signal reduces the reliability of the system.
In this formula B is the bandwidth of the channel, SNR is the signal-to noise ratio, and C is the
capacity of the channel in bits per second. Note that the Shannon formula there is no indication of
the signal level, which means that no matter how many levels we have. We cannot achieve a data
rate higher than the capacity of the channel. In other words, the formula defines a characteristic of
the channel, not the method of transmission.
In conclusion, we can say for channel capacity that the Shannon capacity gives us the’ upper limit
while the Nyquist formula tells us how many signal levels we need.
180 | Data and Telecommunications
4) What is the channel capacity for a teleprinter channel with a 300 Hz bandwidth and a
signal-to-noise ratio of 3DB? (2017)
Shannon capacity(channel capacity)
C = B Log2(1+ s/n)
C= channel capacity
B = bandwidth
S/N = signal to noise ratio in power units
As the S/n is in db, first we have to convert it.
3db= 10^3/10 = 10^0.3= 1.9926
Now putting in the formula
C = 300log2(1+ 1.9926)
C = 474.81 bps
6) Given a channel with an intended capacity of 20 Mbps. The bandwidth of the channel
is3MHz. What signal-to-noise ratio is required in order to achieve this capacity?
Page 2 of 10
Mukesh N. Tekwani (mukeshtekwani@hotmail.com)
Solution:
According to Shannon’s Capacity formula the maximum channel capacity(in bps) is given by the
equation:
Data and Telecommunications - 181
7) Define transmission media. (2017)
The transmission media is nothing but the physical media over which communication takes place
in computer networks.
There are two types of transmission media:
Guided
Unguided
8) What is unguided transmission media? What are the drawback of this? (2013)
Unguided Media:
It is also referred to as Wireless or unbounded transmission media. No physical medium is
required for the transmission of electromagnetic signals.
Features:
Signal is broadcasted through air
Less Secure
Used for larger distances
There are 3 major types of Unguided Media:
(i)Radio waves –
These are easy to generate and can penetrate through buildings. The sending and receiving
antennas need not be aligned. Frequency Range:3KHz – 1GHz. AM and FM radios and cordless
phones use Radio waves for transmission.
Further Categorized as: (i) Terrestrial and (ii) Satellite.
(ii)Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas need to be properly
aligned with each other. The distance covered by the signal is directly proportional to the height
of the antenna. Frequency Range:1GHz – 300GHz. These are majorly used for mobile phone
communication and television distribution.
(iii)Infrared –
Infrared waves are used for very short distance communication. They cannot penetrate through
obstacles. This prevents interference between systems. Frequency Range:300GHz – 400THz. It is
used in TV remotes, wireless mouse, keyboard, printer, etc.
Disadvantages:
Very costly.
Radio waves travel through lowest portion of atmosphere
Radio wave communication is an insecure communication.
Radio wave propagation is susceptible to weather effects like rain,thunder and storm etc.
182 | Data and Telecommunications
9) Explain with figure of a fiber optic cable with its characteristics. (2017)
Or, what is optical fiber communication? Explain the characteristics of this
communication system? (2013)
Fiber Optic Cable
A fibre-optic cable is made of glass or plastic and transmits signals in the form of light. For better
understanding we first need to explore several aspects of the nature of light. Light travels in a
straight line as long as it is mobbing through a single uniform substance. If ray of light travelling
through one substance suddenly enters another substance (of a different density), the ray changes
direction. The below figure shows how a ray of light changes direction when going from a more
dense to a less dense substance.
Parts of a Frame
A frame has the following parts −
Frame Header − It contains the source and the destination addresses of the frame.
Payload field − It contains the message to be delivered.
Trailer − It contains the error detection and error correction bits.
Flag − It marks the beginning and end of the frame.
17. What are the reason for breaking up large data block into smaller data blocks for
transmission?[2021]
Breaking a large data block into smaller data blocks for transmission is beneficial for several
reasons:
1. Reliability: When transmitting data, there is always a chance of errors or data loss during
transmission. By breaking the data into smaller blocks, the impact of such errors is limited to
individual blocks rather than the entire data set. If an error occurs in one block, only that
block needs to be retransmitted, reducing the overall data loss and improving the reliability of
the transmission.
2. Efficiency: Large data blocks can be more challenging to handle and transmit efficiently.
Smaller blocks allow for better utilization of available network resources. They can be
transmitted more quickly, reducing the time required for transmission and improving overall
efficiency.
3. Error detection and correction: Breaking data into smaller blocks enables the use of error
detection and correction mechanisms at the block level. For example, checksums or error-
correcting codes can be applied to each block individually. If errors are detected, they can be
corrected within the specific block without affecting the entire data set.
4. Adaptability to network conditions: Network conditions can vary during transmission, and
different blocks may experience different levels of congestion, latency, or packet loss. By
dividing data into smaller blocks, the transmission protocol can adapt more effectively to
Data and Telecommunications - 187
varying network conditions. It allows for more flexible routing and retransmission strategies
to optimize data delivery.
5. Parallel processing: Breaking data into smaller blocks enables parallel processing and
transmission. Multiple blocks can be sent simultaneously over different channels, improving
the throughput and reducing the overall transmission time.
6. Compatibility with protocols and devices: Some communication protocols or devices may
have limitations on the maximum data size they can handle. By breaking the data into smaller
blocks, it ensures compatibility with such constraints and facilitates seamless transmission
across different systems.
188 | Data and Telecommunications
CHAPTER 3
Digital modulation
1) Briefly explain: ASK, FSK, PSK and QPSK techniques with principal advantages and
disadvantages. (2017,2014,2013,2012,2010)
Solution: Amplitude Shift Keying (ASK) is a type of Amplitude Modulation which represents
the binary data in the form of variations in the amplitude of a signal.
Any modulated signal has a high frequency carrier. The binary signal when ASK modulated, gives
a zero value for Low input while it gives the carrier output for High input.
The following figure represents ASK modulated waveform along with its input.
To find the process of obtaining this ASK modulated wave, let us learn about the working of the
ASK modulator.
ASK Advantages
Following points summarizes ASK advantages:
➨It offers high bandwidth efficiency.
➨It has simple receiver design.
➨ASK modulation can be used to transmit digital data over optical fiber.
➨ASK modulation and ASK demodulation processes are comparatively inexpensive.
➨Its variant OOK is used at radio frequencies to transmit morse codes.
ASK Disadvantages
Following points summarizes ASK disadvantages:
➨It offers lower power efficiency.
➨ASK modulation is very susceptible to noise interference. This is due to the fact that noise
affects the amplitude. Hence another alternative modulation technique such as BPSK which is less
susceptible to error than ASK is used.
Data and Telecommunications - 189
Frequency Shift Keying (FSK) is the digital modulation technique in which the frequency of the
carrier signal varies according to the digital signal changes. FSK is a scheme of frequency
modulation.
The output of a FSK modulated wave is high in frequency for a binary High input and is low in
frequency for a binary Low input. The binary 1s and 0s are called Mark and Space frequencies.
The following image is the diagrammatic representation of FSK modulated waveform
along with its input.
To find the process of obtaining this FSK modulated wave, let us know about the working of a
FSK modulator.
Benefits or advantages of FSK
Following are the benefits or advantages of FSK:
➨It has lower probability of error (Pe).
➨It provides high SNR (Signal to Noise Ratio).
➨It has higher immunity to noise due to constant envelope. Hence it is robust against variation in
attenuation through channel.
➨FSK transmitter and FSK receiver implementations are simple for low data rate application.
Drawbacks or disadvantages of FSK
Following are the disadvantages of FSK:
➨It uses larger bandwidth compare to other modulation techniques such as ASK and PSK. Hence
it is not bandwidth efficient.
➨The BER (Bit Error Rate) performance in AWGN channel is worse compare to PSK modulation.
Phase Shift Keying (PSK) is the digital modulation technique in which the phase of the carrier
signal is changed by varying the sine and cosine inputs at a particular time. PSK technique is
widely used for wireless LANs, bio-metric, contactless operations, along with RFID and Bluetooth
communications.
PSK is of two types, depending upon the phases the signal gets shifted. They are −
Binary Phase Shift Keying (BPSK)
This is also called as 2-phase PSK or Phase Reversal Keying. In this technique, the sine wave
carrier takes two phase reversals such as 0° and 180°.
190 | Data and Telecommunications
BPSK is basically a Double Side Band Suppressed Carrier (DSBSC) modulation scheme, for
message being the digital information.
Quadrature Phase Shift Keying (QPSK)
This is the phase shift keying technique, in which the sine wave carrier takes four phase reversals
such as 0°, 90°, 180°, and 270°.
If this kind of techniques are further extended, PSK can be done by eight or sixteen values also,
depending upon the requirement.
Benefits or advantages of PSK
Following are the benefits or advantages of PSK:
➨It carries data over RF signal more efficiently compare to other modulation types. Hence it is
more power efficient modulation technique compare to ASK and FSK.
➨It is less susceptible to errors compare to ASK modulation and occupies same bandwidth as
ASK.
➨Higher data rate of transmission can be achieved using high level of PSK modulations such as
QPSK (represents 2 bits per constellation), 16-QAM (represents 4 bits per constellation) etc.
Drawbacks or disadvantages of PSK
Following are the disadvantages of PSK:
➨It has lower bandwidth efficiency.
➨The binary data is decoded by estimation of phase states of the signal. These detection and
recovery algorithms are very complex.
➨Multi-level PSK modulation schemes (QPSK, 16QAM etc.) are more sensitive to phase
variations.
➨It is also one form of FSK and hence it also offers lower bandwidth efficiency compare to ASK
modulation type.
The Quadrature Phase Shift Keying (QPSK) is a variation of BPSK, and it is also a Double Side
Band Suppressed Carrier (DSBSC) modulation scheme, which sends two bits of digital
information at a time, called as bigits.
Instead of the conversion of digital bits into a series of digital stream, it converts them into bit
pairs. This decreases the data bit rate to half, which allows space for the other users.
QPSK Modulator
The QPSK Modulator uses a bit-splitter, two multipliers with local oscillator, a 2-bit serial to
parallel converter, and a summer circuit. Following is the block diagram for the same.
Data and Telecommunications - 191
At the modulator’s input, the message signal’s even bits (i.e., 2nd bit, 4th bit, 6th bit, etc.) and odd
bits (i.e., 1st bit, 3rd bit, 5th bit, etc.) are separated by the bits splitter and are multiplied with the
same carrier to generate odd BPSK (called as PSKI) and even BPSK (called as PSKQ).
The PSKQ signal is anyhow phase shifted by 90° before being modulated.
The QPSK waveform for two-bits input is as follows, which shows the modulated result for
different instances of binary inputs.
A 8-PSK. The diagram shows information is transmitted as one of 8 "symbols", each representing
3 bits of data. Each symbol is encoded as a different phase shift of the carrier sine wave: 0°, 45°,
90°, 135°, 180°, 225°, 270°, 315°
8) A signal is carrying four bits in each signal element. If 1000 signal elements are sent per
second, find the bit rate and baud rate? (2012,2010)
Solution:
Block Coding
To ensure accuracy of the received data frame redundant bits are used. For example, in even-
parity, one parity bit is added to make the count of 1s in the frame even. This way the original
number of bits is increased. It is called Block Coding.
Block coding is represented by slash notation, mB/nB.Means, m-bit block is substituted with n-bit
block where n > m. Block coding involves three steps:
Division,
Substitution
Combination.
After block coding is done, it is line coded for transmission.
Data and Telecommunications - 197
10) Describe the classification of line code.
Solution: Line code can be classified based on symbol mapping functions (ak) like,
Unipolar: In unipolar signalling, binary symbol 0 is represented by the absence of a pulse called
space and the other binary symbol 1 is represented by the presence of a pulse called mark. It is
also called on-off keying.
Polar:In polar signalling a binary 1 is represented by a pulse p(t) and a binary 0 by the opposite
(or antipodal) pulse –p(t).
Bipolar:Bipolar Signalling is also called ‘Alternate Mark Inversion’ (AMI) which uses three voltage
levels (+V, 0, –V) to represent binary symbols. Zeros, as in unipolar, are represented by the
absence of a pulse and ones (or marks) are representedby alternating voltage levels of +V and –V.
Line code can again be classified based on pulse shapes p(t) like,
NRZ (Nonreturn-to-zero): The pulse occupies the full duration of a symbol.
RZ (Return to Zero):The pulse occupies the half of duration of a symbol.
Manchester (split phase): In Manchester encoding, the duration of the bit is divided into two
halves. The voltage remains at one level during the first half and moves to the other level during
the second half. Binary logic 1 is +ve in 1st half and -ve in 2nd half. Binary logic 0 is -ve in 1st half
and +ve in 2nd half.
A
Mark Mark space Mark space A space
(hole) (hole) (hole)
A
T
i
m
e
Tb (
a Ac 0
) cor
din
U g
-
A n to
(i 0A ab
b ov
p e
)o cla
P
l 0 ssi
o fic
a ati
lr on
A (
aN dif
c fer
rR
) ent
N
ZU - typ
1 1 0 R es
n A
1 0 0 (Z of
id 0 lin
1 e
p
) co
o
B din
Binary Signaling Formats
li - g
(ap A is
sh
er0
o ow
)R
l
n
Volts
in
M
Za fig
ar .
n
R
bel
ow
cZ .
h
e
s
t
Data and Telecommunications - 199
12) Why scrambling technique is used for digital to digital encoding? Depict and describe
B8ZS or HDB3. (2011)
Answer: In data communication, long sequence of 0 is replaced by combination of other levels to
provide synchronization called Scrambling Technique. It must satisfy:
• It should be recognized by receiver and replace with original
• Same length as original
• Error detection capability
Two commonly used techniques are:
B8ZS (Bipolar with 8 Zeros Substitution),and
HDB3 (High Density Bipolar 3 zeros)
18) An analog signal has a bit rate of 8000 bps and a baud rate of 1000 band.How many
data elements are carried by each signal element? How many signal elements do we
need? (2021)
Data element per signal elements is given as;
Data Element (N) =
Signal elements (S) is Calculated as:
S=
Where,
N= Data Elements
Calculation:
Given: Bit rate= 8000 bps= 8000 data elements/sec
Baud Rate= 1000 baud = 1000 signal elements/sec
Bipolar AMI:
Manchester:
Data and Telecommunications - 203
CHAPTER 4
DATA COMMUNICATION TECHNIQUES
1. Distinguish between asynchronous and synchronous data transmission. (2017)
Solution:
Comparison between Asynchronous and Synchronous:
Asynchronous Synchronous
Form of Signal In one form of asynchronous In synchronous transmission, the
required for transmission, there is only one stream of data to be transferred is
Transmission wire/signal carrying the encoded as fluctuating voltages in
transmission. one wire, and a periodic pulse of
voltage is put on another wire
(often called the "clock" or
"strobe").
Transformation of sender provides a synchronization sender and receiver use the same
Message Methods signal to the receiver before clock signal
starting the transfer of each
message
Properties Does not need clock signal supports high data transfer rate
between the sender and the needs clock signal between the
receiver sender and the receiver
Slower data transfer rate require master/slave
configuration
Advantages Simple, doesn't require Lower overhead and thus, greater
synchronization of both throughput
communication sides
Cheap, because Asynchronous
transmission require less
hardware
Set-up is faster than other
transmissions, so well suited for
applications where messages are
generated at irregular intervals,
for example data entry from the
keyboard and the speed depends
on different applications
Disadvantages Large relative overhead, a high Slightly more complex
proportion of the transmitted bits Hardware is more expensive
are uniquely for control purposes
and thus carry no useful
information
Communication This communication works much This communication works much
Examples like the postal system like a phone call.
204 | Data and Telecommunications
2. What do you mean by HDLC? (2021,2016)
Answer: HDLC (High-level Data Link Control) is a group of protocols or rules for
transmitting data between network points (sometimes called nodes). In HDLC, data is organized
into a unit (called a frame) and sent across a network to a destination that verifies its successful
arrival. The HDLC protocol also manages the flow or pacing at which data is sent. HDLC is one of
the most commonly-used protocols in what is layer 2 of the industry communication reference
model called Open Systems Interconnection (OSI). (Layer 1 is the detailed physical level that
involves actually generating and receiving the electronic signals.
Even parity -- Even parity means the number of 1's in the given word including the parity bit
should be even (2,4,6,....).
Odd parity -- Odd parity means the number of 1's in the given word including the parity bit
should be odd (1,3,5,....).
Use of Parity Bit
The parity bit can be set to 0 and 1 depending on the type of the parity required.
For even parity, this bit is set to 1 or 0 such that the no. of "1 bits" in the entire word is even.
Shown in fig. (a).
For odd parity, this bit is set to 1 or 0 such that the no. of "1 bits" in the entire word is odd.
Shown in fig. (b).
206 | Data and Telecommunications
8. Discuss Fundamentals of Scrambling Techniques. [2011]
Solution: Scrambling is a binary bit-level processing applied to the transmission rate signal in
order to make the resulting binary sequence appear more random. The scrambler performing
this scrambling function can be implemented simply using a few shift registers and exclusive-
OR gates; and the descramblers reconstructing the original bit stream out of the scrambled data
stream has the same structure but with the reversed data flow. For a proper reconstruction of
the original bit stream the shift registers in the descrambler should get synchronized to their
counterparts in the scrambler. Depending on the synchronization method used, scrambling
techniques are classified into three categories, namely the frame-synchronous scrambling (FSS),
the distributed sample scrambling (DSS), and the self-synchronous scrambling (SSS). In the FSS,
the states of the scrambler and the descrambler shift registers get synchronized by being
simultaneously reset to the pre specified states at the start of each frame; in the DSS, samples
taken from the scrambler shift registers are transmitted to the descrambler in a distributed
manner for use in synchronizing the descrambler shift registers; and in the SSS, the states of the
scrambler and descrambler shift registers are automatically synchronized without any
additional synchronization processes.
CHAPTER 5
WIRELESS TRANSMISSION & MULTIPLEXING
1. What is multiplexing? Describe synchronous time division multiplexing with figure.
(2021,2017, 2016)
Answer: Multiplexing is a technique by which different analog and digital streams of
transmission can be simultaneously processed over a shared link. Multiplexing divides the high
capacity medium into low capacity logical medium which is then shared by different streams.
Communication is possible over the air (radio frequency), using a physical media (cable), and
light (optical fiber). All mediums are capable of multiplexing.
When multiple senders try to send over a single medium, a device called Multiplexer divides the
physical channel and allocates one to each. On the other end of communication, a De-multiplexer
receives data from a single medium, identifies each, and sends to different receivers.
192.16.00/29;
The first octet of this class has its first 3 bits set to 192. Class C IP addresses range from 192.0.0.x
to 223.255.255.x. So , this is class C type.
The default subnet mask for Class C is 255.255.255.x.
Data and Telecommunications - 213
172.17.0.0/23:
The first octet of this class has its first 3 bits set to 172. Class B IP Addresses range from 128.0.x.x
to 191.255.x.x. So , this is class B type.
The default subnet mask for Class B is 255.255.x.x.
10.0.0.0/12
The first octet of this class has its first 3 bits set to 010. The class A address only include IP
starting from 1.x.x.x to 126.x.x.x. The IP range 127.x.x.x is reserved for loop back IP addresses. So ,
this is class B type.
The default subnet mask for class A IP address is 255.0.0.0.
07) How data exchange over a full duplex data communication? [2010]
Solution: Full-duplex refers to a system which transmits and receives data in two directions at
the same time. The telephone system is full-duplex as one can talk and listen simultaneously. A
walkie-talkie is half duplex because a user can either receive or press the "talk" button to
transmit. Half-duplex means that data can be transmitted in both directions on a signal carrier,
but not at the same time.
Digit radio modems use a half-duplex radio channel but have full-duplex serial data buffers which
allow the radios to simulate a full-duplex radio channel. The radios transfer data one direction
while buffering data going the other direction. The radio channel will then switch directions to
transfer the data in the reverse direction. This mechanism works best when the data transfer
requirements are much smaller than the throughput available on the Digit radio modems.
Use these parameters to simulate full-duplex communication between two Digit RF Modems.
These settings are only needed if communication may be initiated by two RF Modems
simultaneously.
09) Define WDM. And compare between TDM & WDM. [2018]
Solution:
WDM: Wavelength division multiplexing (WDM) is a technology or technique modulating
numerous data streams, i.e. optical carrier signals of varying wavelengths (colors) of laser light,
onto a single optical fiber. WDM enables bi-directional communication as well as multiplication of
signal capacity.
214 | Data and Telecommunications
Basic difference between TDM and WDM:
Following are the key difference between TDM and WDM systems.
• In TDM, resulting capacity is the aggregate or sum of all the input signals/channels. In WDM,
each signal is transmitted independent of the others and hence each channel will have its own
dedicated bandwidth.
• In WDM, all signals will arrive at the same time while in TDM they will arrive one after the other.
This is because in TDM the signals are broken up and multiplexed time wise before transmission.
This is same as TDMA frame, where in data from various stations are multiplexed and then
transmitted.
11) What do you mean by HDLC? Describe the basic characteristics of HDLC protocol.
[2016]
Solution:
HDLC: High-Level Data Link Control (HDLC) is a bit-oriented code-transparent synchronous data
link layer protocol developed by the International Organization for Standardization (ISO).
Data and Telecommunications - 215
Basic characteristics of HDLC protocol:
1) It also supports serial transmission.
2) Communication mode of HDLC is both synchronous and asynchronous.
3) It uses TWA and TWS directional mode.
4) It also supports both point to point and point to multipoint configuration.
5) It follows sliding window flow control protocol.
6) To content errors it uses CRC method.
7) For framing transparency it follows ZERO stuffing.
In the Synchronous Time Division Multiplexing (STDM), the multiplexer assigns an equal time slot
to every device at all times, whether or not a device has anything to send. Time slot A, for
instance, is authorized to device A alone and cannot be used by any other device.
Each time is assigned a time slot and it shows up. Then, a device has the time to transmit a portion
of its data. If a device cannot send or does not have data to send, its time slot remains null.
The time slots are consolidated into frames, and every frame includes one or more time slots
committed to each sending device. If there are n sending devices, the frame consists of n slots,
where each slot will be allocated to each of the sending devices. This happens if all the sending
devices transmit at the same rate as shown in the figure.
In the diagram given below, there are four inputs to multiplexer A. Each frame is having four slots
corresponding each of the sending devices.
216 | Data and Telecommunications
13.”The start and stop bits can be eliminated when character interleaving is used in
synchronous TDM”- Justify your answer. [2021]
Data and Telecommunications - 217
CHAPTER 6
HIGH SPEED DIGITAL ACCESS
1) What is packet switching network? Mention the advantages of packet switching over
circuit switching network. (2021,2017)
Packet switching is a method of transferring the data to a network in form of packets. In order to
transfer the file fast and efficient manner over the network and minimize the transmission
latency, the data is broken into small pieces of variable length, called Packet. At the destination, all
these small-parts (packets) has to be reassembled, belonging to the same file. A packet composes
of payload and various control information. No pre-setup or reservation of resources are needed.
The packet switching has two approaches: Virtual Circuit approach and Datagram approach. WAN,
ATM, frame relay and telephone networks use connection oriented virtual circuit approach;
whereas internet relies on connectionless datagram based packet switching.
3) Given the following information. find the minimum bandwidth required for the path :
(2017,2015)
FDM Multiplexing
Five devices, each requiring 4000 Hz
200 Hz guard band. for each device
Solution:
No. of devices = 5
No. of guard bands required between these is 4.
Hence total bandwidth = (4000 x 5) + (200 x 4)= 20.8 KHz.
4) What is router and routing table? Explain the important characteristics of routing
function. (2021,2017)
Answer: A routing table is a set of rules, often viewed in table format, that is used to determine
where data packets traveling over an Internet Protocol (IP) network will be directed. All IP-
enabled devices, including routers and switches, use routing tables.
A routing table contains the information necessary to forward a packet along the best path toward
its destination. Each packet contains information about its origin and destination. When a packet
is received, a network device examines the packet and matches it to the routing table entry
providing the best match for its destination. The table then provides the device with instructions
for sending the packet to the next hop on its route across the network.
5) What is SONET? Describe the propagation of light through optical fiber. (2021,2016)
Answer: Synchronous optical networking (SONET) is a standardized digital communication
protocol that is used to transmit a large volume of data over relatively long distances using a fiber
optic medium. With SONET, multiple digital data streams are transferred at the same time over
optical fiber using LEDs and laser beams.
SONET is a product of the American National Standards Institute (ANSI).
Optical fibres are the wires which are used for long distance data transmission. The contain a core
which is covered by a cadding. The refractive index of core is more than cadding. So when light
collides the core-caddinginterface, it shows total internal reflection.
Optical fibre is more advantageous as,the loss of data is less even after travelling long distances
When light passes from a medium with one index of refraction (m1) to another medium with a
lower index of refraction (m2), it bends or refracts away from an imaginary line perpendicular to
the surface (normal line). As the angle of the beam through m1 becomes greater with respect to
the normal line, the refracted light through m2 bends further away from the line.
At one particular angle (critical angle), the refracted light will not go into m2, but instead will
travel along the surface between the two media (sine [critical angle] = n2/n1 where n1 and n2 are
the indices of refraction [n1 is greater than n2]). If the beam through m1 is greater than the
critical angle, then the refracted beam will be reflected entirely back into m1 (total internal
reflection), even though m2 may be transparent!
Circuit switching was designed for voice applications. Telephone is the best suitable example of
circuit switching. Before a user can make a call, a virtual path between caller and callee is
established over the network.
Message Switching
This technique was somewhere in middle of circuit switching and packet switching. In message
switching, the whole message is treated as a data unit and is switching / transferred in its
entirety.
A switch working on message switching, first receives the whole message and buffers it until
there are resources available to transfer it to the next hop. If the next hop is not having enough
resource to accommodate large size message, the message is stored and switch waits.
This technique was considered substitute to circuit switching. As in circuit switching the whole
path is blocked for two entities only. Message switching is replaced by packet switching. Message
switching has the following drawbacks:
Every switch in transit path needs enough storage to accommodate entire message.
Because of store-and-forward technique and waits included until resources are available,
message switching is very slow.
Message switching was not a solution for streaming media and real-time applications.
Data and Telecommunications - 221
Packet Switching
Shortcomings of message switching gave birth to an idea of packet switching. The entire message
is broken down into smaller chunks called packets. The switching information is added in the
header of each packet and transmitted independently.
It is easier for intermediate networking devices to store small size packets and they do not take
much resources either on carrier path or in the internal memory of switches.
Packet switching enhances line efficiency as packets from multiple applications can be
multiplexed over the carrier. The internet uses packet switching technique. Packet switching
enables the user to differentiate data streams based on priorities. Packets are stored and
forwarded according to their priority to provide quality of service.
8) Explain about virtual circuit and datagram approach of packet switching network with
necessary diagram. . (2016)
Answer: Switching is process to forward packets coming in from one port to a port leading
towards the destination. When data comes on a port it is called ingress, and when data leaves a
port or goes out it is called egress. A communication system may include number of switches and
nodes. At broad level, switching can be divided into two major categories:
Connectionless: The data is forwarded on behalf of forwarding tables. No previous
handshaking is required and acknowledgements are optional.
Connection Oriented: Before switching data to be forwarded to destination, there is a
need to pre-establish circuit along the path between both endpoints. Data is then
forwarded on that circuit. After the transfer is completed, circuits can be kept for future
use or can be turned down immediately.
Circuit Switching
When two nodes communicate with each other over a dedicated communication path, it is called
circuit switching. There 'is a need of pre-specified route from which data will travels and no
other data is permitted. In circuit switching, to transfer the data, circuit must be established so
that the data transfer can take place.
Circuits can be permanent or temporary. Applications which use circuit switching may have to go
through three phases:
Establish a circuit
Transfer the data
Disconnect the circuit
Circuit switching was designed for voice applications. Telephone is the best suitable example of
circuit switching. Before a user can make a call, a virtual path between caller and callee is
established over the network.
Data and Telecommunications - 223
Message Switching
This technique was somewhere in middle of circuit switching and packet switching. In message
switching, the whole message is treated as a data unit and is switching / transferred in its
entirety.
A switch working on message switching, first receives the whole message and buffers it until
there are resources available to transfer it to the next hop. If the next hop is not having enough
resource to accommodate large size message, the message is stored and switch waits.
This technique was considered substitute to circuit switching. As in circuit switching the whole
path is blocked for two entities only. Message switching is replaced by packet switching. Message
switching has the following drawbacks:
Every switch in transit path needs enough storage to accommodate entire message.
Because of store-and-forward technique and waits included until resources are available,
message switching is very slow.
Message switching was not a solution for streaming media and real-time applications.
Packet Switching
Shortcomings of message switching gave birth to an idea of packet switching. The entire message
is broken down into smaller chunks called packets. The switching information is added in the
header of each packet and transmitted independently.
It is easier for intermediate networking devices to store small size packets and they do not take
much resources either on carrier path or in the internal memory of switches.
224 | Data and Telecommunications
Packet switching enhances line efficiency as packets from multiple applications can be
multiplexed over the carrier. The internet uses packet switching technique. Packet switching
enables the user to differentiate data streams based on priorities. Packets are stored and
forwarded according to their priority to provide quality of service.
10) A channel has a bit rate of 4kbps and a propagation delay of 20 msec. For what range of
frame sizes does stop-and-wait give an efficiency of at least 50 percent?
(2015)
Solution:
Efficiency will be 50% when the time to transmit the frame equals the round trip propagation
delay. At a transmission rate of 4bits/ms, 160 bits takes 40 ms. For frame sizes above 160bits,
stop-and-wait is reasonably efficient.
11) Compare space-division and time division switches. [2014]
Solution:
Time-division multiplexing: Time-division multiplexing (TDM) is a method of transmitting and
receiving independent signals over a common signal path by means of synchronized switches at
each end of the transmission line so that each signal appears on the line only a fraction of time in
an alternating pattern.
Space-division switch: Any switching mechanism that is based on the through connection of a
set of input lines selectively to a set of output lines. Space-division switches are implemented
either by electromechanical or electronic means. Prior to the advent of time-division switching, all
telephone and telegraph switching machines were implemented using a variety of space-division
switching techniques, particularly stronger (step-by-step) switches and crossbar switches.
Data and Telecommunications - 225
12) Discuss the function of Transport layer and network layer. [2013]
Solution:
Network Layer: Network layer works for the transmission of data from one host to the other
located in different networks. It also takes care of packet routing i.e. selection of the shortest path
to transmit the packet, from the number of routes available. The sender & receiver’s IP address
are placed in the header by the network layer.
The functions of the Network layer are:
1) Routing: The network layer protocols determine which route is suitable from source to
destination. This function of network layer is known as routing.
2) Logical Addressing: In order to identify each device on internetwork uniquely, network layer
defines an addressing scheme. The sender & receiver’s IP address are placed in the header by
network layer. Such an address distinguishes each device uniquely and universally.
Transport Layer: Transport layer provides services to application layer and takes services from
network layer. The data in the transport layer is referred to as Segments. It is responsible for the
End to End Delivery of the complete message. The transport layer also provides the
acknowledgement of the successful data transmission and re-transmits the data if an error is
found
The functions of the transport layer are:
1) Segmentation and Reassembly: This layer accepts the message from the (session) layer,
breaks the message into smaller units. Each of the segment produced has a header associated
with it. The transport layer at the destination station reassembles the message.
2) Service Point Addressing: In order to deliver the message to correct process, transport layer
header includes a type of address called service point address or port address. Thus by
specifying this address, transport layer makes sure that the message is delivered to the
correct process.
Circuit Switching:
Circuit switching is a switching technique that establishes a dedicated path between sender
and receiver.
In the Circuit Switching Technique, once the connection is established then the dedicated path
will remain to exist until the connection is terminated.
Circuit switching in a network operates in a similar way as the telephone works.
A complete end-to-end path must exist before the communication takes place.
In case of circuit switching technique, when any user wants to send the data, voice, video, a
request signal is sent to the receiver then the receiver sends back the acknowledgment to
ensure the availability of the dedicated path. After receiving the acknowledgment, dedicated
path transfers the data.
Circuit switching is used in public telephone network. It is used for voice transmission.
Fixed data can be transferred at a time in circuit switching technology.
228 | Data and Telecommunications
CHAPTER 7
ERROR DETECTION AND CORRECTION TECHNIQUES
1. How to works Parity Check of Error Detection?
It is the simplest technique for detecting and correcting errors. The MSB of an 8-bits word is used
as the parity bit and the remaining 7 bits are used as data or message bits. The parity of 8-bits
transmitted word can be either even parity or odd parity.
Even parity -- Even parity means the number of 1's in the given word including the parity bit
should be even (2,4,6,....).
Odd parity -- Odd parity means the number of 1's in the given word including the parity bit
should be odd (1,3,5,....).
Use of Parity Bit
The parity bit can be set to 0 and 1 depending on the type of the parity required.
For even parity, this bit is set to 1 or 0 such that the no. of "1 bits" in the entire word is even.
Shown in fig. (a).
For odd parity, this bit is set to 1 or 0 such that the no. of "1 bits" in the entire word is odd.
Shown in fig. (b).
Addressing:
In a virtual-circuit network, two types of addressing are involved: global and local (virtual-circuit
identifier).
Global Addressing:
Virtual-Circuit Identifier:
The identifier that is actually used for data transfer is called the virtual-circuit identifier (VCI). A
VCI, unlike a global address, is a small number that has only switch scope. It is used by a frame
between two switches. When a frame arrives at a switch, it has a VCI; when it leaves, it has a
different VCI. The following figure show how the VCI in a data frame changes from one switch to
another. Note that a VCI does not need to be a large number since each switch can use its own
unique set of VCIs.
Three Phases:
As in a circuit-switched network, a source and destination need to go through three phases in a
virtual-circuit network: setup, data transfer, and teardown.
Setup phase, the source and destination use their global addresses to help switches make table
entries for the connection.
In the teardown phase, the source and destination inform the switches to delete the
corresponding entry.
Data transfer occurs between these two phases.
Data Transfer Phase
To transfer a frame from a source to its destination, all switches need to have a table entry for this
virtual circuit. The table, in its simplest form, has four columns. This means that the switch holds
four pieces of information for each virtual circuit that is already set up. We show later how the
Data and Telecommunications - 235
switches make their table entries, but for the moment we assume that each switch has a table with
entries for all active virtual circuits.
The following figure shows a frame arriving at port 1 with a VCI of 14. When the frame arrives, the
switch looks in its table to find port 1 and a VCI of 14. When it is found, the switch knows to
change the VCI to 22 and send out the frame from port 3.
Setup Phase:
In the setup phase, a switch creates an entry for a virtual circuit. For example, suppose source A
needs to create a virtual circuit to B. Two steps are required: the setup request and the
acknowledgment.
Setup Request: A setup request frame is sent from the source to the destination. The following
figure shows the process.
4) VSAT; (2017,2016)
Answer: VSAT (Very Small Aperture Terminal) is a satellite communications system that serves
home and business users. A VSAT end user needs a box that interfaces between the user's
computer and an outside antenna with a transceiver. The tranceiver receives or sends a signal to a
satellite transponder in the sky. The satellite sends and receives signals from an earth station
computer that acts as a hub for the system. Each end user is interconnected with the hub station
via the satellite in a star topology. For one end user to communicate with another, each
transmission has to first go to the hub station which retransmits it via the satellite to the other
end user's VSAT. VSAT handles data, voice, and video signals.
VSAT is used both by home users who sign up with a large service such as DirecPC and by private
companies that operate or lease their own VSAT systems. VSAT offers a number of advantages
over terrestrial alternatives. For private applications, companies can have total control of their
own communication system without dependence on other companies. Business and home users
also get higher speed reception than if using ordinary telephone service or ISDN.
5) HDLC; (2017)
Answer: High-Level Data Link Control (HDLC) is a bit-oriented code-
transparent synchronous data link layer protocol developed by the International Organization for
Standardization (ISO). The original ISO standards for HDLC are as follows:
ISO 3309-1979 – Frame Structure
ISO 4335-1979 – Elements of Procedure
ISO 6159-1980 – Unbalanced Classes of Procedure
ISO 6256-1981 – Balanced Classes of Procedure
The current standard for HDLC is ISO/IEC 13239:2002, which replaces all of those standards.
HDLC provides both connection-oriented and connectionless service.
HDLC can be used for point-to-multipoint connections via the original master-slave modes Normal
Response Mode (NRM) and Asynchronous Response Mode (ARM), but they are now rarely used; is
now used almost exclusively to connect one device to another, using Asynchronous Balanced
Mode (ABM).
HDLC frames can be transmitted over synchronous or communication links.Those links have no
mechanism to mark the beginning or end of a frame, so the beginning and end of each frame has
to be identified. This is done by using a unique sequence of bits as a frame delimiter, or flag, and
Data and Telecommunications - 237
encoding the data to ensure that the flag sequence is never seen inside a frame. Each frame begins
and ends with a frame delimiter. A frame delimiter at the end of a frame may also mark the start
of the next frame.
On both synchronous and asynchronous links, the flag sequence is binary "01111110",
or hexadecimal 0x7E, but the details are quite different.
The transmitting computer software gives the data to be transmitted to the applications layer,
where it is processed and passed from layer to layer down the stack with each layer performing
its designated functions. The data is then transmitted over the physical layer of the network until
the destination computer or another device receives it. At this point the data is passed up through
the layers again, each layer performing its assigned operations until the data is used by the
receiving computer’s software.
All of the necessary and desirable operations required are grouped together in a logical sequence
at each of the layers. Each layer is responsible for specific functions:
Layer 7 – application: This layer works with the application software to provide
communications functions as required. It verifies the availability of a communications partner and
the resources to support any data transfer. It also works with end applications such as domain
name service (DNS), file transfer protocol (FTP), hypertext transfer protocol (HTTP), Internet
message access protocol (IMAP), post office protocol (POP), simple mail transfer protocol (SMTP),
Telenet, and terminal emulation.
Layer 6 – presentation: This layer checks the data to ensure that it is compatible with the
communications resources. It ensures compatibility between the data formats at the applications
238 | Data and Telecommunications
level and the lower levels. It also handles any needed data formatting or code conversion, as well
as data compression and encryption.
Layer 5 – session: Layer 5 software handles authentication and authorization functions. It also
manages the connection between the two communicating devices, establishing a connection,
maintaining the connection, and ultimately terminating it. This layer verifies that the data is
delivered as well.
Layer 4 – transport: This layer provides quality of service (QoS) functions and ensures the
complete delivery of the data. The integrity of the data is guaranteed at this layer via error
correction and similar functions.
Layer 3 – network: The network layer handles packet routing via logical addressing and
switching functions.
Layer 2 – data link: Layer 2 operations package and unpack the data in frames.
Layer 1 – physical: This layer defines the logic levels, data rate, physical media, and data
conversion functions that make up the bit stream of packets from one device to another.
Frequency Reuse
Frequency reusing is the concept of using the same radio frequencies within a given area, that
are separated by considerable distance, with minimal interference, to establish communication.
Frequency reuse offers the following benefits −
Allows communications within cell on a given frequency
Limits escaping power to adjacent cells
Allows re-use of frequencies in nearby cells
Uses same frequency for multiple conversations
10 to 50 frequencies per cell
For example, when N cells are using the same number of frequencies and Kbe the total number of
frequencies used in systems. Then each cell frequency is calculated by using the formulae K/N.
In Advanced Mobile Phone Services (AMPS) when K = 395 and N = 7, then frequencies per cell on
an average will be 395/7 = 56. Here, cell frequency is 56.
3. Frequency range of working: Amplitude modulation works between 540-1650 KHz while FM
works at 88-108MHz.
4. Power Consumption: FM based signal transmission consumes a higher amount of power than
an equivalent AM based signal transmission system.
AM vs FM: Signal Quality: Signal quality is a lot superior in FM than AM as amplitude based
signals are more susceptible to noise than those which use frequency. Moreover, noise signals are
difficult to filter out in AM reception whereas FM receivers easily filter out noise using the capture
effect and pre-emphasis, de-emphasis effects. In capture effect, the receiver locks itself to catch
stronger signal so that signals received are more synced with that at the transmitting end.
In pre-emphasis, de-emphasis process, the signal is further amplified to a higher frequency at
sending end (pre-emphasis) and vice versa at receiver end (de-emphasis). These two processes
reduce down the chances of a signal to get mixed with other signals and make FM more immune
to noise than AM.
6. Fading: Fading refers to power variation during signal transmission. Due to fading, the power
with the signal received can vary significantly and reception wouldn’t be of a good quality. Fading
is more prominent in amplitude modulation as compared to frequency modulation. That is why,
AM radio channels often face the problem where sound intensity varies while FM radio channels
have constant good reception.
7. Wavelength Difference between AM and FM: AM waves work in the range of KHz while in FM
waves work in MHz range. As a result, AM waves have a higher wavelength than the FM ones. A
higher wavelength increases the range of AM signals as compared to FM which have a limited area
of coverage.
8. Bandwidth consumption: AM signals consume 30KHz of bandwidth for each while in FM
80KHz is the bandwidth consumed by each signal. Hence, over a limited range of bandwidth, more
number of signals can be sent in AM than FM.
9. Circuit Complexity: Aforesaid, Amplitude Modulation is an older process and has a very
simple circuitry. On the other hand, frequency modulation requires a complicated circuitry for
transmission and reception of signal. The signals sent in FM are more modulated and emphasized
at the transmitter and they are thoroughly checked and corrected at the receiving end. This is why
circuitry for FM signals is very complicated.
10. Commercial Aspects: Setting up an AM based radio communication system is very economic
as there is no complicated circuitry and processes are easy to understand.
Data and Telecommunications - 241
9) FDM (2016)
Answer: Frequency division multiplexing (FDM) is a technique of multiplexing which means
combining more than one signal over a shared medium. In FDM, signals of different frequencies
are combined for concurrent transmission.
Concept and Process
In FDM, the total bandwidth is divided to a set of frequency bands that do not overlap. Each of
these bands is a carrier of a different signal that is generated and modulated by one of the sending
devices. The frequency bands are separated from one another by strips of unused frequencies
called the guard bands, to prevent overlapping of signals.
The modulated signals are combined together using a multiplexer (MUX) in the sending end. The
combined signal is transmitted over the communication channel, thus allowing multiple
independent data streams to be transmitted simultaneously. At the receiving end, the individual
signals are extracted from the combined signal by the process of demultiplexing (DEMUX).
Example
The following diagram conceptually represents multiplexing using FDM. It has 4 frequency bands,
each of which can carry signal from 1 sender to 1 receiver. Each of the 4 senders is allocated a
frequency band. The four frequency bands are multiplexed and sent via the communication
channel. At the receiving end, a demultiplexer regenerates the original four signals as outputs.
Here, if the frequency bands are of 150 KHz bandwidth separated by 10KHz guard bands, then the
capacity of the communication channel should be at least 630 KHz (channels : 150 × 4 + guard
bands : 10 × 3).
Uses and Applications
It allows sharing of a single transmission medium like a copper cable or a fiber optic cable, among
multiple independent signals generated by multiple users.
FDM has been popularly used to multiplex calls in telephone networks. It can also be used in
cellular networks, wireless networks and for satellite communications.
Orthogonal Frequency Division Multiplexing
OFDM is a technique where the channel bandwidth is split into many closely packed sub-carriers
or narrowband channels each of which transmits signals independently using techniques like
QAM (Quadrature Amplitude Modulation). Consequently, they do not need any guard bands and
thus have better utilization of available bandwidth.
242 | Data and Telecommunications
10) CRC techniques (2021,2016)
Answer: Cyclic Redundancy Check (CRC)
CRC is a different approach to detect if the received frame contains valid data. This technique
involves binary division of the data bits being sent. The divisor is generated using polynomials.
The sender performs a division operation on the bits being sent and calculates the remainder.
Before sending the actual bits, the sender adds the remainder at the end of the actual bits. Actual
data bits plus the remainder is called a codeword. The sender transmits data bits as codewords.
At the other end, the receiver performs division operation on codewords using the same CRC
divisor. If the remainder contains all zeros the data bits are accepted, otherwise it is considered
as there some data corruption occurred in transit.
11)CDMA (2021)
CDMA stands for Code Division Multiple Access. It is a channel access method used by several
radio communication technologies. It is a digital cellular technology and an example of multiple
access. It is generally used for mobile communication.
Multiple access means that several transmitters can send information simultaneously over a
single communication channel. In this system, different CDMA codes are assigned to different
users, and the user can access the whole bandwidth for the entire duration. It optimizes the use of
available bandwidth as it transmits over the entire frequency range and does not limit the user's
frequency range.
Thus, CDMA allows several users to share a band of frequencies without undue interference
between the users. It is used as an access method in many mobile phone standards.
CDMA technology was developed during World War II. It was developed by English allies to
protect their wireless transmissions from jamming. When the war ended, Qualcomm patented this
technology and made it commercially available. The first CDMA system was launched in
September 1995 in Hong Kong by Hutchison Telephone Co.
Operating system | 243
OPERATING SYSTEM
1. Introduction: Operating system overview, computer system structure, structure and
components of an operating system.
2. System calls: class of system calls and description.
3. Process and threads: process and thread model, process and thread creation and
termination, user and kernel level thread, scheduling, scheduling algorithms,
dispatcher, context switch, real time scheduling.
4. Concurrency and synchronization: IPC and inter-thread communication, critical
region, critical section problems and solutions.
5. Resource management: introduction to deadlock, ostrich algorithm, deadlock
detection and recovery, deadlock avoidance, deadlock prevention, starvation.
6. File management: File Naming and structure, file access and attributes, system calls,
File organization: OS and user perspective view of file, memory mapped file, file
directories organization,
7. File System Implementation: implementing file, allocation strategy, method of
allocation, directory implementation, UNIX i-node, block management, quota.
8. Memory management: basic memory management, fixed and dynamic partition,
virtual memory, segmentation, paging and swapping, MMU.
9. Virtual memory management: paging, page table structure, page replacement, TLB,
exception vector, demand paging and segmentation, thrashing and performance.
10. Disk I/O management: structure, performance, low-level disk formatting, Disk arm
scheduling algorithm, error handling, stable storage.
Reference Book:
1. Silberschatz, Galvin, Peterson, Operating system Concepts, sixth Edition.
2. 2.A.S.Tanenbaum,OS,Prentice Hall
3. P.B. Hausen,OS Concepts, Prentice Hall
4. S. Madnick and J.Donovon, OS, McGraw Hill
244 | Operating system
CHAPTER 1
INTRODUCTION
1) What is an operating system? (2008,2009,2012,2013,2014,2017,2021)
Answer: An operating system (OS) is system software that manages computer hardware and
software resources and provides common services for computer programs by acts as an
interface between the user and the computer hardware and controls the execution of all kinds of
programs.
System Application
Software software software
Operating system
Hardware
CPU RAM I/O
6) Figure out the abstract views of a computer system and describe the importance of
operating system. (2015)
Or, Write about the main components of an operating system. (2017)
Or, what are basic components of an operating system? (2014)
Answer:
7) The operating system can be view as a government and a resource allocator- Explain.
(2014)
Answer: The operating system as a government
Operating system is called the government of any computer system because
1. Like government systems differ based on rule like democracy, bureaucracy, autocracy etc
operating systems also differ by permissions in shell and kernel.
2. Government issues license and passes rules, makes law etc likewise an OS permits users to run
programs by granting access and permissions.
3. Government tries to create jobs while OS executes and creates jobs. Common man cannot
access certain units of the government due to security reasons; likewise Kernel operations are
controlled by OS in monitor mode.
4. Bribe and conspiracy are special system calls through which rich people try to run kernel
programs in a government system. OS also allows intelligent programmers to access the kernel
to program it.
5. The government assigns specific tasks to smaller units called state government which in turn
creates tasks for city and district offices. OS on the other hand spawns processes and in turn
spawns threads for their smooth functioning.
6. At any instant Government can lose its stability by losing the failth from the people and
dissolves itself. OS can also crash trying to execute a fatal process.
7. Bad people try to create havoc thus overloading the government. They employ police or
military to handle those. OS troublemakers are called viruses, worms, spams etc and they
employ system level security and cryptographic techniques to handle them.
The operating system as a resource manager
Modern computers consist of processors, memory, clocks, records, monitors, network
interfaces, printers, and other devices that can be used by multiple users simultaneously. The
work consists of the operating system to direct and control the allocation of processors, memory
and peripheral devices the various programs that use it.
Imagine what would happen if three programs running on a computer trying simultaneously to
print the results on the same printer. The first printed lines could come from program 1, the
following program 2, and then the program 3 and so on. This would result in the total disorder.
The operating system can avoid this potential chaos by transferring the results to be printed in a
buffer file disk. When printing is completed, the operating system can then print the files in the
buffer. Simultaneously, another program can continue generate results without realizing that it
does not send them (yet) to the printer.
258 | Operating system
8) What is Multiprocessor Systems.
Answer: Multiprocessor Operating System refers to the use of two or more central processing
units (CPU) within a single computer system. These multiple CPUs are in a close communication
sharing the computer bus, memory and other peripheral devices. These systems are referred
as tightly coupled systems.
These types of systems are used when very high speed is required to process a large volume of
data. These systems are generally used in environment like satellite control, weather forecasting
etc. The basic organization of multiprocessing system is shown in fig.
21) What do you mean by asymmetric and symmetric clustering? Which one is more
efficient and way? (2009)
Answer:
Asymmetric Clustering - In this, one machine is in hot standby mode while the other is running
the applications. The hot standby host (machine) does nothing but monitor the active server. If
that server fails, the hot standby host becomes the active server.
Symmetric Clustering - In this, two or more hosts are running applications, and they are
monitoring each other. This mode is obviously more efficient, as it uses all of the available
hardware.
23) Differentiate between time sharing and real time system. (2017)
Answer: Following are the differences between Real Time system and Timesharing System.
Sr. Real Time System Timesharing System
No.
1 In this system, events mostly external In this system, many users are
to computer system are accepted and allowed to simultaneously share the
processed within certain deadlines. computer resources.
2 Real time processing is mainly Time sharing processing deals with
devoted to one application. many different applications.
3 User can make inquiry only and Users can write and modify
cannot write or modify programs. programs.
4 User must get a response within the User should get a response within
specified time limit; otherwise it may fractions of seconds but if not, the
result in a disaster. results are not disastrous.
5 No context switching takes place in The CPU switches from one process
this system. to another as a time slice expires or
a process terminates.
27) What is the main difficulty that a programmer must overcome in writing an operating
system? (2008)
Answer: The main difficulty is keeping the operating system within the fixed time constraints of a
real-time system. If the system does not complete a task in a certain time frame, it may cause a
breakdown of the entire system it is running. Therefore when writing an operating system for a
real-time system, the writer must be sure that his scheduling schemes don't allow response time
to exceed the time constraint.
Operating system | 267
28) What is the purpose of command-interpreter? (2013)
Answer: A command interpreter is the part of a computer operating system that understands and
executes commands that are entered interactively by a human being or from a program. In some
operating systems, the command interpreter is called the shell.
The main features/purpose of the command interpreter are :
1. The possibility to add new commands in a very easy way. It contains 81 built-in commands.
2. The use of an expression evaluator, written by Mark Morley, which can be used to parse
numeric arguments, or make direct computations, and define variables. It is possible to add easily
new expression evaluators. One using complex numbers is implemented in the library.
3. The possibility to write, load and execute programs, which are sequences of commands, using
loops and jumps.
4. The definition of objects which are arrays of several types of numbers, having names. So it is
possible to refer to objects in arguments of commands for instance, by giving their name. It is also
possible to define structures, whose members are objects, other structures or variables of the
expression evaluator.
5. There is an implementation of complex numbers in two ways. The library contains also some
functions that simplify the use of arrays of numbers.
6. it is possible to run several programs simultaneously, and these programs can communicate
with each other (threads).
29) Write down the important features of command line interface and graphical user
interface. (2013)
Answer: The main features/purpose of the command interpreter are :
1. The possibility to add new commands in a very easy way. It contains 81 built-in commands.
2. The use of an expression evaluator, written by Mark Morley, which can be used to parse
numeric arguments, or make direct computations, and define variables. It is possible to add easily
new expression evaluators. One using complex numbers is implemented in the library.
3. The possibility to write, load and execute programs, which are sequences of commands, using
loops and jumps.
4. The definition of objects which are arrays of several types of numbers, having names. So it is
possible to refer to objects in arguments of commands for instance, by giving their name. It is also
possible to define structures, whose members are objects, other structures or variables of the
expression evaluator.
5. There is an implementation of complex numbers in two ways. The library contains also some
functions that simplify the use of arrays of numbers.
6. It is possible to run several programs simultaneously, and these programs can communicate
with each other (threads).
Features of the Graphical User Interface (GUI)
Entering dates
A graphical representation of a calendar that allows you to enter the date in your form by
clicking on the desired date in the calendar.
Access the calendar in date fields by using the LOV icon or through the menu under Edit, List
of Values.
268 | Operating system
Folders are special blocks that allow you to:
Only display the fields you are interested in.
Arrange the fields to best meet your needs.
Define query parameters to automatically call the records you need when opening the folder.
Sort in any order relevant to your needs.
Toolbar
Most commonly used menu items are duplicated as icons at the top of the Applications
window.
Attachments
Used to link non-structured data such as images, word processing documents, or video to
application data.
Multiple windows
Allows you to display all elements of a business flow on the same screen.
Does not require that you complete entering data in one form before navigating to another
form. Each form can be committed independently.
On-line Help
Help is now based on the functional flow of the task rather than according to the form's
structure.
Lets you select the task you want to perform and provides a step by step description of the
task.
Allows navigation to any part of the Help system.
30) Difference between command line interface and graphical user interface.(2021)
Solution:
BASIS FOR CLI GUI
COMPARISON
Basic Command line interface allows a Graphical User interface allows a
user to interact with the system user to interact with the system
through commands. through graphics which includes
images, icons, etc.
Device used Keyboard Mouse and keyboard
Ease of performing Hard to perform an operation and Easy to perform tasks and does
tasks require expertise. not require expertise.
Precision High Low
Flexibility Intransigent More flexible
32. What are the different directory structure generally used? [2014]
Solution:
Directory: Directory can be defined as the listing of the related files on the disk. The
directory may store some or the entire file attributes.
To get the benefit of different file systems on the different operating systems, A hard disk can be
divided into the number of partitions of different sizes. The partitions are also called volumes or
mini disks.
Each partition must have at least one directory in which, all the files of the partition can be listed.
A directory entry is maintained for each file in the directory which stores all the information
related to that file.
A directory can be viewed as a file which contains the Meta data of the bunch of files.
270 | Operating system
Every Directory supports a number of common operations on the file:
1. File Creation
2. Search for the file
3. File deletion
4. Renaming the file
5. Traversing Files
6. Listing of files
Operating system | 271
CHAPTER 2
OPERATING SYSTEM CALLS
(1) Mention some common operating system component.
Answer: From the virtual machine point of view (also resource management)
These components reflect the services made available by the O.S.
Process Management
Process is a program in execution --- numerous processes to choose from in
a multi-programmed system,
Process creation/deletion (bookkeeping)
Process suspension/resumption (scheduling, system vs. user)
Process synchronization
Process communication
Deadlock handling
Memory Management
Maintain bookkeeping information
Map processes to memory locations
Allocate/deallocate memory space as requested/required
I/O Device Management
Disk management functions such as free space management, storage allocation, fragmentation
removal, head scheduling
Consistent, convenient software to I/O device interface through buffering/caching,
custom drivers for each device.
File System
Built on top of disk management
File creation/deletion.
Support for hierarchical file systems
Update/retrieval operations: read, write, append, seek
Mapping of files to secondary storage
Protection
Controlling access to the system
Resources --- CPU cycles, memory, files, devices
Users --- authentication, communication
Mechanisms, not policies
Network Management
Often built on top of file system
TCP/IP, IPX, IPng
Connection/Routing strategies
``Circuit'' management --- circuit, message, packet switching
Communication mechanism
Data/Process migration
Network Services (Distributed Computing)
Built on top of networking
272 | Operating system
Email, messaging (GroupWise)
FTP
gopher, www
Distributed file systems --- NFS, AFS, LAN Manager
Name service --- DNS, YP, NIS
Replication --- gossip, ISIS
Security --- Kerberos
User Interface
Character-Oriented shell --- sh, csh, command.com ( User replaceable)
GUI --- X, Windows 95
(3) Describe three methods to passing parameters between user program and parameter.
Answer: Three general methods exist for passing parameters to the OS:
1. Parameters can be passed in registers.
2. When there are more parameters than registers, parameters can be stored in a block and the
block address can be passed as a parameter to a register.
3. Parameters can also be pushed on or popped off the stack by the operating system.
Operating system | 273
(4) What are the three major activates of an operating system in regard to memory
management. (2014)
Answer: 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 accessed directly by the CPU. For a program to
be executed, it must in the main memory. An Operating System does the following activities for
memory management −
1. Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are not in
use.
2. In multiprogramming, the OS decides which process will get memory when and how much.
3. Allocates the memory when a process requests it to do so and De-allocates the memory when a
process no longer needs it or has been terminated.
(5) Define system call. Mention major categories of system calls with examples.
A system call is the programmatic way in which a computer program requests a service from the
kernel of the operating system it is executed on. A system call is a way for programs to interact
with the operating system. A computer program makes a system call when it makes a request to
the operating system’s kernel. System call provides the services of the operating system to the
user programs via Application Program Interface(API). It provides an interface between a process
and operating system to allow user-level processes to request services of the operating system.
Types of System Calls
There are 5 different categories of system calls:
Process control, file manipulation, device manipulation, information maintenance and
communication.
Process Control
A running program needs to be able to stop execution either normally or abnormally. When
execution is stopped abnormally, often a dump of memory is taken and can be examined with a
debugger.
File Management
Some common system calls are create, delete, read, write, reposition, or close. Also, there is a need
to determine the file attributes – get and set file attribute. Many times the OS provides an API to
make these system calls.
Device Management
Process usually require several resources to execute, if these resources are available, they will be
granted and control returned to the user process. These resources are also thought of as devices.
Some are physical, such as a video card, and others are abstract, such as a file.
User programs request the device, and when finished they release the device. Similar to files, we
can read, write, and reposition the device.
Information Management
Some system calls exist purely for transferring information between the user program and the
operating system. An example of this is time, or date.
The OS also keeps information about all its processes and provides system calls to report this
information.
274 | Operating system
Communication
There are two models of interprocess communication, the message-passing model and the shared
memory model.
Message-passing uses a common mailbox to pass messages between processes.
Shared memory use certain system calls to create and gain access to create and gain access to
regions of memory owned by other processes. The two processes exchange information by
reading and writing in the shared data.
It provides minimal services of process and memory management. The communication between
client program/application and services running in user address space is established through
message passing, reducing the speed of execution microkernel. The Operating System remains
unaffected as user services and kernel services are isolated so if any user service fails it does not
affect kernel service. Thus it adds to one of the advantages in a microkernel. It is
easily extendable i.e. if any new services are to be added they are added to user address space
and hence requires no modification in kernel space. It is also portable, secure and reliable.
Microkernel Architecture –
Since kernel is the core part of the operating system, so it is meant for handling the most
important services only. Thus in this architecture only the most important services are inside
kernel and rest of the OS services are present inside system application program. Thus users are
able to interact with those not-so important services within the system application. And the
microkernel is solely responsible for the most important services of operating system they are
named as follows:
Inter process-Communication
Memory Management
CPU-Scheduling
Operating system | 275
Advantages of Microkernel –
The architecture of this kernel is small and isolated hence it can function better.
Expansion of the system is easier, it is simply added in the system application without
disturbing the kernel.
Vertices are mainly of two types, Resource and process. Each of them will be represented by a
different shape. Circle represents process while rectangle represents resource.
A resource can have more than one instance. Each instance will be represented by a dot inside the
rectangle.
276 | Operating system
Edges in RAG are also of two types, one represents assignment and other represents the wait of a
process for a resource. The above image shows each of them.
A resource is shown as assigned to a process if the tail of the arrow is attached to an instance to
the resource and the head is attached to a process.
A process is shown as waiting for a resource if the tail of an arrow is attached to the process while
the head is pointing towards the resource.
This technique requires the programmers to specify which overlay to load at different
circumstances.
278 | Operating system
CHAPTER 3
PROCESS AND THREADS
(1) What is process? (2015,2013,2012,2008)
Answer: A process is basically a program in execution. The execution of a process must progress
in a sequential fashion.
A process is defined as an entity which represents the basic unit of work to be implemented in the
system.
To put it in simple terms, we write our computer programs in a text file and when we execute this
program, it becomes a process which performs all the tasks mentioned in the program.
When a program is loaded into the memory and it becomes a process, it can be divided into four
sections ─ stack, heap, text and data. The following image shows a simplified layout of a process
inside main memory −
(4) Mention the types of process- specific information associated with PCB.(2021,2015)
Or, what kinds of information’s are contained in a PCB? (2008)
Or, briefly explain about the contents of the Process Control Block (PCB). (2013, 2012)
Answer: A PCB keeps all the information needed to keep track of a process as listed below in the
table −
Information & Description
Process State: The current state of the process i.e., whether it is ready, running, waiting, or
whatever.
Process privileges: This is required to allow/disallow access to system resources.
Process ID: Unique identification for each of the process in the operating system.
Pointer: A pointer to parent process.
Program Counter: Program Counter is a pointer to the address of the next instruction to be
executed for this process.
CPU registers
Various CPU registers where process need to be stored for execution for running state.
CPU Scheduling Information
Process priority and other scheduling information which is required to schedule the process.
Memory management information
This includes the information of page table, memory limits, Segment table depending on
memory used by the operating system.
Accounting information
This includes the amount of CPU used for process execution, time limits, execution ID etc.
IO status information
This includes a list of I/O devices allocated to the process.
Operating system | 281
The architecture of a PCB is completely dependent on Operating System and may contain different
information in different operating systems. Here is a simplified diagram of a PCB −
The PCB is maintained for a process throughout its lifetime, and is deleted once the process
terminates.
(6) What type of possibilities exists in term of execution and in terms of the address
space when a new process is created? (2008)
Answer:
Process Creation
Through appropriate system calls, such as fork or spawn, processes may create other processes.
The process which creates other process, is termed the parent of the other process, while the
created sub-process is termed its child.
Each process is given an integer identifier, termed as process identifier, or PID. The parent PID
(PPID) is also stored for each process.
On a typical UNIX systems the process scheduler is termed as sched, and is given PID 0. The first
thing done by it at system start-up time is to launch init, which gives that process PID 1. Further
282 | Operating system
Init launches all the system daemons and user logins, and becomes the ultimate parent of all other
processes.
A child process may receive some amount of shared resources with its parent depending on
system implementation. To prevent runaway children from consuming all of a certain system
resource, child processes may or may not be limited to a subset of the resources originally
allocated to the parent.
There are two options for the parent process after creating the child:
Wait for the child process to terminate before proceeding. Parent process makes
a wait() system call, for either a specific child process or for any particular child process,
which causes the parent process to block until the wait() returns. UNIX shells normally wait
for their children to complete before issuing a new prompt.
Run concurrently with the child, continuing to process without waiting. When a UNIX shell
runs a process as a background task, this is the operation seen. It is also possible for the
parent to run for a while, and then wait for the child later, which might occur in a sort of a
parallel processing operation.
There are also two possibilities in terms of the address space of the new process:
1. The child process is a duplicate of the parent process.
2. The child process has a program loaded into it.
Process Termination
By making the exit(system call), typically returning an int, processes may request their own
termination. This int is passed along to the parent if it is doing a wait(), and is typically zero on
successful completion and some non-zero code in the event of any problem.
Processes may also be terminated by the system for a variety of reasons, including:
The inability of the system to deliver the necessary system resources.
In response to a KILL command or other unhandled process interrupts.
A parent may kill its children if the task assigned to them is no longer needed i.e. if the need of
having a child terminates.
If the parent exits, the system may or may not allow the child to continue without a parent (In
UNIX systems, orphaned processes are generally inherited by init, which then proceeds to kill
them.)
When a process ends, all of its system resources are freed up, open files flushed and closed, etc.
Operating system | 283
(7) What do you mean by co-operating process? (2014,2012,2010)
Answer: Cooperating Processes are those that can affect or be affected by other processes.
There are several reasons why cooperating processes are allowed:
Information Sharing - There may be several processes which need access to the same file for
example. ( e.g. pipelines. )
Computation speedup - Often a solution to a problem can be solved faster if the problem can be
broken down into sub-tasks to be solved simultaneously (particularly when multiple processors
are involved.)
Modularity - The most efficient architecture may be to break a system down into cooperating
modules. ( E.g. databases with a client-server architecture. )
Convenience - Even a single user may be multi-tasking, such as editing, compiling, printing, and
running the same code in different windows.
2.Thread. (2021,2014)
Answer: A thread is a flow of execution through the process code, with its own program counter
that keeps track of which instruction to execute next, system registers which hold its current
working variables, and a stack which contains the execution history.
A thread shares with its peer threads few information like code segment, data segment and open
files. When one thread alters a code segment memory item, all other threads see that.
284 | Operating system
A thread is also called a lightweight process. Threads provide a way to improve application
performance through parallelism. Threads represent a software approach to improving
performance of operating system by reducing the overhead thread is equivalent to a classical
process.
3.Producer-Consumer Problem; (2016)
There are two processes: Producer and Consumer. Producer produces some item and Consumer
consumes that item. The two processes shares a common space or memory location known as
buffer where the item produced by Producer is stored and from where the Consumer consumes
the item if needed. There are two version of this problem: first one is known as unbounded buffer
problem in which Producer can keep on producing items and there is no limit on size of buffer, the
second one is known as bounded buffer problem in which producer can produce up to a certain
amount of item and after that it starts waiting for consumer to consume it. We will discuss the
bounded buffer problem. First, the Producer and the Consumer will share some common memory,
then producer will start producing items. If the total produced item is equal to the size of buffer,
producer will wait to get it consumed by the Consumer. Similarly, the consumer first check for the
availability of the item and if no item is available, Consumer will wait for producer to produce it. If
there are items available, consumer will consume it.
(12) Discuss about client server communication via Remote Procedure Calls (RPC). [2020]
A remote procedure call is an inter process communication technique that is used for client-server
based applications. It is also known as a subroutine call or a function call.
A client has a request message that the RPC translates and sends to the server. This request may
be a procedure or a function call to a remote server. When the server receives the request, it sends
the required response back to the client. The client is blocked while the server is processing the
call and only resumed execution after the server is finished.
The sequence of events in a remote procedure call are given as follows −
The client stub is called by the client.
The client stub makes a system call to send the message to the server and puts the parameters
in the message.
The message is sent from the client to the server by the client’s operating system.
The message is passed to the server stub by the server operating system.
The parameters are removed from the message by the server stub.
Then, the server procedure is called by the server stub.
A diagram that demonstrates this is as follows −
Operating system | 287
(13) Write short note on remote procedure call. [2018]
Solution:
Remote Procedure Call (RPC): Remote Procedure call is an inter process communication
technique. It is used for client-server applications. RPC mechanisms are used when a computer
program causes a procedure or subroutine to execute in a different address space, which is coded
as a normal procedure call without the programmer specifically coding the details for the remote
interaction. This procedure call also manages low-level transport protocol, such as User Datagram
Protocol, Transmission Control Protocol/Internet Protocol etc. It is used for carrying the message
data between programs. The Full form of RPC is Remote Procedure Call.
(14) Distinguish between “Light weight process” and “Heavy weight process”. [2018]
Solution:
Lightweight and heavyweight processes refer the mechanics of a multi-processing system.
In a lightweight process, threads are used to divvy up the workload. Here you would see one
process executing in the OS (for this application or service.)
This process would process 1 or more threads. Each of the threads in this process shares the same
address space. Because threads share their address space, communication between the threads is
simple and efficient. Each thread could be compared to a process in a heavyweight scenario.
In a heavyweight process, new processes are created to perform the work in parallel. Here (for the
same application or service), you would see multiple processes running. Each heavyweight
process contains its own address space. Communication between these processes would involve
additional communications mechanisms such as sockets or pipes.
The benefits of a lightweight process come from the conservation of resources. Since threads use
the same code section, data section and OS resources, less overall resources are used. The
drawback is now you have to ensure your system is thread-safe. You have to make sure the
threads don't step on each other. Fortunately, Java provides the necessary tools to allow you to do
this.
288 | Operating system
(15) Why do you think CPU scheduling is the basis of multi-programmed operating system?
(2017)
Answer: CPU scheduling is a process which allows one process to use the CPU while the execution
of another process is on hold(in waiting state) due to unavailability of any resource like I/O etc,
thereby making full use of CPU. The aim of CPU scheduling is to make the system efficient, fast and
fair.
Whenever the CPU becomes idle, the operating system must select one of the processes in
the ready queue to be executed. The selection process is carried out by the short-term scheduler
(or CPU scheduler). The scheduler selects from among the processes in memory that are ready to
execute, and allocates the CPU to one of them.
CPU scheduling is the basis of multiprogramming. Whenever a computer CPU becomes idle, the
operating system must select a process in the ready queue to be executed. One application of
priority queues in operating systems is scheduling jobs on a CPU.
(18) Describe the difference among short-time, medium time and long time scheduling.
(2017)
Answer: Comparison among Scheduler
S.N. Long-Term Scheduler Short-Term Scheduler Medium-Term Scheduler
1 It is a job scheduler It is a CPU scheduler It is a process swapping
scheduler.
2 Speed is lesser than short Speed is fastest among Speed is in between both
term scheduler other two short and long term
scheduler.
3 It controls the degree of It provides lesser control It reduces the degree of
multiprogramming over degree of multiprogramming.
multiprogramming
4 It is almost absent or It is also minimal in time It is a part of Time sharing
minimal in time sharing sharing system systems.
system
5 It selects processes from It selects those processes It can re-introduce the
pool and loads them into which are ready to execute process into memory and
memory for execution execution can be continued.
290 | Operating system
(19) What do you mean by dispatcher? (2021,2015,2013)
Answer: The dispatcher is the module that gives control of the CPU to the process selected by
the short-term scheduler. This function involves:
Switching context
Switching to user mode
Jumping to the proper location in the user program to restart that program from where it
left last time.
The dispatcher should be as fast as possible, given that it is invoked during every process switch.
The time taken by the dispatcher to stop one process and start another process is known as
the Dispatch Latency. Dispatch Latency can be explained using the below figure:
(22) Consider the following set of processes, with the length of the CPU –burst time given
in milliseconds : (2016,2015,2009)
Process Burst time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
(i) Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF , a non-
preemptive priority and RR (quantum=1) scheduling.
(ii) What is the turnaround time of each process for each of the scheduling algorithms in part (i)?
(iii) What is the waiting time of each process for each of the scheduling algorithm in part (i) ?
Answer: (i) Gantt charts
a) FCFS(first come first served) scheduling:
P1 P2 P3 P4 P5
0 0 11 13 4 9
Operating system | 293
b) SJF(Shortest Job first)
P1 P2 P3 P4 P5
c) Non-preemptive priority
P1 P2 P3 P4 P5
0 1 6 16 18 19
P5 5+ 14=19 ms
P1 10+9 =19 ms
P2 1 +0 = 1 ms
P3 2+2 = 4 ms
P4 1+ 1=2 ms
P5 5+ 4=9 ms
294 | Operating system
Average turnaround time = (19+1+4+2+9)/5=7 ms
c) Non-preemptive priority
Process Turnaround time = Burst time+ waiting time
P1 10+6 =16 ms
P2 1 +0 = 1 ms
P3 2+16 = 18 ms
P4 1+ 18=19 ms
P5 5+ 1=6 ms
P1 10+9 =19 ms
P2 1 +1 = 2 ms
P3 2+5 = 7 ms
P4 1+ 3=4 ms
P5 5+ 9=14 ms
c) Non-preemptive priority
Process Wait Time : Service Time - Arrival Time
P1 6 - 0 = 6 ms
P2 0 - 0 = 0 ms
P3 16 - 0 = 16 ms
P4 18 - 0 = 18 ms
P5 1 - 0 = 1 ms
Average Waiting Time: (6+0+16+18+1) / 5 = 8.2 ms
(23) Consider the following set of processes, with the length of the CPU –burst time given
in milliseconds : (2021,2017,2012,2010)
Process Burst time Priority
P1 8 3
P2 3 1
P3 2 3
P4 1 4
P5 4 2
The processes are assumed to have arrived in the order:
P1,P2,P3,P4,P5, all at time 0.
i. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF , a no
preemptive priority and RR (quantum=1) scheduling.
ii. What is the turnaround time of each process for each of the scheduling algorithms in part (i)?
iii. What is the waiting time of each process for each of the scheduling algorithm in part (i) ?
296 | Operating system
Answer: Gantt charts
P1 P2 P3 P4 P5
0 8 11 13 14 18
P4 P3 P2 P5 P1
0 1 3 6 14 18
c) Non-preemptive priority
P2 P5 P1 P3 P4
0 3 7 15 17 18
c) Non-preemptive priority
Process Turnaround time = Burst time+ waiting time
P1 8+7 =15 ms
P2 3+0 = 3 ms
P3 2+15 = 17 ms
P4 1+ 17=18 ms
P5 4+ 3=7 ms
c) Non-preemptive priority
P2 (1 – 0)+(6-2)+(10-7) = 1+4+3=8 ms
P3 (2-0)+(7 – 3) = 2+4=6 ms
P4 3 - 0 = 3 ms
P5 (4-0)+(8-5)+(9-8)+(11-9)+(13-12)=4+3+1+2+1=11 ms
(24) Consider the following set of processes with the length of the CPU burst given in
milliseconds: (2014)
Process Burst time Priority
P1 2 2
P2 1 1
P3 8 4
P4 4 2
P5 5 3
Operating system | 299
The processes are assumed to have arrived in the order:
P1,P2,P3,P4,P5, all at time 0.
(i) Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF , a
non-preemptive priority(a large number implies a higher priority) and RR (quantum=2)
scheduling.
(ii) What is the turnaround time of each process for each of the scheduling algorithms ?
(iii) What is the waiting time of each process for each of the scheduling algorithms?
(iv) Which of the algorithms results in the minimum average waiting time (over all processes)?
Answer: Gantt charts
a) FCFS(first come first served) scheduling:
P1 P2 P3 P4 P5
0 2 3 11 15 20
P2 P1 P4 P5 P3
0 1 3 7 12 20
c) Non-preemptive priority
P3 P5 P1 P4 P2
0 8 13 15 19 20
P1 P2 P3 P4 P5 P3 P4 P5 P3 P5 P3
0 2 3 5 7 9 11 13 15 17 18 20
(ii) Turnaround time
Turnaround time = Burst time+ waiting time
a) FCFS(first come first served) scheduling:
Process Turnaround time = Burst time+ waiting time
P1 2+0 =2 ms
P2 1+2 = 3 ms
P3 8+3 = 11 ms
P4 4+ 11=15 ms
P5 5+ 15=20 ms
300 | Operating system
Average turnaround time = (2+3+11+15+20)/5=10.2 ms
c) Non-preemptive priority
Process Turnaround time = Burst time+ waiting time
P1 2+13 =15 ms
P2 1+19 = 20 ms
P3 8+0= 8 ms
P4 4+ 15=19 ms
P5 5+ 8=13 ms
Average turnaround time = (15+20+8+19+13)/5=15 ms
P1 P2 P3 P4 P5 P3 P4 P5 P3 P5 P3
0 2 3 5 7 9 11 13 15 17 18 20
Advantages: A process that waits too long in a lower priority queue may be moved to a higher
priority queue.
Operating system | 303
13. What are the purpose of disk scheduling? [2013]
Solution:
Disk Scheduling: As we know, a process needs two type of time, CPU time and IO time. For I/O, it
requests the Operating system to access the disk.
However, the operating system must be fair enough to satisfy each request and at the same time,
operating system must maintain the efficiency and speed of process execution.
The technique that operating system uses to determine the request which is to be satisfied next is
called disk scheduling.
Goal of Disk Scheduling Algorithm:
o Fairness
o High throughout
o Minimal traveling head time
304 | Operating system
CHAPTER 4
PROCESS SYNCHRONIZATION
(1) Explain dining philosopher problem. (2014)
Answer: The Dining Philosopher Problem – The Dining Philosopher Problem states that K
philosophers seated around a circular table with one chopstick between each pair of philosophers.
There is one chopstick between each philosopher. A philosopher may eat if he can pick up the two
chopsticks adjacent to him. One chopstick may be picked up by any one of its adjacent followers
but not both.
The problem was designed to illustrate the challenges of avoiding deadlock, a system state in
which no progress is possible. To see that a proper solution to this problem is not obvious,
consider a proposal in which each philosopher is instructed to behave as follows:
think until the left chopstick is available; when it is, pick it up;
think until the right chopstick is available; when it is, pick it up;
when both chopsticks are held, eat for a fixed amount of time;
then, put the right chopstick down;
then, put the left chopstick down;
Repeat from the beginning.
This attempted solution fails because it allows the system to reach a deadlock state, in which no
progress is possible. This is a state in which each philosopher has picked up the chopstick to the
left, and is waiting for the chopstick to the right to become available, or vice versa. With the given
instructions, this state can be reached, and when it is reached, the philosophers will eternally wait
for each other to release a chopstick
Mutual exclusion is the basic idea of the problem; the dining philosophers create a generic and
abstract scenario useful for explaining issues of this type. The failures these philosophers may
experience are analogous to the difficulties that arise in real computer programming when
multiple programs need exclusive access to shared resources.
Operating system | 305
(2) Describe Dinning—philosopher problem. How this can be solved by using
semaphore? (2021,2013)
Answer: Semaphore Solution to Dining Philosopher –
Each philosopher is represented by the following pseudocode:
process P
while true do
{ THINK;
PICKUP(CHOPSTICK[i], CHOPSTICK[i+1 mod 5]);
EAT;
PUTDOWN(CHOPSTICK[i], CHOPSTICK[i+1 mod 5])
}
There are three states of philosopher : THINKING, HUNGRY and EATING. Here there are two
semaphores : Mutex and a semaphore array for the philosophers. Mutex is used such that no two
philosophers may access the pickup or putdown at the same time. The array is used to control the
behavior of each philosopher. But, semaphores can result in deadlock due to programming errors.
(3) Discuss the critical section problem with its solution. (2014)
Or, Figure out the requirements to solve the critical-section problem. (2010)
Or, Write down the requirements that should satisfy to solve the critical- section (2008)
Answer: A Critical Section is a code segment that accesses shared variables and has to be
executed as an atomic action. It means that in a group of cooperating processes, at a given point of
time, only one process must be executing its critical section. If any other process also wants to
execute its critical section, it must wait until the first one finishes.
CHAPTER 5
RESOURCE MANAGEMENT
[DEADLOCK]
5) Is it possible to have a deadlock involving only one single process? Explain your
answer. (2016)
Answer: A deadlock situation can only arise if the following four conditions hold simultaneously
in a system:
Mutual Exclusion
Hold and Wait
No Preemption
Circular-wait
It is impossible to have circular-wait when there is only one single-threaded process. There is no
second process to form a circle with the first one. One process cannot hold a resource, yet be
waiting for another resource that it is holding.
So it is not possible to have a deadlock involving only one process.
Now coming to the edges of RAG.There are two types of edges in RAG –
Assign Edge – If you already assign a resource to a process then it is called Assign edge.
2. Request Edge – It means in future the process might want some resource to complete the
execution, that is called request edge.
So, if a process is using a resource, an arrow is drawn from the resource node to the process node.
If a process is requesting a resource, an arrow is drawn from the process node to the resource
node.
Example 1 (Single instances RAG) –
If there is a cycle in the Resource Allocation Graph and each resource in the cycle provides only
one instance, then the processes will be in deadlock. For example, if process P1 holds resource R1,
process P2 holds resource R2 and process P1 is waiting for R2 and process P2 is waiting for R1,
then process P1 and process P2 will be in deadlock.
Operating system | 311
Here’s another example, that shows Processes P1 and P2 acquiring resources R1 and R2 while
process P3 is waiting to acquire both resources. In this example, there is no deadlock because
there is no circular dependency.
So cycle in single-instance resource type is the sufficient condition for deadlock.
Example 2 (Multi-instances RAG) –
From the above example, it is not possible to say the RAG is in a safe state or in an unsafe state.So
to see the state of this RAG, let’s construct the allocation matrix and request matrix.
The total number of processes are three; P1, P2 & P3 and the total number of resources are
two; R1 & R2.
312 | Operating system
Allocation matrix –
For constructing the allocation matrix, just go to the resources and see to which process it is
allocated.
R1 is allocated to P1, therefore write 1 in allocation matrix and similarly, R2 is allocated to P2
as well as P3 and for the remaining element just write 0.
Request matrix –
In order to find out the request matrix, you have to go to the process and see the outgoing
edges.
P1 is requesting resource R2, so write 1 in the matrix and similarly, P2 requesting R1 and for
the remaining element write 0.
So now available resource is = (0, 0).
Checking deadlock (safe or not) –
So, there is no deadlock in this RAG. Even though there is a cycle, still there is no deadlock.
Therefore in multi-instance resource cycle is not sufficient condition for deadlock.
Above example is the same as the previous example except that, the process P3 requesting for
resource R1.
So the table becomes as shown in below.
Operating system | 313
So,the Available resource is = (0, 0), but requirement are (0, 1), (1, 0) and (1, 0).So you can’t fulfill
any one requirement. Therefore, it is in deadlock.
Therefore, every cycle in a multi-instance resource type graph is not a deadlock, if there has to be
a deadlock, there has to be a cycle. So, in case of RAG with multi-instance resource type, the cycle
is a necessary condition for deadlock, but not sufficient.
9) How can you ensure that Hold and Wait and circular wait never occur in deadlock
system? (2017)
Answer: Hold and Wait
To prevent this condition processes must be prevented from holding one or more resources
while simultaneously waiting for one or more others. There are several possibilities for this:
Require that all processes request all resources at one time. This can be wasteful of system
resources if a process needs one resource early in its execution and doesn't need some other
resource until much later.
Require that processes holding resources must release them before requesting new resources,
and then re-acquire the released resources along with the new ones in a single new request.
This can be a problem if a process has partially completed an operation using a resource and
then fails to get it re-allocated after releasing it.
Either of the methods described above can lead to starvation if a process requires one or more
popular resources.
Allocate all required resources to the process before start of its execution, this way hold and
wait condition is eliminated but it will lead to low device utilization. for example, if a process
requires printer at a later time and we have allocated printer before the start of its execution
printer will remained blocked till it has completed its execution.
314 | Operating system
Need
A B C
P0 7 4 3
P1 1 2 2
P2 6 0 0
P3 0 1 1
P4 4 3 1
(ii) Is the system in a safe state?
Here , we have
Work=Available = (3 3 2)
If [Need (n) <= Work ]
Then , Work=Work + Allocation
P0 (Need0 7 4 3)> (Work 3 3 2) Doesn’t work & try later
Finish = 0 0 0 0 0
Need
A B C
P0 7 4 3
P1 1 2 2
P2 6 0 0
P3 0 1 1
P4 4 3 1
(i) Is the system in a safe state?
Here , we have
Work=Available = (3 3 2)
If [Need (n) <= Work ]
Then , Work=Work + Allocation
Operating system | 319
P0 (Need0 7 4 3)> (Work 3 3 2) Doesn’t work & try later
Finish = 0 0 0 0 0
New state is safe . ans sequence is (P3>P4>P1>P0>P2).thus grant the request of p1.
The OS can use different policies to manage each queue (FIFO, Round Robin, Priority, etc.). The
OS scheduler determines how to move processes between the ready and run queues which can
only have one entry per processor core on the system; in the above diagram, it has been merged
with the CPU.
18. Write one algorithm that determines the system is in the safe or not? [2010]
Solution:
The algorithm for finding out whether or not a system is in a safe state can be described as
follows:
1) Let Work and Finish be vectors of length ‘m’ and ‘n’ respectively.
Initialize: Work = Available
Finish[i] = false; for i=1, 2, 3, 4….n
2) Find an i such that both
a) Finish[i] = false
b) Needi <= Work
if no such i exists goto step (4)
3) Work = Work + Allocation[i]
Finish[i] = true
goto step (2)
4) if Finish [i] = true for all i
then the system is in a safe state
Math 01:
322 | Operating system
19)Consider the following snapshot of a system:-
Allocation Max Available
A B C D A B C D 1 5 2 0
0 0 1 2 0 0 1 2
1 0 0 0 1 7 5 0
1 3 5 4 2 3 5 6
0 6 3 2 0 6 5 2
0 0 1 4 0 6 5 6
iv) Determine the need matrix
v) Is the system in safe state?
vi) If a request from process P1
Arrives for (0, 4, 2, 0) can the request be granted immediate.
[2021, 2016, 2014, 2011]
Answer:
i) Need matrix:
Need
A B C D
0 0 0 0
0 7 5 0
1 0 0 2
0 0 2 0
0 6 4 2
ii) Initialization:
Work = available= [ 1, 5, 2, 0]
Finish= 0 0 0 0
Search for safe state:
P0:( need= 0 0 0 0)
Finish = 1 0 0 0 0, work= 1 5 2 0 + 0 0 1 2
=1 5 3 2
P1: ( need= 0 7 5 0) > ( work= 1 5 3 2) ,
Doesn’t work - wait try later,
Finish= 1 0 0 0 0
(iii) Yes, because new request from process P1 in less than available request < = Available
( 0 4 2 0 ) < = ( 1 5 2 0)
So the request granted immediately.
324 | Operating system
CHAPTER 6
MEMORY MANAGEMENT
(1) Define logical address, physical address and virtual address. (2017,2015)
Answer: a logical address is the address at which an item (memory cell, storage element, network
host) appears to reside from the perspective of an executing application program. A logical
address may be different from the physical address due to the operation of an address translator
or mapping function.
A physical address is a binary number in the form of logical high and low states on an address bus
that corresponds to a particular cell of primary storage(also called main memory), or to a
particular register in a memory-mapped I/O(input/output) device.
A virtual address is a binary number in virtual memory that enables a process to use a location in
primary storage (main memory) independently of other processes and to use more space than
actually exists in primary storage by temporarily relegating some contents to a hard disk or
internal flash drive.
The CPU's memory management unit (MMU) stores a cache of recently used mappings from the
operating system's page table. This is called the translation look aside buffer (TLB), which is an
associative cache.
When a virtual address needs to be translated into a physical address, the TLB is searched first. If
a match is found (a TLB hit), the physical address is returned and memory access can continue.
However, if there is no match (called a TLB miss), the memory management unit, or the operating
system TLB miss handler, will typically look up the address mapping in the page table to see
Operating system | 325
whether a mapping exists (a page walk). If one exists, it is written back to the TLB (this must be
done, as the hardware accesses memory through the TLB in a virtual memory system), and the
faulting instruction is restarted (this may happen in parallel as well). This subsequent translation
will find a TLB hit, and the memory access will continue.
The total time taken by swapping process includes the time it takes to move the entire process to
a secondary disk and then to copy the process back to memory, as well as the time the process
takes to regain main memory.
Operating system | 327
(7) What is paging? Why are page sizes always power of 2? (2021,2014)
Answer: A computer can address more memory than the amount physically installed on the
system. This extra memory is actually called virtual memory and it is a section of a hard that's set
up to emulate the computer's RAM. Paging technique plays an important role in implementing
virtual memory.
Paging is a memory management technique in which process address space is broken into blocks
of the same size called pages (size is power of 2, between 512 bytes and 8192 bytes). The size of
the process is measured in the number of pages.
Similarly, main memory is divided into small fixed-sized blocks of (physical) memory
called frames and the size of a frame is kept the same as that of a page to have optimum
utilization of the main memory and to avoid external fragmentation.
328 | Operating system
(8) Define address binding and dynamic loading. (2016,2013,2010)
Answer:
Address binding is the process of mapping the program's logical or virtual addresses to
corresponding physical or main memory addresses. In other words, a given logical address is
mapped by the MMU (Memory Management Unit) to a physical address.
Dynamic loading is a mechanism by which a computer program can, at run time, load a library
(or other binary) into memory, retrieve the addresses of functions and variables contained in the
library, execute those functions or access those variables, and unload the library from memory.
(10) Explain the difference between logical and physical addresses. (2015)
Answer:
BASIS FOR LOGICAL ADDRESS PHYSICAL ADDRESS
COMPARISON
Basic It is the virtual address generated The physical address is a location in a
by CPU memory unit.
Address Space Set of all logical addresses Set of all physical addresses mapped to
generated by CPU in reference to a the corresponding logical addresses is
program is referred as Logical referred as Physical Address.
Address Space.
Visibility The user can view the logical The user can never view physical
address of a program. address of program
Access The user uses the logical address to The user can not directly access
access the physical address. physical address.
Generation The Logical Address is generated by Physical Address is Computed by MMU
the CPU
(12) What are the differences between internal and external fragmentation?
(2021,2016,2015,2013,2012)
Answer: Internal Fragmentation occurs when a fixed size memory allocation technique is used.
External fragmentation occurs when a dynamic memory allocation technique is used.
Internal fragmentation occurs when a fixed size partition is assigned to a program/file with
less size than the partition making the rest of the space in that partition unusable. External
fragmentation is due to the lack of enough adjacent space after loading and unloading of
programs or files for some time because then all free space is distributed here and there.
External fragmentation can be mined by compaction where the assigned blocks are moved to
one side, so that contiguous space is gained. However, this operation takes time and also
certain critical assigned areas for example system services cannot be moved safely. We can
observe this compaction step done on hard disks when running the disk defragmenter in
Windows.
External fragmentation can be prevented by mechanisms such as segmentation and paging.
Here a logical contiguous virtual memory space is given while in reality the files/programs are
splitted into parts and placed here and there.
Internal fragmentation can be maimed by having partitions of several sizes and assigning a
program based on the best fit. However, still internal fragmentation is not fully eliminated.
To implement a two-level page structure, the logical address is modified into two parts, one
for the Directory table (Outer page table) and other for the inner page table.
It is as follows: (for 32-bits)
p1 (10 bits) p2(10 bits) d(12 bits)
- - -
Here,
p1 →→ index to the outer page table
p2 →→ displacement within the page of the outer page table
d →→ page offset
This method is not considered appropriate for 64-bit architectures.
The disadvantage of this is that increases that number of memory accesses.
What are the physical address for the following logical addresses?
i. 0, 430
ii. 1, 10
iii. 2, 500
iv. 3, 400
v. 4, 112
vi. 1, 11
Answer:
(1) 0, 430
Here the number of segment is =0
Offset d=430
The length for segment 0 is = 600
Since , 430<600
The physical address is,
Base+d=219+430=649 and the memory word 649 is accessed.
(2) 1, 10
Here the number of segment is =1
Offset d=10
The length for segment 1 is = 14
334 | Operating system
Since , 10<14
The physical address is,
Base+d=2300+10=2310 and the memory word 2310 is accessed.
(3) 2, 500
Here the number of segment is =2
Offset d=500
The length for segment 2 is = 100
Since , 500>100
The logcal address is invalid. There is no physical address.
(4) 3, 400
Here the number of segment is =3
Offset d=400
The length for segment 3 is = 580
Since , 400<580
The physical address is,
Base+d=1327+400=1727 and the memory word 1727 is accessed.
(5) 4, 112
Here the number of segment is =4
Offset d=122
The length for segment 4 is = 96
Since , 122>96
The logcal address is invalid. There is no physical address.
(6) 1, 11
Here the number of segment is =0
Offset d=11
The length for segment 0 is = 14
Since , 11<14
The physical address is,
Base+d=2300+11=2311 and the memory word 2311 is accessed.
CHAPTER 7
VIRTUAL MEMORY
(1) What is virtual memory? (2016,2012)
Answer: Virtual Memory is a storage allocation scheme in which secondary memory can be
addressed as though it were part of main memory. The addresses a program may use to reference
memory are distinguished from the addresses the memory system uses to identify physical
storage sites, and program generated addresses are translated automatically to the corresponding
machine addresses.
The size of virtual storage is limited by the addressing scheme of the computer system and
amount of secondary memory is available not by the actual number of the main storage locations.
(3) Explain the virtual machine structure of operating system with its advantages and
disadvantages. (2015)
Answer: Virtual machine is a software implementation of a physical machine - computer - that
works and executes analogically to it. Virtual machines are divided in two categories based on
their use and correspondence to real machine: system virtual machines and process virtual
machines. First category provides a complete system platform that executes complete operating
system, second one will run a single program.
The main advantages of virtual machines:
1. Multiple OS environments can exist simultaneously on the same machine, isolated from each
other;
2. Virtual machine can offer an instruction set architecture that differs from real computer's;
3. Easy maintenance, application provisioning, availability and convenient recovery.
4. The main disadvantages:
5. When multiple virtual machines are simultaneously running on a host computer, each virtual
machine may introduce an unstable performance, which depends on the workload on the
system by other running virtual machines;
6. Virtual machine is not that efficient as a real one when accessing the hardware.
Operating system | 337
(4) Explain the demand paging system. (2016,2012)
Answer: A demand paging system is quite similar to a paging system with swapping where
processes reside in secondary memory and pages are loaded only on demand, not in advance.
When a context switch occurs, the operating system does not copy any of the old program’s pages
out to the disk or any of the new program’s pages into the main memory Instead, it just begins
executing the new program after loading the first page and fetches that program’s pages as they
are referenced.
While executing a program, if the program references a page which is not available in the main
memory because it was swapped out a little ago, the processor treats this invalid memory
reference as a page fault and transfers control from the program to the operating system to
demand the page back into the memory.
Advantages
Following are the advantages of Demand Paging −
Large virtual memory.
More efficient use of memory.
There is no limit on degree of multiprogramming.
338 | Operating system
Disadvantages
Number of tables and the amount of processor overhead for handling page interrupts are
greater than in the case of the simple paged management techniques.
(5) Define the term page fault. Write down the steps in handling page fault.(2008)
Or, when do page fault occur? Describe the actions taken by the operating system.
(2017, 2014, 2012, 2010)
Answer: A page fault (sometimes called #PF, PF or hard fault[a]) is a type of exception raised by
computer hardware when a running program accesses a memory page that is not currently
mapped by the memory management unit (MMU) into the virtual address space of a process.
Logically, the page may be accessible to the process, but requires a mapping to be added to the
process page tables, and may additionally require the actual page contents to be loaded from a
backing store such as a disk.
Steps for handling page fault
The basic idea behind paging is that when a process is swapped in, the pager only loads into
memory those pages that it expects the process to need ( right away. )
Pages that are not loaded into memory are marked as invalid in the page table, using the
invalid bit. ( The rest of the page table entry may either be blank or contain information about
where to find the swapped-out page on the hard drive. )
If the process only ever accesses pages that are loaded in memory ( memory
resident pages ), then the process runs exactly as if all the pages were loaded in to memory.
On the other hand, if a page is needed that was not originally loaded up, then a page fault
trap is generated, which must be handled in a series of steps:
1. The memory address requested is first checked, to make sure it was a valid memory request.
2. If the reference was invalid, the process is terminated. Otherwise, the page must be paged in.
Operating system | 339
3. A free frame is located, possibly from a free-frame list.
4. A disk operation is scheduled to bring in the necessary page from disk. ( This will usually
block the process on an I/O wait, allowing some other process to use the CPU in the meantime.
)
5. When the I/O operation is complete, the process’s page table is updated with the new frame
number, and the invalid bit is changed to indicate that this is now a valid page reference.
6. The instruction that caused the page fault must now be restarted from the beginning, ( as soon
as this process gets another turn on the CPU. )
In an extreme case, NO pages are swapped in for a process until they are requested by page
faults. This is known as pure demand paging.
In theory each instruction could generate multiple page faults. In practice this is very rare, due
to locality of reference, covered in section 9.6.1.
The hardware necessary to support virtual memory is the same as for paging and swapping: A
page table and secondary memory. ( Swap space, whose allocation is discussed in chapter
12. )
A crucial part of the process is that the instruction must be restarted from scratch once the
desired page has been made available in memory. For most simple instructions this is not a
major difficulty. However there are some architectures that allow a single instruction to
modify a fairly large block of data, ( which may span a page boundary ), and if some of the data
gets modified before the page fault occurs, this could cause problems. One solution is to access
both ends of the block before executing the instruction, guaranteeing that the necessary pages
get paged in before the instruction begins.
(6) What is paging? Draw the block diagram of paging table hardware scheme for memory
management. (2017)
Answer: Paging
A computer can address more memory than the amount physically installed on the system. This
extra memory is actually called virtual memory and it is a section of a hard that's set up to
emulate the computer's RAM. Paging technique plays an important role in implementing virtual
memory.
Paging is a memory management technique in which process address space is broken into blocks
of the same size called pages (size is power of 2, between 512 bytes and 8192 bytes). The size of
the process is measured in the number of pages.
Similarly, main memory is divided into small fixed-sized blocks of (physical) memory
called frames and the size of a frame is kept the same as that of a page to have optimum
utilization of the main memory and to avoid external fragmentation.
340 | Operating system
Address Translation
Page address is called logical address and represented by page number and the offset.
Logical Address = Page number + page offset
Frame address is called physical address and represented by a frame number and the offset.
Physical Address = Frame number + page offset
A data structure called page map table is used to keep track of the relation between a page of a
process to a frame in physical memory.
Operating system | 341
When the system allocates a frame to any page, it translates this logical address into a physical
address and creates entry into the page table to be used throughout execution of the program.
When a process is to be executed, its corresponding pages are loaded into any available memory
frames. Suppose you have a program of 8Kb but your memory can accommodate only 5Kb at a
given point in time, then the paging concept will come into picture. When a computer runs out of
RAM, the operating system (OS) will move idle or unwanted pages of memory to secondary
memory to free up RAM for other processes and brings them back when needed by the program.
This process continues during the whole execution of the program where the OS keeps removing
idle pages from the main memory and write them onto the secondary memory and bring them
back when required by the program.
Advantages and Disadvantages of Paging
Here is a list of advantages and disadvantages of paging −
Paging reduces external fragmentation, but still suffer from internal fragmentation.
Paging is simple to implement and assumed as an efficient memory management technique.
Due to equal size of the pages and frames, swapping becomes very easy.
Page table requires extra memory space, so may not be good for a system having small RAM.
342 | Operating system
(7) What is thrashing? Discuss about the FIFO page replacement algorithm, with its
advantages and disadvantages. (2010)
Answer: Thrashing
A process that is spending more time paging than executing is said to be thrashing. In other words
it means, that the process doesn't have enough frames to hold all the pages for its execution, so it
is swapping pages in and out very frequently to keep executing. Sometimes, the pages which will
be required in the near future have to be swapped out.
To prevent thrashing we must provide processes with as many frames as they really need "right
now".
(8) Discuss the hardware support for memory protection with base and limit registers.
Give suitable diagram. (2014)
Answer: Basic Hardware
It should be noted that from the memory chips point of view, all memory accesses are
equivalent. The memory hardware doesn't know what a particular part of memory is being
used for, nor does it care. This is almost true of the OS as well, although not entirely.
The CPU can only access its registers and main memory. It cannot, for example, make direct
access to the hard drive, so any data stored there must first be transferred into the main
memory chips before the CPU can work with it. ( Device drivers communicate with their
hardware via interrupts and "memory" accesses, sending short instructions for example to
transfer data from the hard drive to a specified location in main memory. The disk controller
monitors the bus for such instructions, transfers the data, and then notifies the CPU that the
data is there with another interrupt, but the CPU never gets direct access to the disk. )
Memory accesses to registers are very fast, generally one clock tick, and a CPU may be able to
execute more than one machine instruction per clock tick.
Memory accesses to main memory are comparatively slow, and may take a number of clock
ticks to complete. This would require intolerable waiting by the CPU if it were not for an
intermediary fast memory cache built into most modern CPUs. The basic idea of the cache is
Operating system | 343
to transfer chunks of memory at a time from the main memory to the cache, and then to access
individual memory locations one at a time from the cache.
User processes must be restricted so that they only access memory locations that "belong" to
that particular process. This is usually implemented using a base register and a limit register
for each process, as shown in Figures 8.1 and 8.2 below. Every memory access made by a user
process is checked against these two registers, and if a memory access is attempted outside
the valid range, then a fatal error is generated. The OS obviously has access to all existing
memory locations, as this is necessary to swap users' code and data in and out of memory. It
should also be obvious that changing the contents of the base and limit registers is a privileged
activity, allowed only to the OS kernel.
Advantages:
Both the Sequential and Direct Accesses are supported by this. For direct access, the address of
the kth block of the file which starts at block b can easily be obtained as (b+k).
This is extremely fast since the number of seeks are minimal because of contiguous allocation of
file blocks.
Operating system | 345
Disadvantages:
This method suffers from both internal and external fragmentation. This makes it inefficient in
terms of memory utilization.
Increasing file size is difficult because it depends on the availability of contiguous memory at a
particular instance.
2. Linked List Allocation
In this scheme, each file is a linked list of disk blocks which need not be contiguous. The disk
blocks can be scattered anywhere on the disk.
The directory entry contains a pointer to the starting and the ending file block. Each block
contains a pointer to the next block occupied by the file.
The file ‘jeep’ in following image shows how the blocks are randomly distributed. The last block
(25) contains -1 indicating a null pointer and does not point to any other block.
Advantages:
This is very flexible in terms of file size. File size can be increased easily since the system
does not have to look for a contiguous chunk of memory.
This method does not suffer from external fragmentation. This makes it relatively better in
terms of memory utilization.
Disadvantages:
Because the file blocks are distributed randomly on the disk, a large number of seeks are
needed to access every block individually. This makes linked allocation slower.
It does not support random or direct access. We can not directly access the blocks of a file.
A block k of a file can be accessed by traversing k blocks sequentially (sequential access )
from the starting block of the file via block pointers.
Pointers required in the linked allocation incur some extra overhead.
346 | Operating system
3. Indexed Allocation
In this scheme, a special block known as the Index block contains the pointers to all the blocks
occupied by a file. Each file has its own index block. The ith entry in the index block contains the
disk address of the ith file block. The directory entry contains the address of the index block as
shown in the image:
Advantages:
This supports direct access to the blocks occupied by the file and therefore provides fast
access to the file blocks.
It overcomes the problem of external fragmentation.
Disadvantages:
The pointer overhead for indexed allocation is greater than linked allocation.
For very small files, say files that expand only 2-3 blocks, the indexed allocation would keep
one entire block (index block) for the pointers which is inefficient in terms of memory
utilization. However, in linked allocation we lose the space of only 1 pointer per block.
For files that are very large, single index block may not be able to hold all the pointers.
Following mechanisms can be used to resolve this:
1. Linked scheme: This scheme links two or more index blocks together for holding the pointers.
Every index block would then contain a pointer or the address to the next index block.
2. Multilevel index: In this policy, a first level index block is used to point to the second level
index blocks which inturn points to the disk blocks occupied by the file. This can be extended to 3
or more levels depending on the maximum file size.
3. Combined Scheme: In this scheme, a special block called the Inode (information
Node)contains all the information about the file such as the name, size, authority, etc and the
remaining space of Inode is used to store the Disk Block addresses which contain the actual fileas
shown in the image below. The first few of these pointers in Inode point to the direct blocksi.e
the pointers contain the addresses of the disk blocks that contain data of the file. The next few
pointers point to indirect blocks. Indirect blocks may be single indirect, double indirect or triple
indirect. Single Indirect block is the disk block that does not contain the file data but the disk
Operating system | 347
address of the blocks that contain the file data. Similarly, double indirect blocks do not contain
the file data but the disk address of the blocks that contain the address of the blocks containing
the file data.
F2 2 2 2 2 2 2 6 6 6 6 6 7 7 7 7 7 7 3 3
F3 3 3 3 3 3 3 2 2 2 2 2 6 6 6 6 6 6 6
F4 4 4 4 4 4 4 1 1 1 1 1 1 2 2 2 2 2
1 2 3 4 S S 5 6 7 8 s 9 10 11 s 12 13 s 14 S
F2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
F3 3 3 3 3 5 5 5 5 5 3 3 3 3 3 3 3 3 3
F4 4 4 4 4 6 6 6 6 6 7 7 7 7 1 1 1 1
1 2 3 4 S S 5 6 S S S 7 8 9 S S 10 S S S
F2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
F3 3 3 3 3 5 5 5 5 5 3 3 3 3 3 3 3 3 3
F4 4 4 4 4 6 6 6 6 6 7 7 7 7 1 1 1 1
1 2 3 4 S S 5 6 S S S 7 8 9 S S 10 S S S
Size of logical address space = = # of pages x page size = 256 × 4096= 28 x 212= 220
So the number of required bits in the logical address =20 bit
1. The calling environment is suspended, procedure parameters are transferred across the
network to the environment where the procedure is to execute, and the procedure is executed
there.
350 | Operating system
2. When the procedure finishes and produces its results, its results are transferred back to the
calling environment, where execution resumes as if returning from a regular procedure call.
Reference string
7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
7 7 7 2 2 2 2 2 7
0 0 0 0 4 0 0 0
1 1 3 3 3 1 1
Page frames.
Number of page fault 9.
(iii) LRU Replacement
Reference string
7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
7 7 7 2 2 4 4 4 0 1 1 1
0 0 0 0 0 0 3 3 3 0 0
1 1 3 3 2 2 2 2 2 7
Page frames.
Number of page fault 12.
Operating system | 351
CHAPTER 8
FILE CONCEPT
(1) Define file. (2013,2015,2010)
Answer: A file is a named collection of related information that is recorded on secondary storage
such as magnetic disks, magnetic tapes and optical disks. In general, a file is a sequence of bits,
bytes, lines or records whose meaning is defined by the files creator and user.
CHAPTER 9
FILE SYSTEM IMPLEMENT
(1) What are the different types of file allocation methods? Briefly explain
(2017,2016,2013,2012,2008)
Answer: The File System Architecture Specifies that how the Files will be stored into the
Computer system means how the Files will be Stored into the System. Means how the data of the
user will be Stored into the Files and how we will Access the data from the File. There are many
types of Storage or Space allocation techniques which specify the Criteria by using; the Files will
Stores the data into them.
1) Continues Space Allocations: - The Continues space allocation will be used for storing all the
data into the Sequence Manner. Means all the data will store by using the Single Memory Block. In
this all the data of the File will be stored by using the Continues Memory of the Computer Systems.
This makes fastest Accessing of data and this is used in the Sequential Access.
In this when System Finds out the First Address or base Address from the Set of Address of the
Files, then this will makes easy for the System to read all the data from the Computer Systems. But
for Storing the Data into the Continues Forms, CPU loss his Time because many Times Data any
Large from the Existing Space. So that this will create Some Difficulties to find out the Free Space
on the disk.
2) Linked Allocation: - This Technique is widely used for storing the contents into the System. In
this the Space which is provided to the Files may not be in the Continuous Form and the Data of
the Files will be Stored into the Different blocks of the Disks.
This Makes Accessing Difficult for the Processor. Because Operating System will Traverse all the
Different Locations and also use Some Jumping Mechanism for Reading the contents from the File
in this the First Location will be accessed and after that System will search for the other Locations.
But Always Remember that all the Locations will be linked with Each other and all the Locations
will be automatically traversed.
3) Index Allocation: - This is also called as Some Advancement into the Linked Space Allocation.
This is same as the Linked Space Allocation by it also maintains all the Disk Address into the Form
of Indexes. As Every Book Contains an index on the Front Page of the System Like this All the Disk
Addresses are Maintained and stored into the Computer System and When a user Request To read
the Contents of the File , then the Whole Address will be used by the System by using the index
numbers.
For this System also Maintains an index Table which contains the Entry for the data and the
Address Means in which Address, which Data has Stored So that this makes the Accessing Fastest
and Easy for the Users.
(2) Write short notes on Resource Allocation Graph; (2021,2016)
Answer: As Banker’s algorithm using some kind of table like allocation, request, available all that
thing to understand what is the state of the system. Similarly, if you want to understand the state
of the system instead of using those table, actually tables are very easy to represent and
understand it, but then still you could even represent the same information in the graph. That
graph is called Resource Allocation Graph (RAG).
358 | Operating system
So, resource allocation graph is explained to us what is the state of the system in terms
of processes and resources. Like how many resources are available, how many are allocated and
what is the request of each process. Everything can be represented in terms of the diagram. One of
the advantages of having a diagram is, sometimes it is possible to see a deadlock directly by using
RAG, but then you might not be able to know that by looking at the table. But the tables are better
if the system contains lots of process and resource and Graph is better if the system contains less
number of process and resource.
We know that any graph contains vertices and edges. So RAG also contains vertices and edges. In
RAG vertices are two type –
1. Process vertex – Every process will be represented as a process vertex. Generally, the process
will be represented with a circle.
2. Resource vertex – Every resource will be represented as a resource vertex. It is also two type –
Single instance type resource – It represents as a box, inside the box, there will be one dot.So
the number of dots indicate how many instances are present of each resource type.
Multi-resource instance type resource – It also represents as a box, inside the box, there will
be many dots present.
The VFS is the glue that enables system calls such as open(), read(), and write() to work regardless
of the file system or underlying physical medium.
Operating system | 359
The figure shows the flow from user-space’s write() call through the data arriving on the physical
media. On one side of the system call is the generic VFS interface, providing the frontend to user-
space; on the other side of the system call is the file system-specific backend, dealing with the
implementation details.
the kernel needs to understand the underlying details of the file systems, except the file systems
themselves. For example, consider a simple user-space program that does:
This system call writes the len bytes pointed to by buf into the current position in the file
represented by the file descriptor fd.
1. This system call is first handled by a generic sys_write() system call that determines the
actual file writing method for the file system on which fd resides.
2. The generic write system call then invokes this method, which is part of the file system
implementation, to write the data to the media (or whatever this file system does on write).
(4) Write down the advantages and disadvantages of Contiguous Linked and Indexed
Allocation methods. (2021,2015)
Answer:
Contiguous Linked and Indexed Allocation methods
Advantages:
Both the Sequential and Direct Accesses are supported by this. For direct access, the address of
the kth block of the file which starts at block b can easily be obtained as (b+k).
This is extremely fast since the number of seeks are minimal because of contiguous allocation of
file blocks.
Disadvantages:
This method suffers from both internal and external fragmentation. This makes it inefficient in
terms of memory utilization.
Increasing file size is difficult because it depends on the availability of contiguous memory at a
particular instance.
(5) Why must the bit map for file allocation be kept on mass storage rather than in main
memory? (2008)
Answer: In case of system crash (memory failure) the free-space list would not be lost as it would be
if the bit map had been stored in main memory.
(6) What problems could occur if a file system allowed a file system to be mounted
simultaneously at more than one location? (2008)
Answer: There would be multiple paths to the same file, which could confuse users or
encourage mistakes (deleting a file with one path deletes the file in all the other paths).
360 | Operating system
(7) What are the purposes of disk scheduling? (2013,2008)
Answer: Disk scheduling is is done by operating systems to schedule I/O requests arriving for
disk. Disk scheduling is also known as I/O scheduling.
Disk scheduling is important because:
Multiple I/O requests may arrive by different processes and only one I/O request can be
served at a time by disk controller. Thus other I/O requests need to wait in waiting queue and
need to be scheduled.
Two or more request may be far from each other so can result in greater disk arm movement.
Hard drives are one of the slowest parts of computer system and thus need to be accessed in
an efficient manner.
There are many Disk Scheduling Algorithms but before discussing them let’s have a quick look
at some of the important terms:
Seek Time:Seek time is the time taken to locate the disk arm to a specified track where the
data is to be read or write. So the disk scheduling algorithm that gives minimum average seek
time is better.
Rotational Latency: Rotational Latency is the time taken by the desired sector of disk to
rotate into a position so that it can access the read/write heads. So the disk scheduling
algorithm that gives minimum rotational latency is better.
Transfer Time: Transfer time is the time to transfer the data. It depends on the rotating speed
of the disk and number of bytes to be transferred.
Disk Access Time: Disk Access Time is:
Disk Access Time = Seek Time +
Rotational Latency +
Transfer Time
Disk Response Time: Response Time is the average of time spent by a request waiting to
perform its I/O operation. Average Response time is the response time of the all
requests. Variance Response Time is measure of how individual request are serviced with respect
to average response time. So the disk scheduling algorithm that gives minimum variance response
time is better.
10. Different between sequential and direct file access method. [2017]
Solution:
Sequential Access –It is the simplest access method. Information in the file is processed in order,
one record after the other. This mode of access is by far the most common; for example, editor and
compiler usually access the file in this fashion.
Read and write make up the bulk of the operation on a file. A read operation -read next- read the
next position of the file and automatically advance a file pointer, which keeps track I/O location.
Similarly, for the write writer next append to the end of the file and advance to the newly written
material.
Key points:
Data is accessed one record right after another record in an order.
When we use read command, it move ahead pointer by one
When we use write command, it will allocate memory and move the pointer to the end of the
file
Such a method is reasonable for tape.
Direct Access – Another method is direct access method also known as relative access method. A
filed-length logical record that allows the program to read and write record rapidly. The direct
access is based on the disk model of a file since disk allows random access to any file block. For
direct access, the file is viewed as a numbered sequence of block or record. Thus, we may read
block 14 then block 59 and then we can write block 17. There is no restriction on the order of
reading and writing for a direct access file.
A block number provided by the user to the operating system is normally a relative block number,
the first relative block of the file is 0 and then 1 and so on.
362 | Operating system
11. What is process control block? [2009]
Solution:
Process Control Block: All of the information needed to keep track of a process when
switching is kept in a data package called a process control block. The process control
block typically contains:
An ID number that identifies the process
Pointers to the locations in the program and its data where processing last occurred
Register contents
States of various flags and switches
Pointers to the upper and lower bounds of the memory required for the process
A list of files opened by the process
The priority of the process
Each process has a status associated with it. Many processes consume no CPU time until they get
some sort of input. For example, a process might be waiting for a keystroke from the user. While it
is waiting for the keystroke, it uses no CPU time. While it's waiting, it is "suspended". When the
keystroke arrives, the OS changes its status. When the status of the process changes, from pending
to active, for example, or from suspended to running, the information in the process control block
must be used like the data in any other program to direct execution of the task-switching portion
of the operating system.
CHAPTER 10
DISK I/O MANAGEMENT
1. Define Caching.
A cache is a region of fast memory that holds copies of data. Access to the cached copy is
more efficient than access to the original. Caching and buffering are distinct functions, but
sometimes a region of memory can be used for both purposes.
2. Define Spooling.
A spool is a buffer that holds output for a device, such as printer, that cannot accept
interleaved data streams. When an application finishes printing, the spooling system queues the
corresponding spool file for output to the printer. The spooling system copies the queued spool
files to the printer one at a time.
SCAN
In this algorithm, the disk arm moves in a particular direction till the end and serves all the
requests in its path, then it returns to the opposite direction and moves till the last request is
found in that direction and serves all of them.
Eg. Suppose the order of requests are 70, 140, 50, 125, 30, 25, 160 and the initial position of the
Read-Write head is 60. And it is given that the disk arm should move towards the larger value.
Operating system | 367
ECONOMICS
Introduction: Definition, Microeconomics vs. macroeconomics, scope of economics, meaning of
economic theory, some basic concepts- product, commodity, want, utility, consumption, factors of
production.
Demand: Law of demand, factors determining demand, shifts in demand, demand functions,
deriving demand curves, substitution and income effects, deriving aggregate demands, various
concepts of demand elasticity and measurements, discussion on the method of estimating demand
functions and demand functions and demand forecasting.
Supply: Law of supply and supply function, determination of supply, shifts in supply, elasticity of
supply, market equilibrium.
Economic Theory of Consumer Behavior: reasons for consumption, Principle of diminishing
marginal utility, indifference Curves, Budget Constraint, Utility Maximization and Consumer
Equilibrium.
Consumer Demand: Change in Budget Constraints, Price Consumption Curve, Income
Consumption Curve, Consumer Demand, market Demand, Engel Curve.
Production: Production functions, total, average and marginal products, law of diminishing
marginal physical products, production isoquants, marginal rate of technical substitution (MRTS),
optimal combination of inputs, expansion path, returns to scale, estimation of production function
and estimation of cost function.
Cost: concepts of cost, short-run costs, relation between short-run costs and production, long run
costs, economies and diseconomies of scale, relation between short run and long run costs, cost
function and estimation of cost function.
Markets and Revenue: Meaning of market, different forms of market, concepts of total, average
and marginal revenue, relation between average revenue and marginal revenue curves, relation
between different revenues and elasticity’s of demand, equilibrium of the firm.
Price and Output: Price and output determination under perfect competition, monopoly,
monopolistic competition and oligopoly, profit maximization, price discrimination, plant shut
down decision, barriers to entry.
370 | Economics
CHAPTER 1 PAGE: 378
INTRODUCTION
1. What is Economics? [2020][2017] [2013] [2014] [2012]
How do you differentiate between Micro Economics and Macro Economics? [2020]
Describe the major branches of economics.
2. The scope of economics is very large- Is it true? Describe. [2020][2013]
3. Is Economics a science or an-arts? Explain. [2013][2012]
4. The central problem of economics is the allocation of scarce resources for the satisfaction of
unlimited wants’’-Discuss [2017/2013]
Or what do you mean by resource allocation and economic efficiency?
5. Show the differences between positive and normative economics.
Or what is the difference between Positive Economics and Normative Economics?
[2021][2014] [2013]
Or Is economics, positive or normative? [2014]
6. What is the Production Possibility Frontier (PPF) or Production Possibility Curve (PPC)?
[2014][2012][2010]
7. What are the fundamental economic problems? How these problems can be solved?
[2021][2016][2012][2010][2008][2014]
Or Explain the fundamental problems of economic organization? How these problems can be
solved
8. What are the factors of production? Describe. [2020]
9. What is production?
10. Define macroeconomics. What are the major objectives of macroeconomics?
CHAPTER 1
INTRODUCTION
1. What is Economics? [2013] [2017] [2014] [2012]
How do you differentiate between Micro Economics and Macro Economics?
Describe the major branches of economics.
Economics (অর্থনীতি)
Economics comes from the Greek word “Okonomia”. It means household management
Adam Smith is the father of economics. He says economics is the wealth of nations.
----An economist L.Robins says “Economics is a science which studies human behavior as a
relationship between ends and scare means which have a alternative uses.
One of the key word of economics is co-ordination. It refers how the three central problems facing
any economics are solved. The roblems are……
What and how to produce (তি এবং তিভাবব উত্পাদন)
How to produce (তিভাবব উত্পাদন)
Whom to produce. (িার জনয উত্পাদন)
There are two types of economics, they are microeconomics and macroeconomics.
Microeconomics:
Microeconomics is the study of the decisions of individual people and business and the
introduction of those inter action.
Macroeconomics:
Macroeconomics is the study of the national economy and the global economy.
There are several differences between microeconomics and macroeconomics, those are:
Subjects Microeconomics Macroeconomics
1. Nature Microeconomics focuses on the Macroeconomics is a vast field, which
market’s su ly and demand concentrates on two major areas,
factors and determines the increasing economic growth and
economic price levels. changes in the national income.
2. Focus It facilitates decision making for It focuses on unemployment rates,
smaller business sectors. GDP and price indices, of larger
industries and entire economics.
3.Strategies It has no strategies to maintain. It maintains two strategies: Fiscal
policy…Monetary policy.
4. Demand It deals with individual and market It discusses about the aggregate
and supply demand and supply and the Demand and Supply.
equilibrium price etc.
5. Founder Founder of microeconomics is Founder of Macroeconomics is John
Adam Smith. Maynard Keynes.
6. Meaning Micro means small. Macro means large.
7. Area Through it we get the picture of Through it we get the overall picture
smaller economic condition of the of the nation economy.
Economics | 379
country.
8.Examples If Zeeba is a consumer, she will If Zeeba is the minister of trade and
compare prices and choose the commerce, then she will compare the
cheapest product giving her the prices and choose the cheapest
maximum utility (satisfaction). It is
product with maximum quality to
microeconomics. control the economic situation of the
country. It is macroeconomics.
Indeed, both economics are important subject because of the fact of scarcity and the desire for the
efficiency.
4. The central problem of economics is the allocation of scarce resources for the
satisfaction of unlimited wants’’-Discuss. [2017/2013]
Scarcity is the state of insufficiency where people are incompetent to achieve their needs
sufficiently. We can say scarcity arises when there are fewer resources in comparison to unlimited
human wants and needs. Some of these unlimited wants may be satisfied but soon new wants get
to your feet. This is not possible to produce goods and services which can satisfy all wants of
people. Thus scarcity is the term which elaborates on the connection between limited resources
and unlimited wants and the problems arising as a result.
Economic problems arise due to the scare goods which can be used to fulfill many needs of the
users.
For example: a piece of land has many uses like it can be used to construct a building or to make
a beautiful park or to raise agricultural crops. So, it is vital to realize the importance of how
limited resources can be used otherwise to fulfill some wants of people to get maximum
satisfaction as possible.
Economics | 381
So the two basic elements of economics are diversity of human wants and scarcity of resources.
The scarcity of resources creates the problems of allocation of resources and elimination of waste.
Resources are to be allocated in a way they are best used to attain maximum satisfaction. This can
happen only when we arrange a list of our wants on the basis of scale of preferences. In the scale
of preference necessaries are fulfilled first, then comforts and luxuries are at the end.
The second problem is the elimination of waste. In the countries where resources are not fully
utilized by the government and they are lying indolent, will mean the maximum satisfaction is not
being imitated from the limited available resources which are being wasted for nothing. The
resources are not only scared but can be used alternatively after deciding between the uses. We
all have to decide to make choices between alternative uses of the resources we have. Even the
government in the richest countries distribute their resources in such a way that they can be able
to cradle maximum satisfaction with minimum resources.
With production possibility B, the economy can produce 14 thousand quintals of wheat and meter
of cloth. With C, the economy can have 12 thousand and 2 thousand and so on. As we move from A
towards F, We draw away some resources from the production of wheat and devote them to the
production of cloth. In other words, we give up some units of wheat in order to have some more
units of cloth. As we move on from alternative A to B, we sacrifice one thousand motor of cloth.
Again our movement from alternative B to C, involves the sacrifice of two thousand quintal of
wheat for the sake of one thousand more motors of cloths.
Schedule of possible production:-
Production Possibility Cloth(in thousand meters) Wheat (in thousand meters)
A 0 15
B 1 14
C 2 12
D 3 9
E 4 5
F 5 0
The table shows our sacrifice of wheat goes on increasing as we move from C, towards E. In a fully
employed economy more of one good can be obtained only by cutting down the production of
another good.
7. What are the fundamental economic problems? How these problems can be solved?
[2016][2012][2010][2008] [2014]
Or Explain the fundamental problems of economic organization? How these problems
can be solved.
The fundamental economic problem is related to the issue of scarcity, there are three types of
economic problem, and those are:
a) What to produce?
Everything in life is scarce. So, the basic economic problem is what we can produce using
limited resources with proper utilization.
b) How to produce?
Most goods can be produced in more than one ways using resources in different
combinations. Which resources and technical process will be employed to produce these goods
384 | Economics
and services? So the problem after determining what to produce is by what methods are these
commodities produce?
c) For whom to produce?
How is the society to allocate the goods and services produced when the supply is never
able to satisfy total demand? Who is to receive what share of the economic goods and services? So
the questions are for whom shall the goods and services be produced?
At last, we can say that, all fundamental problems are created because of limited resources and
infinite demands. If we can make proper combination of those, fundamental problems can be
solved.
Solution of fundamental problems: Limited resources and infinite demands create the main
economic problem. To solve the economic problem, human being takes four solution, those are:
a) Production:
Men create additional utility using natural resources by technical knowledge and
intelligence is called production. In human life want is limited but to fulfill want, resources are
scarce. By using scare resources essential product have to produce.
b) Distribution:
How or by which policy produced goods will be distributed among different people in
society? Some factors of production, such land, labor, capital and organization and how the
distributed parts of the factor of production like rent, wage, interest and profit will be give are
another problem.
c) Exchange:
Exchange means inter change of goods and services with in human society by money. How
goods and services will be distributed among different peoples? It also includes how the excessive
part of goods and services will distributed, whether in the country or import in other country?
d) Consumption:
The main purpose of human workforce is consumption. Creating utility means production,
consumption means the completion of utility by using. With limited resources how we can get
highest satisfaction, human have been trying always to do that.
The four solution of economic problem are interrelated and dependent to each other. Without
other single one has no importance.
Land
Capital
Economics | 385
Entrepreneurship is called fourth factor of production. So, there are four factors of production i.e,
land, labor, capital and entrepreneurship.
Land: - Land stands for natural resources or gifts of nature such as oil, iron ore, forests
and water. There is sometimes confusion here. When natural resources such as wheat are turned
into flour, the flour is a good not natural resource. It is used to bake bread, then it is intermediate
good and bread is final good.
Labor:- Labor refers to human resources. It reflects the abilities of people and includes
people health, strength, education, motivation and skills. The labor force is the number of people
in an economy willing and able to work.
Capital: - It refers to man made things used in production- money, building, tools,
machinery , road etc.
Entrepreneurship:- It is special kind of labor that represents the characteristics of
people who assume the risk of organizing productive resources to produce goods and provide
services. It refers to the management , organization and planning of the other three factor. It is the
ability to oversee entire production process and ability to take risks.
9. What is production?
The processes and methods used to transform tangible inputs (raw materials, semi-finished
goods, subassemblies) and intangible inputs (ideas, information, knowledge) into goods or
services. Resources are used in this process to create an output that is suitable for use or has
exchange value.
CHAPTER 2
DEMAND
1. What is demand? [2017][2008]
Generally, demand means desire or want of something. But in economics demand has three
characteristics. Those are:
a) Desire for commodities,
b) Enough money and
c) Willingness to purchase.
The combinations of those characteristics are called demand.
According to R. F. Benham-
“Demand for anything at a given rice, is the amount of it which will be bought per unit of time at
that rice.”
In the words of pagan Thomas-
“ uantity demanded is the amount of a good that consumers wish to buy at a articular rice.”
From the above definition we can say that demand is a term used in economics to describe the
desire of a consumer, or a group of consumers, to purchase a particular good or service at a
certain price.
It is important to note that as the price decreases, the quantity demanded increases. The
relationship follows the law of demand. Intuitively, if the price for a good or service is lower, there
is a higher demand for it.
From the demand schedule above, the graph can be created:
Through the demand curve, the relationship between price and quantity demanded is clearly
illustrated. As the price for notebooks decreases, the demand for notebooks increases.
6. What is the demand curve? Discuss the factors that affect the demand curve.
In economics the demand curve is the graph depicting the relationship between the price of a
certain commodity and the amount of it that consumers are willing and able to purchase at that
given price. It is a graphic representation of a demand schedule. The demand curve for all
consumers’ together follows from the demand curve is very individual consumer: the individual
demand at each price are added together.
Demand curve are used to eliminate behaviors in competitive markets and are often combined
with supply curves to estimate the equilibrium price and the equilibrium quantity of the market.
In a monopolistic market, the demand curve facing a monopolist is simply the market demand
curve.
9. What is the difference between shift in Demand Vs Movement along Demand curve?
2011
Movement alone demand curve
Movement alone demand curve refers changing quantity demand due to change in price but other
factors ore constant.
Shift in demand
Shift in demand means change in demand due to change in various factors but price are constant
The differences between change in quantity demand and change in demand is:
Subject Movement alone demand curve Shift in demand
Change in quantity means movement Change in demand curve
Means
alone demand curve. means shift in demand.
Change in quantity demand refers Change in demand refers
movement alone demand curve due to shift in demand due to
Change
changing price but other factors are change in factors but price
constant. ore constant.
Graphical
presentation a
b DD1 DD DD2
Types It has two parts- a) extension of demand b) It has two parts- a) increase
contraction of demand in demand b) decrease in
demand
Analysis In the above graph movement of demand In the above graph the shift
from b to a is called contraction and b to c is in demand from bb to bbl is
called extension of demand. called increase in demand
392 | Economics
and from bb to bb2 is called
decrease in demand.
Price In movement alone demand curve the price But in shift in demand the
changes. price remain same.
Other things Other things like income, taste and habit are Like In income, But in it the
remain unchanged. other things are remain
changing.
Finally, we can say both movement alone demand and shift in demand helps a business to
calculate the possible ways of production.
10. What is elasticity? What are the methods of demand elasticity? 2014, 2010
Elasticity
Elasticity is a measure of a variable's sensitivity to a change in another variable.
In business and economics, elasticity refers the degree to which individuals, consumers or
producers change their demand or the amount supplied in response to price or income changes. It
is predominantly used to assess the change in consumer demand as a result of a change in a good
or service's price.
Where q refers to quantity demanded, to rice and ∆ to change. If Ep> 1, demand is elastic. If Ep <
1, demand is inelastic, it Ep = 1 demand is unitary elastic.
12. What do you mean by elasticity of demand, explain the terms E= 1, E>1 and E<1.
(2016)
Price elasticity of demand is a measure of the relationship between a change in the quantity
demanded of a particular good and a change in its price. Price elasticity of demand is a term in
economics often used when discussing price sensitivity. The formula for calculating price
elasticity of demand is:
Price Elasticity of Demand = % Change in Quantity Demanded / % Change in Price
E>1:
I this case, the quantity demanded is relatively elastic, meaning that a price change will cause an
even larger change in quantity demanded. the case of Ed= referred to as perfectly clastic. In this
theoretical case, the demand curve would be horizontal. for products having a high price elasticity
of demand, a price increase will result in a revenue decrease since the revenue lost from the
resulting decrease in quantity sold is more than the revenue gained from the price increase.
E<1:
In this case, the quantity demanded is relatively inelastic, meaning that a price change will cause
less of a change in quantity demanded. the case of Ed=0 is referred to as perfectly inelastic. in this
theoretical case, the demand curve would be vertical. for products whose quantity demanded is
inelastic , a price increase will result in a revenue gained from the higher price.
E=1:
In this case, the product is said to have unitary, small changes in price do tot affect the total
revenue.
13. Point out elasticity along the demand curve. 2014, 2012, 2009
The first law of demand states that as price increases, less quantity is demanded. This is why the
demand curve slopes down to the right. Because price and quantity move in opposite directions
on the demand curve, the price elasticity of demand is always negative.
The image below shows the price elasticity of demand at different points along a simple linear
demand curve, QD = 8 - P.
Economics | 395
Let's use the equation above, QD = 8 - P, to calculate the price elasticity of demand.
Imagine that the price is at 3, then moves up to 5. What is the elasticity?
At a price of 3, the quantity is 5 (Q = 8 - 3) and at a price of 5, the quantity is 3.
Ep = ((Q2 - Q1) / (Q1)) / ((P2 - P1) / (P1))
Ep = ((3 - 5) / (5)) / ((5 - 3) / 3)
Ep = -0.6
14. What are the differences between elastic and inelastic demand? [2016]
Elastic demand refers to the adverse change in the quantity of a product on account of the minute
changes in the price of that particular product and it denotes how demand and supply respond to
each other due to price, income levels, etc whereas inelastic demand signifies the demand for a
particular product or service that remains constant and remains unaffected with the changes in
price.
BASIS FOR ELASTIC DEMAND INELASTIC DEMAND
COMPARISON
Meaning When a little change in the price of a Inelastic demand refers to a
product results in a substantial change change in the price of a good result
in the quantity demanded, it is known in no or slight change in the
as elastic demand. quantity demanded.
Elasticity More than equal to 1 Less than 1
Quotient
Curve Shallow Steep
Price and Total Move in the opposite direction Move in the same direction
revenue
Goods Comfort and luxury Necessity
396 | Economics
15. Explain the concept of elasticity of demand. Why does it matter for a businessman to
measure perfect elasticity and perfect inelasticity of demand of a product? [2013]
Generally elasticity means the rate of change. In economics, elasticity is the measurement of how
changing one economic variable affects others. There are several factors related to elasticity. For
example, elasticity of demand, supply, income, expenditure, cross etc.
Elasticity of demand:
Elasticity of demand is a major of how changing quantity demand due to change in its price. That
is-
Ed =
Ed = = = = = ×
10 a b DD
100 200
When price is Tk. 10 demand is 100 unit and the point is a. But when price remains Tk. 10
demand increases to 200 unit and point is b. Adding those points we get DD which is horizontal.
Ed=0, Zero Elasticity/ Perfectly Inelastic Demand:
If price of the product may changes but change of the demand may be unchanged that is called
zero elasticity.
Imagine a demand schedule:
P Qd
10 100
20 100
From the schedule we get,
∆ d = 100-100 =0
∆P = 20-10 =10
Qd =0
P =10
Putting the value in price elasticity equation,
Ed ∆ d/ ∆P × P/ d
= 0/10 × 10/100
= 0/10
=0
From the schedule we can draw a demand curve:
DD
20 b
10 a
100
398 | Economics
When price is Tk. 10 demand is 100 unit and the point is a. But when price increases to Tk. 10
demand remains100 unit/same and point is b, adding those points we get DD which is vertical.
16. What do you mean by the price elasticity of demand, the income elasticity of demand
and the cross elasticity of demand in measure in general?
Price elasticity of demand:
Price elasticity of demand is a measure used in economics to show the elasticity of the quantity
demanded for a good or service to a change in its price. It gives the percentage change in quantity
demanded in response to a one percent change in price.
Income elasticity of demand:
In measures the responsiveness of the demand for a good to a change in the income of the people
demanding the good. It is calculated as the ratio of the percentage change in demand to the
percentage change in income. For example—if in response to a 10% increase in income , the
demand for a good increased by 20%, the income elasticity of demand would be 20% / 10% = 2.
Cross price elasticity of demand:
It measures the responsiveness of the demand for a good to a change in the price of another good.
It measures the percentage change in demand for the first good that occurs in response to a
percentage in price of the second good.
= ×
Here, Δ Change in quantity demand
ΔP Change in rice
P = Initial price
Q = Initial quantity
Imagine a demand schedule:
Price Quantity demand
10 100
8 120
When the price of a particular commodity is Tk. 10, the demand is 100 units. But when price
decreases to 8, the demand increases Tk. 120.
From the above schedule, we get:
Δ ( 1 - Q) = 120 - 100 = 20
ΔP (P1 - P) = 8 - 10 = -2
P = 10
Q = 100
Putting the value in the equation of price elasticity of demand, we get:
Ed = 20/-2 X 10/100
= |-1| [using absolute value]
=1
400 | Economics
2. Income Elasticity of Demand:
Income elasticity of demand measures the percentage change in quantity demand caused by
percentage change in income.
According to R. G. Lipsey-
"The responsiveness of demand for a commodity to change in income is termed income elasticity
of demand."
Ed =
= ×
Here, Δ Change in quantity demand
ΔY Change in income
Y = Initial income
Q = Initial price
For normal goods income elasticity is positive, but for inferior goods income elasticity is negative.
Example:
(i) Normal goods: We know, if the income of people increases the demand of normal goods
increases. If income decreases the demand also decreases. Imagine a demand schedule:
Income (Y) Quantity Demand (Qd)
100 10
110 20
Here, the income of man increases 100 to 110, the demand of the man also increases 10 to 20
units. Now,
Δ d = (Q1-Q) = 20-10 =10
ΔY = (Y1-Y) = 110-100 =10
Qd = 10
Y = 100
Putting the value in income elasticity equation, we get:
Ey = 10/ 10 × 100/ 10
=10 (Positive)
Here, the income of man increases 100 to 110, the demand of the man decreases 10 to 5 unit.
Now, from the above schedule, we get:
Δ d = (Q1-Q) = 5-10 = -5
ΔY = (Y1-Y) = 110-100 =10
Qd =5
Y = 110
Economics | 401
Putting the value in income elasticity equation, we get:
Ey = -5/ 10 X 110/ 5
= -11(Negative)
At last we can say, if the elasticity is positive the good in normal and if the elasticity is negative
then the good in inferior.
Cross elasticity of demand:
The cross elasticity of demand measures the percentage change in demand for a particular good
caused by a change in another good.
In the words of A. Koutsoyiannis-
“The cross elasticity of demand is defined as the proportionate change in the quantity demanded
of X resulting from a proportionate change in the price of Y."
Ec =
= ×
Implication of Cross Elasticity of Demand:
For substitute goods, cross elasticity is positive, for complementary goods cross elasticity is
negative. Both are discussed below:
(i) Substitute goods:
For substitute goods, if the price of one good increases, the demand of another good also
increases. Imagine a demand schedule of Tea and Coffee:
Px(Tea) Qy(Coffee)
40 20
60 40
From the above schedule, we get:
ΔPx = (Px1-Px) = 60-40 =20
Δ y = (Qy1-Qy) = 40-20 =20
Qy = 20
Px = 40
20. Prove that the elasticity of demand will not be the same everywhere on a linear
demand curve.
There are five types of elasticity of demand, those are:
a) Ed>1, Elastic demand:
If percentage changes in quantity demand changes greater than percentage change in price, then
it is called elastic demand. For example - luxgaries goods.
Imagine a demand schedule:
P Qd
10 100
8 300
From the schedule we get,
Δ d = 300-100 =200
ΔP 8−1 −
Qd =100
P =10
Putting the value in price elasticity equation,
Ed Δ d/ ΔP × P/ d
= 200/-2 X 10/100
= |-10|
= 10
From the schedule we can draw a demand curve:
Price
a
10
8 b
a
10
8 b
Quantity
100 110
When price is Tk. 10 demand is 100 unit and the point is a. But when price decreases to Tk. 8
demand increases to 110 unit and point is b. Adding those points we get DD which is stepper.
Price
a
10
8
b
Quantity
100 120
When price is Tk. 10 demand is 100 unit and the point is a. But when price decreases to Tk. 8
demand increases to 120 unit and point is b. Adding those points we get DD which is straight line.
d) Ed= α, Infinite elasticity/ perfectly elastic demand:
If a little change or on change in price causes large change in quantity demand of a product that is
called infinite elasticity. Example - Gold market.
Imagine a demand schedule:
P Qd
10 100
10 200
From the schedule we get,
∆ d = 200-100 =100
∆P = 10-10 =0
Qd =100
P =10
Economics | 405
Putting the value in price elasticity equation,
Ed ∆ d/ ∆P × P/ d
= 100/0 × 10/100
= 10/0
=0
From the schedule we can draw a demand curve:
a b
DD
10
100 200
When price is Tk. 10 demand is 100 unit and the point is a. But when price remains Tk. 10
demand increases to 200 unit and point is b. Adding those points we get DD which is horizontal.
e) Ed=0, Zero Elasticity/ Perfectly Inelastic Demand:
If price of the product may changes but change of the demand may be unchanged that is called
zero elasticity.
Imagine a demand schedule:
P Qd
10 100
20 100
From the schedule we get,
∆ d = 100-100 =0
∆P = 20-10 =10
Qd =0
P =10
Putting the value in price elasticity equation,
Ed ∆ d/ ∆P × P/ d
= 0/10 × 10/100
= 0/10
=0
406 | Economics
From the schedule we can draw a demand curve:
DD
20 a
10 b
100
When price is Tk. 10 demand is 100 unit and the point is a. But when price increases to Tk. 10
demand remains100 unit/same and point is b, adding those points we get DD which is vertical.
21. What is the cross elasticity of demand? What will be the sign of the cross elasticity
of demand for chicken with respect to the price of beef?
Cross elasticity of demand: The cross elasticity of demand measures the percentage change in
demand for a particular good caused by a change in another good.
In the words of A. Koutsoyiannis –
“The cross elasticity of demand is defined as the ro ortionate change in the quantity demanded
of X resulting from a proportionate change in the rice of Y.”
Ec =
=
Implication of Cross Elasticity of demand:
For substitute goods, cross elasticity is positive, for complementary goods cross elasticity is
negative. Chicken and Beef are substitute goods, the relationship between chicken and beef is
discussed below:
For substitute goods, if the price of one good increases, the demand of another good also
increases. Imagine a demand schedule of Chicken and Beef:
Px (Chicken) Qy (Beef)
40 20
60 40
Economics | 407
Now we can draw a demand curve from the schedule:
Quantity of Beef
60
a
40
b
Price of Chicken
20 40
Here, we can see that when the price of Chicken is Tk. 40, the demand of Beef is 20 units. When
the price of Chicken increases to Tk. 60, the demand of Beef also increases 40 units. From the
above schedule, we get:
= 60 – 40 = 20
∆ = 40 – 20 = 20
= 20
= 40
Putting the value in income elasticity equation, we get:
Ec = = × = 2 (Positive)
a
DD1 DD DD2
4.Types It has two parts- a) extension of demand b) It has two parts- a) increase in
contraction of demand demand b) decrease in
demand
5.Analysis In the above graph movement of demand In the above graph the shift in
from b to a is called contraction and b to c is demand from bb to bbl is
called extension of demand. called increase in demand and
from bb to bb2 is called
decrease in demand.
6.Price In movement alone demand curve the price But in shift in demand the
changes. price remain same.
7.Other things Other things like income, taste and habit are Like In income, But in it the
remain unchanged. other things are remain
changing.
Finally, we can say both movement alone demand and shift in demand helps a business to
calculate the possible ways of production.
23. What is the difference between Demand schedule and demand curve? [2015]
A demand curve and a demand schedule are fundamental tools used by economists to describe
the relationship between the price of an item in the marketplace and the consumer demand for
that item. Distinguishing a demand curve from a demand schedule is generally a straightforward
matter.
A demand curve presents data as a graph, and a demand schedule lists data in table format.
A demand schedule includes pairs of data points that identify the price for an item and the
quantity of sales expected at that price. Price is often labeled "P" and quantity is labeled "Q,"
although other headings may be used as well.
A demand curve usually presents a smooth curve or straight line relationship between the
price, shown on the Y axis (the vertical axis) and quantity on the X axis (horizontal).
Economics | 409
24. What do you mean by contraction and Extension of Demand? [2015]
The demand for a commodity changes due to a change in price. It is called extension and
contraction of demand. When there is decrease in price of commodity there is in increase in
demand of that commodity. This is called extension of demand. When there is increase in price of
a commodity there is decrease in the demand for that commodity. This called contraction of
demand.
Extension of demand
There is extension of demand for a commodity when there is decrease in the price of that
commodity. When price is 15 dollars the demand is 50 kilograms. When price comes down to 10
dollars there is extension in demand from 50 to 60 kilograms.
Price Demand
$15 50 kg
10 60
The diagram shows extension of demand. Quantity of demand is shown on OX axis. The price is
shown on OY axis. DD is demand curve. When price comes down the quantity demanded extends
and demand curve moves downward.
Contraction of demand
There is contraction of demand for a commodity when there is increase in the price of
commodity. When price is 10 dollars per kilogram the demand is 40 kilograms. When price
increases to 20 dollars there is contraction of demand from 40 to 30 kilograms.
Price Demand
$10 40 kg
20 30
The diagram shows contraction of demand. Quality of demand is shown on OX axis. The price is
shown on OY axis. DD is demand curve. When price increases the quantity demanded comes
down and demand curve moves upward.
410 | Economics
28) What do you mean by movement and shift in demand? Explain graphically. [2021]
Movement and shift in demand refer to changes in the quantity of a particular good or service that
consumers are willing and able to purchase at different prices.
A movement along the demand curve occurs when the price of a good changes, causing a change
in the quantity demanded. When the price of a good increases, the quantity demanded decreases,
and when the price of a good decreases, the quantity demanded increases. This can be shown
graphically as a movement along the same demand curve.
On the other hand, a shift in demand occurs when there is a change in any other factor affecting
demand apart from price. These factors can include changes in consumer preferences, income,
population, and the availability of substitutes or complementary goods. When there is a shift in
demand, the entire demand curve shifts either to the left or right.
For example, if the popularity of electric cars increases, this would lead to an increase in demand
for electric cars, causing the demand curve to shift to the right. Conversely, if a new regulation is
introduced that bans the use of diesel engines in urban areas, this could lead to a decrease in
demand for diesel vehicles, causing the demand curve to shift to the left.
Here is a graphical representation of a movement along a demand curve:
In the graph above, the demand curve represents the quantity demanded of Good A at different
prices of Good A. Now, let's consider the cross elasticity of demand between Good A and Good B.
If the cross elasticity of demand is positive, it indicates that Good A and Good B are substitute
goods. This means that as the price of Good B increases, the quantity demanded of Good A also
increases. In the graph, this would be shown by a rightward shift of the demand curve for
Good A.
If the cross elasticity of demand is negative, it indicates that Good A and Good B are
complementary goods. This means that as the price of Good B increases, the quantity
demanded of Good A decreases. In the graph, this would be shown by a leftward shift of the
demand curve for Good A.
If the cross elasticity of demand is zero or close to zero, it indicates that Good A and Good B
are unrelated or independent goods. This means that changes in the price of Good B do not
have a significant impact on the quantity demanded of Good A. In the graph, this would be
shown by no shift or a very minimal shift of the demand curve for Good A.
By observing the shifts or lack thereof in the demand curve for Good A in response to changes in
the price of Good B, we can determine the cross elasticity of demand and understand the
relationship between the two goods.
412 | Economics
CHAPTER 3
SUPPLY
1. Describe law of supply. [2015][2010]
The law of supply is a fundamental principle of economic theory. It states that all else equal an
increase in price results in an increase in quantity supplied. In other words there is a direct
relationship between price and quantity. Quantities respond in the same direction as price
changes. This means that producers are willing to offer more products for sale on the market at
higher price by increasing production as a way of increasing profit.
In the figure OY is vertical axis OX is horizontal axis. Here b, o, d, a are four point show price
quantity combination. The supply curve / slopes upward from left to right indicating that less
quantity is offered for sale at lower price and more at higher prices by the sellers not supply curve
is usually positively sloped.
2. What is a supply function? What are the factors responsible to change in the
quantity of supply of a product? [2012]
Or what are the determinants of Supply? [2015][2013]
A supply function is a mathematical expression of the relationship between quantity demanded of
a product or service, its price and other associated factors such as input costs, prices of related
goods, etc.
Innumerable factors and circumstances could affect a seller's willingness or ability to produce
and sell a good. Some of the more common factors are:
The factors on which the supply of a commodity depends are known as the determinants of
demand. These are:
Price of the Commodity
Firm Goals
Price of Inputs or Factors
Technology
Government Policy
Expectations
Prices of other Commodities
Number of Firms
Natural Factors
Economics | 413
3. Why does supply curve slope upward? [2016][2013][2010]
The supply curve slopes upward due to the value of the commodity and the inherent profit a
manufacturer or supplier would receive for supplying said product. The supply curve is bounded
by quantity supplied (x-axis) and price (y-axis). As the price increases for the product, so does the
potential for profit (assuming everything else about the product remains the same—cost of
production, demand, etc).
As a result of this increase in potential profit, it is more valuable for a supplier to produce or
supply this commodity, because they will receive more money per unit supplied. Because of this,
they will inherently create and furnish more of that good in order to profit off of it. In a
straightforward economy (perfectly competitive), all firms would react this way and would
produce more under these circumstances.
4. With the help of diagrams explain the elasticity of supply.
Meaning of Elasticity of Supply:
The law of supply says that the supply varies directly with the price. If the price rises, the quantity
offered will extend, and as it falls the quantity offered will contract. This attribute of supply, by
virtue of which it extends or contracts with a rise or fall in price, is known as the Elasticity of
Supply. It refers to the sensitiveness or responsiveness of the supply to changes in price.
Diagrammatic Representation:
Figure represents inelastic supply and Fig. 24.10 elastic supply. Price is measured along OY and
quantity offered along OX.
In Fig., when the rice rises from PM to P’ M ‘ (which is a considerable rise), the quantity offered
extends from OM to OM’ only, which is not much. Hence su ly is less elastic.
In Fig., the-rise from PM to P M is not so large, but the extension of supply from OM to OM 2 is
quite considerable. Hence the supply is elastic.
5. What do you mean by Supply and Exceptional Supply?
Supply means the quantities that a seller is willing and able to sell at different prices. It is obvious
that if the price goes up, he will offer more for sale. But if the price goes down, he will be reluctant
to sell and will offer to sell less. Supply thus varies with price. Just as we cannot speak of demand
without reference to price and time, similarly we cannot speak of supply without reference to
price and time.
414 | Economics
The normal law of supply is widely applicable to a large number of Products. There are certain
exceptions to law of supply, like a change in the price of a good does not lead to a change in
its quantity supplied in the positive direction.
Some exceptions to law of supply are given below:
Change in business
Monopoly
Competition
Perishable Goods
Legislation Restricting Quantity
Agricultural Products
Artistic and Auction Goods
When we combine the demand and supply curves for a good in a single graph, the point at which
they intersect identifies the equilibrium price and equilibrium quantity. Here, the equilibrium
price is $6 per pound. Consumers demand, and suppliers supply, 25 million pounds of coffee per
month at this price.
With an upward-sloping supply curve and a downward-sloping demand curve, there is only a
single price at which the two curves intersect. This means there is only one price at which
equilibrium is achieved. It follows that at any price other than the equilibrium price, the market
will not be in equilibrium. We next examine what happens at prices other than the equilibrium
price.
Solution:
a. Given that,
d …………(i)
s ………….(ii)
In equilibrium condition,
d s
60 – 20 = p + 3p
4p = 40
P = 10
416 | Economics
Put the value of p in equation (i)
Qd = 60 – 3p
= 60 - 3×10
= 60-30
= 30
Equilibrium price = TK. 10
Equilibrium quantity = 30 units.
d
Table 1
Qd 60-3p = 60-3.11 60-3p = 60-3.10 60-3p = 60-3.9
P 27 30 33
Table 2
Qd 20 + p = 20 + 11 20 + p = 20 + 10 20 + p = 20 + 9
P 31 30 29
Ere, DD, and SS, intersect at point E from this it is found that,
Equilibrium price = TK.3
Equilibrium quantity = 10unit.
ii. Determination of Ed and ES from equation:
Ed =
Ed =
Ed =
Ed =
Es =
=
=
Economics | 417
=
iii. there will be no effect on the market equilibrium if the govt. impose a tax TK.4 on each unit of
the output. So market equilibrium will remain same.
In equilibrium condition,
d s
25 – 7 = p + 5p
6p = 18
P=3
Put the value of p in equation (i)
Qd = 25 – 5p
= 25 - 5×3
= 25-15
= 10
Equilibrium price = TK. 3
Equilibrium quantity = 10 units.
Qdx=25-5P
Demand Schedule Supply schedule
P Q P Q
0 25 0 7
2 15 2 9
3 10 3 10
5 0 5 12
418 | Economics
Ere, DD, and SS, intersect at point E from this it is found that,
Equilibrium price = TK.3
Equilibrium quantity = 10unit.
ii. Determination of Ed and ES from equation:
Ed =
Ed =
Ed =
Ed =
Ed =
Es =
=
=
=
iii. if the govt. impose a tax TK.4 on each unit of the output. So market equilibrium will be
QSx=7 + ( P – 2)
QSx= 5 + p
So,
- 5P – P = 5 - 25
-6p = - 20
P = 3.33 Equilibrium price
And = 25 – 5 (3.33)
Or Q = 8.33 Equilibrium quantity
10. Suppose a market consist of three consumers A, B and C. Whose inverse demand
functions are given below:
1) P= 35-0.5QA
2) P= 50-0.25QB
3) P= 40-200QC
(i) Find out the market demand function for the commodity. 2011
If the market supply function is given by Qs = 40+3.5P, Determine the equilibrium price and
quantity.
Inverse market demand function of A, B , C are
QA = 70 – 2p
QB = 200 – 4P
QC = 0.2 – 0.005P
Economics | 419
The market Demand is Q = Qa + Qb + Qc
= 70 – 2P + 200 – 4P + 0.2 – 0.005P
= 270.2 – 6.00P
11. There are 10,000 identical individuals in the market for commodity X, with a
demand function given by Qdx=12-2Px and 1000 identical producers of commodity
X, each with a supply function given by Qsx=20Px.
a) Find the market demand function and market supply function for commodity X.
b) Find the market demand schedule and market supply schedule of commodity X and then find
the equilibrium price and quantity.
c) Plot on the set of axes the market demand curve and market supply curve for commodity X
and show the equilibrium point.
d) Obtain the equilibrium price and show the mathematically.
b) From the above market demand function and market supply, we can prepare the schedule and
locate equilibrium price and output
Px QDx QSx
6 0 120,000
5 20,000 100,000
4 40,000 80,000
3 60,000 60,000
2 100,000 40,000
0 120,000 0
Equilibrium point is found where market demand curve intersect market supply curve.
d) Equilibrium price and output can also be found mathematically:
Qdx = 120,000- 20,000Px
And Qsx = 20,000 Px
As per equilibrium condition Qdx = Qsx
So,
120,000- 20,000Px = 20,000 Px
Or , - 40, 000Px = - 120,000
Or, Px = 3
And Q = 20,000(3) = 60,000
12. The following are the demand and supply functions of a manufacturer.
Determine equilibrium price and output:-
Qd = 500 – 2P
Qs = - 200 + 1.5P
i) What will be the impact on the market equilibrium if government imposes a tax of tk 4 on
each unit of the output?
ii) Determine Demand elasticity at Equilibrium price.
Solution:
Given that,
Qd = 500 – P……………………….. 1
Qs = - 1.5P………………………
In equilibrium condition,
d s
ii. if the govt. impose a tax TK.4 on each unit of the output. So market equilibrium will be
QSx= - 200 + 1.5 ( P – 4) = - 200 + 1.5p – 6= -206 + 1.5p
So,
CHAPTER 4
ECONOMIC THEORY OF CONSUMER BEHAVIOR
1. What is utility?
Or what do you mean by Utility? [2017]
Utility has several meanings: In economics, it refers to the value for money that people derive
from consuming a product or service. In this sense, we also use the term when talking about being
somewhere. Value for money, in this context, means ‘pleasure and satisfaction.
The goods satisfy human wants. This want satisfying quality in a good is called Utility. Utility is
that quality in a commodity by virtue of which it is capable of satisfying a human want. Air, water
(free goods) and food, cloth etc. (economic goods) satisfies eo le’s wants and hence they ossess
utility.
Types of Utility:
1. From Utility: Due to change in form there is change in utility, e.g. Wood when transformed
into furniture, utility will increase.
2. Place utility: When goods transported from one place to another place utility can increase.
For example apple will fetch more prices in other part of country than in Kashmir and
Himachal Pradesh.
3. Time utility: By storing a commodity and selling it at a time of scarcity, utility can be realized
more.
Cardinal Approach
Economics | 423
In this approach, one believes that it is measurable. One can express his or her satisfaction in
cardinal numbers i.e., the quantitative numbers such as 1, 2, 3, and so on. It tells the preference of
a customer in cardinal measurement. It is measured in utils.
Ordinal Approach
In this approach, one believes that it is comparable. One can express his or her satisfaction in
ranking. One can compare commodities and give them certain ranks like first, second, tenth, etc. It
shows the order of preference. An ordinal approach is a qualitative approach to measuring a
utility.
6. Describe the relationship between Total Utility and Marginal Utility. 2016
The term “Utility” refers to the level of satisfaction that consumers receive after consuming the
given good or service at a given period of time.
Total Utility
Total Utility refers to the total level of satisfaction received after consuming total level of good and
service. In other words, the consumer will be satisfied after consuming 3 units of goods or
services, then 3 is total utility.
Marginal Utility
Marginal utility refers to the level of satisfaction that a consumer receives after consuming an
additional unit of good or service. Let total utility is 3 units and consumer consuming one more
unit of a good or service then marginal utility is 1.
Let understand the relationship between TU and MU with the help of a table:
In the above table, the total utility obtained from the first apple is 20 utils, which keep on
increasing until we reach our saturation point at 5th apple. On the other hand, marginal utility
keeps on diminishing with every additional apple consumed. When we consumed the 6th apple,
we have gone over the limit. Hence, the marginal utility is negative and the total utility falls.
With the help of the schedule, we have made the following diagram:
Apples Q
R
S
IC
Bananas
Fig: Indifference Curve
Properties of Indifference Curve:
Following are the features of indifference curve
(a) Indifference Curve An indifference curve has a negative slope, i.e. it slopes downward
Always Slopes from left to right.
Downwards From Left To Reason: If a consumer decides to have one more unit of a
Right commodity (say apples), quantity of another good (say oranges)
must fall so that the total satisfaction (utility) remains same.
(a) Indifference Curve Is IC is strictly Convex to origin i.e. MRSxy is always diminishing
Always Convex To The Reason: Due to the law of diminishing marginal utility a consumer
Origin is always willing to sacrifice lesser units of a commodity for every
additional unit of another good.
(c) higher indifference Higher indifference curve represents larger bundles of goods i.e.
curve represents bundles which contain more of both or more of at least one.
Higher level of It is assumed that consumer’s references are monotonic i.e. he
satisfaction always prefers larger bundle as it gives him higher satisfaction.
Economics | 427
In the diagram, IC1 and IC2 are the two indifference curves. IC2 is
the higher indifference curve than IC1.
Combination ‘L’ contains more of both goods ‘X’ and Y than
combination ‘M’ on IC1. Hence IC curve gives more satisfaction
To have the second combination and yet to be at the same level of satisfaction, the consumer is
prepared to forgo 5 units of Y for obtaining an extra unit of X. The marginal rate of substitution of
X for Y is 5:1. The rate of substitution will then be the number of units of Y for which one unit of X
428 | Economics
is a substitute. As the consumer proceeds to have additional units of X, he is willing to give away
less and less units of Y so that the marginal rate of substitution falls from 5:1 to 1:1 in the sixth
combination (Col. 4).
11. What is Budget Line? Draw a Budget Line from an imaginary equation.
Or Draw a Budget Line from the equation 500 = 10X + 5Y
Budget Line
A graphical depiction of the various combinations of two selected products that a consumer can
afford at specified prices for the products given their particular income level. When a typical
business is analyzing a two product budget line, the amounts of the first product are plotted on
the horizontal X axis and the amounts of the second product are plotted on the vertical Y axis.
Budget line is a curve that shows the combinations of two goods that can be purchased by a
consumer using a certain amount of income and based on the market price of the good.
There is a combination of budget……
Combination X Y
A 10 0
B 8 1
C 6 2
D 4 3
E 2 4
F 0 5
If a person spend all the money to purchase Y, one will obtain 5 unit of Y and 10 unit of X
In order to display the combination of two goods X and Y, that the consumer buys to be in
equilibrium, let’s bring his indifference curves and budget line together.
We know that,
Indifference Map – shows the consumer’s reference scale between various combinations
of two goods
Budget Line – depicts various combinations that he can afford to buy with his
money income and prices of both the goods.
In the following figure, we depict an indifference map with 5 indifference curves – IC1, IC2, IC3, IC4,
and IC5 along with the budget line PL for good X and good Y.
From the figure, we can see that the combinations R, S, Q, T, and H cost the same to the consumer.
In order to maximize his level of satisfaction, the consumer will try to reach the highest
indifference curve. Since we have assumed a budget constraint, he will be forced to remain on the
budget line.
We derive the Engel Curve (demand with respect to income) for X1 by varying M while holding
both prices P1 and P2 constant, and tracing out the utility-maximizing level of X1 consumed at
each level of M.
In this animation, as M is increased, the budget line shifts outward in parallel to new tangency
points on successively higher indifference curves, indicating successively higher optimal
consumption levels of X1.
In this example, X1 is a normal good: its income elasticity is greater than zero. In contrast, if X1
were an inferior good, consumption of it would decline as income increases: an inferior good's
income elasticity is less than zero.
Luxury goods are a subset of normal goods with income elasticities greater than +1.
Economics | 431
The budget line is B1 – this shows maximum consumption with current income.
To maximise utility, the consumer can choose on IC1, 20 apples, 10 bananas.
An increase in income would shift the budget line to the right.
CHAPTER 5
CONSUMER DEMAND
1. Explain the concept of consumer surplus. How did Marshall measure it?
[2017] [2015]
Consumer surplus is an economic measurement of consumer benefits. Consumer surplus happens
when the price that consumers pay for a product or service is less than the price they're willing to
pay. It's a measure of the additional benefit that consumers receive because they're paying less
for something than what they were willing to pay.
In the words Prof. Marshall –
“The total utility of a good is the sum of the successive marginal utilities of each added unit.
Therefore, the price a peon pass for a good never exceeds, and seldom equals, that which he or
she would be i1ling to pay rather than go without the desired object. Only at the margin will price
generally match a erson’s willingness to ay. Thus, the total satisfaction a erson gets from
purchasing successive units of a good exceeds the sacrifices required to pay for the good is called
consumer’s sur lus.”
So, finally total social surplus is composed of consumer surplus and producer surplus. It is a
measure of consumer satisfaction in terms of utility.
Marshall Theory of Consumer Surplus:
Price (Tk.) Quantity
20 1
14 2
10 3
6 4
4 5
3 6
2 7
The rice and quantity data shown in above table is to illustrate consumer’s sur lus. From the
table that the person for whom these data apply would buy 1 goods if the price were Tk. 20. At Tk.
14 he would buy 2goods, at Tk. 10, 3 goods, and so on. Suppose, the market price was actually Tk.
2, this consumer would buy 7 goods annually, pay Tk. 2 for each good, and spend Tk. 14. Notice,
however, that the first good provides Tk. 20 worth of utility, the second Tk. 14 worth of utility,
and so forth. This erson’s total gain in utility from the urchase of the 7 good is thus Tk. 59 (
14 + 10 + 6 + 4 + 3 + 2).
436 | Economics
The consumer surplus is graphically shown below:
C Supply
Price Consumer
Surplus E
B
Demand
F Quantity
Fig: Consumer Surplus
Above figure shows Marshall’s Equilibrium Price and uantity “Haggling and bargaining” of
sellers and buyers result in an equilibrium price (here B) that equates quantity supplied and
quantity demanded (both F). Buyers collectively receive consumer surplus of BCE.
2. What do you mean by consumer surplus? How can you measure consumer’s surplus by
using indifference curve?
Consumer surplus is an economic measurement of consumer benefits. Consumer surplus happens
when the price that consumers pay for a product or service is less than the price they're willing to
pay. It's a measure of the additional benefit that consumers receive because they're paying less
for something than what they were willing to pay.
Economics | 437
Consumer’s surplus by using indifference curve
There is an inverse relationshi between market rice and consumer’s sur lus. An inverse
relationship means that a decline in market price increases consumer’s sur lus and vice-versa.
In figure, when the market price for the commodity under consideration is OP, the areas Q and R
are consumer’s sur lus. If there is an increase an increase in the market rice (OP 1), the area Q
will represent consumer’s sur lus. Note that there is a loss of consumer’s sur lus equivalent to
area R. When the price decreases (OP2), consumer’s sur lus increases (area area R area S).
Depending on the analysis, the actual functional form of the equation can be linear, with a
constant slope, or curvilinear, with a changing slope. The most common form is linear, such as the
one presented here:
C = a + bY
where: C is consumption expenditures, Y is income (national or disposable), a is the intercept, and
b is the slope.
Economics | 439
Derive a saving function from the consumption function, C=a+bY
Here, C = a + bY
C = a + bY
‘.’ S Y – a – bY
.’. S - a + Y(1 – b)
APC = = = +b
APS = = = + (1 – b)
.’. APC APS +b+ + (1 – b) = 1
Induced Consumption
Induced consumption, on the other hand, differs in that the amount of consumption varies based
on income. As disposable income rises, so does the rate of induced consumption. This process
applies to all normal goods and services. For induced consumption, disposable income is at zero
when induced consumption is at zero. As the value of disposable income rises, it induces a similar
rise in consumption. Induced consumption demonstrates how people begin to enjoy more lavish
lifestyles and spend more money as their wealth grows.
MPS = = = 1-b
.’. MPC MPS b 1 – b = 1
CHAPTER 6
THEORY OF PRODUCTION
1. What is return of scale? Types of return of scale [2011/2013/2017]
The terms 'economies of scale' and 'returns to scale' are related, but they mean very different
things in economics. While economies of scale refers to the cost savings that are realized from an
increase in the volume of production, returns to scale is the variation or change in productivity
that is the outcome from a proportionate increase of all the input.
There are Three Types of Returns to Scale:
(a) Increasing Returns to Scale
(b) Decreasing Returns to Scale
(c) Constant Returns to Scale
4. How is the shape of production possibilities frontier connected with the law of
increasing opportunity cost? 2013, 2012
Production Possibility Frontier shows the maximum amounts of production that can be obtained
by an economy given its technological knowledge and quantity of imputes available.
Opportunity cost is the cost of an alternative that must be forgone in order to pursue a certain
action. Put another way, the benefits you could have received by taking an alternative action.
Economics | 445
Table of Production Possibility Frontier
A table for the possibilities where two product can be produced with the utilization of resources
available.
Possibilities Butter Guns
A 0 14
B 1 12
C 2 9
D 3 5
E 4 0
A . Unattainable Point
14
B
Guns
12
C
9
5 D
0 Butter
1 2 3 4
5. Explain the law of returns to scale in the long- run production function. Why do
we get decreasing returns to scale? 2012, 2009
Production function may be defined as the functional relationship between physical inputs (i.e.,
factor of production) and physical outputs (i.e., the quantity of good produced). Production
function shows technological or engineering relationship between output of a commodity and its
inputs. The act of production involves the transformation of input into output. The word
production in economics in not merely confined to effecting physical transformation in matter, it
also covers the rendering of services. The production function can be expressed symbolically as,
X=f (Ld, L, K, M, T)
Where X denotes commodity X, Ld land, L labor, K capital, M management and T technology. The
above function shows the general production function.
446 | Economics
There are two types of production function:
1. Short run production function.
2. Long run production function.
“Iso- roduct curve shows the different in ut combinations that will roduce a given out ut.”
Samuelson
“An Iso-quant curve may be defined as a curve showing the possible combinations of two
variable factors that can be used to roduce the same total roduct.” Peterson
“An Iso-quant is a curve showing all possible combinations of inputs physically capable of
roducing a given level of out ut.” Ferguson
We shall have a comment point corresponding to both the iso-quant. This common point would
indicate two different levels of output of output to only contradict our earlier assertion that each
point on an iso-quant curve indicates the same level of output. This is illustrated in the graph.
iv. The higher the iso-quant curve the higher the level of output it represents:--
Higher iso quant curve represents higher level of output. It is so because higher iso-quant curves
are based upon higher level of input of the factor TK.
The marginal rate of substitution tells you how many units of X which a given consumer, or group
of consumers, would consider to be compensation for one less unit of Y. For instance, a consumer
who prefers Coca Cola may be equally happy if offered two cans of Pepsi instead. A line joining all
points on a chart showing those quantities of X and Y considered by the consumer to provide
equivalent utility is called an indifference curve.
The steepness of the line at any particular point on the two graphs above indicates the marginal
rate of transformation and the marginal rate of substitution respectively. Point AA on the
transformation curve indicates a different marginal rate of transformation than at point BB.
10. What is iso-cost lines? Draw also-cost line from the equation 100=2L+3K.
2014, 2009
The iso cost line is an im ortant com onent when analyzing roducer’s behaviour. The isocost
line illustrates all the possible combinations of two factors that can be used at given costs and for
a given roducer’s budget. In sim le words, an isocost line re resents a combination of inputs
which all cost the same amount.
Now suppose that a producer has a total budget of Rs 120 and and for producing a certain level of
output, he has to spend this amount on 2 factors A and B. Price of factors A and B are Rs 15 and Rs.
10 respectively.
450 | Economics
Combinations Units of Capital Units of Labour Total expenditure
Price = 150Rs Price = 100 Rs ( in Rupees)
A 8 0 120
B 6 3 120
C 4 6 120
D 2 9 120
E 0 12 120
The iso cost line shows all the possible combinations of two factors Labour and capital.
11. Show producers equilibrium using Iso-cost and Iso quants. [2018]
Producer’s Equilibrium
The graph below shows how we can use isoquant curve and isocost lines to determine optimum
roducer’s equilibrium.
In the figure shown above, the isoquant curve represents targeted output, i.e. 200 units. Icocost lines
EF, GH and KP show three different combinations in which we can utilize the total outlay of inputs, i.e.
capital and labour.
The isoquant curve crosses all three isocost lines on points R, M and T. These points show how much
costs we will incur in producing 200 units. All three combinations produce the same output of 200
units, but the least costly for the producer will be point M, where isocost line GH is tangent to the
isoquant curve.
Economics | 451
Points R and T also cross the isoquant curve and equally produce 200 units, but they will be more
expensive because they are on the higher isocost line of KP. At point R the producer will spend more
on capital, and labour will be more expensive on point T.
Thus, oint M is the roducer’s equilibrium. It will roduce the same out ut of units, but will a
more profitable combination as it will cost less. The producer must, therefore, spend OC amount on
capital and OL amount on labour.
12. Show the optimal combination of input where producers maximizes their profit
Equilibrium conditions of the firm are identical to the above situation which is, iso-cost line must
be tangent to the highest possible isoquant and isoquant should be convex. Though the present
problem is theoretically different. In this case firm has to maximise its output for a given cost. This
is elucidated in the figure:
13. Determine and describe the least cost combination of two s so that producer can
be able to minimize the cost.
Least-Cost Combination
The problem of least-cost combination of factors refers to a firm getting the largest volume of
output from a given cost outlay on factors when they are combined in an optimum manner.
In the theory of production, a producer will be in equilibrium when, given the cost-price function,
he maximizes his profits on the basis of the least-cost combination of factor. For this he will
452 | Economics
choose that combination of factors which maximizes his cost of production. This will be the
optimum combination for him.
Assumptions
The assumptions on which this analysis is based are:
1. There are two factors. Capital and labor.
2. All units of capital and labor are homogeneous.
3. The prices of factors of production are given and constant.
4. Money outlay at any time is also given.
5. Perfect competition is prevailing in the factor market.
On the basis of given prices of factors of production and given money outlay we draw a line A, B.
The firm cannot choose and neither combination beyond line AB nor will it chooses any
combination below this line. AB is known as the factor price line or cost outlay line or iso-cost line.
It is an iso-cost line because it represents various combinations of inputs that may be purchased
for the given amount of money allotted. The slope of AB shows the price ratio of capital and
labour, i.e., By combining the isoquants and the factor-price line, we can find out the optimum
combination of factors. Fig. illustrates this point.
In the Fig. equal product curves IQ1, IQ2 and IQ3 represent outputs of 1,000 units, 2,000 units and
3,000 units respectively. AB is the factor-price line. At point E the factor-price line is tangent to
iso-quant IQ2 representing 2,000 units of output. Iso-qunat IQ3 falls outside the factor-price line
AB and, therefore, cannot be chosen by the firm. On the other hand, iso-quant IQ, will not be
preferred by the firm even though between R and S it falls with in the factor-price line. Points R
and S are not suitable because output can be increased without increasing additional cost by the
selection of a more appropriate input combination. Point E, therefore, is the ideal combination
which maximizes output or minimizes cost per units: it is the point at which the firm is in
equilibrium.
Economics | 453
14. What is marginal rate of Technical substitution (MRTS)?
Marginal rate of technical substitution (MRTS) may be defined as the rate at which the producer
is willing to substitute one factor input for the other without changing the level of production.
In other words, MRTS can be understood as the indicator of rate at which one factor input (labor)
can be substituted for the other input (capital) in the production process while keeping the level
of output unchanged or constant.
Marginal rate of substitution will be thus----
It means the Marginal rate of technical substitution of factor labor for factor capital (K) (MRTS LK)
is the number of units of factor capital (K) which can be substituted by one unit of factor labor (L)
keeping the same level of output.
16. What do you mean by Isoquant? Briefly write down the common characteristics of
Isoquant.
An Isoquant represents combination of two factors which are capable of producing the same level
of output.
Combination Factor x Factor y
A 1 12
B 2 8
C 3 5
D 4 3
E 5 2
454 | Economics
The above table shows the different combination of two factors x and y. The graphical
presentation of the above table is given below:
A . Unattainable Point
12
Factor y
8 B
C
5
3
D
0
Factor x
1 2 3 4
Thus production function describes the law of production, i.e the transformation of factor inputs
into outputs (products) at any particular period of time.
20. Explain the law of variable proportion. What is the optimum stage of production
and why? [2014]
The Law of Variable Proportions or Returns to a Factor plays an important role in the study of the
Theory of Production.
This law examines the production function with one factor variable, keeping the quantities of other
factors fixed. In other words, it refers to the input-output relation when output is increased by
varying the quantity of one input. Law of variable proportion is also known as ‘ Law of Returns’ or ‘
Returns to Variable factor ”
A major dilemma in the world of the law of diminishing returns is deciding the stage where a rational
roducer would look to o erate. Let’s examine each of these stages from his ers ective.
The stage of negative returns or stage III is robably not a stage of the roducer’s choice. This is
because the fixed factors here are over utilized. Thus a rational producer would know that he is not
having optimum production.
Further, production can be increased by decreasing the number of variable inputs. Effectively, even if
the inputs are free of cost, the producer would stop before the advent of stage III.
Stage I or the stage of increasing returns is a better stage, to start with. However, a rational producer
would again not operate in this stage. This is because he would know that he is not making efficient
utilization of the fixed inputs. In simpler words, the fixed inputs are underutilized.
21. Describe three stages of the law of variable proportion in production function.
[2016]
Economics | 457
Three Stages of the Law
The law has three stages as explained below:
1. Stage I – The Total Physical Product increases at an increasing rate and the MPP increases too.
The Marginal Physical Product increases with an increase in the units of the variable factor.
Therefore, it is also called the stage of increasing returns. In this example, the Stage I of the law
runs up to three units of labour (between the points O and L).
2. Stage II – The TPP continues to increase but at a diminishing rate. However, the increase is
positive. Further, the MPP decreases with an increase in the number of units of the variable
factor. Hence, it is called the stage of diminishing returns. In this example, Stage II runs between
four to six units of labour (between the points L and M). This stage reaches a point where TPP is
maximum (18 in the above example) and MPP becomes zero (point R).
3. Stage III – Now, the TPP starts declining, MPP decreases and becomes negative. Therefore, it is
called the stage of negative returns. In this example, Stage III runs between seven to eight units of
labour (from the point M onwards).
22. Discuss the differences between fixed factors and variable factors of production.
[2016]
Fixed factors Variable factors
1. Fixed factors exist only in the 1. Variable factors exist both in the short-run
short-run. and long-run.
2. It is independent of output in 2. It changes with the change of output in the
the short-run. short-run
3. Plant, machines etc. are the 3. Labour, raw materials etc. are the examples
examples of fixed. of variable factors.
4. It exists even in the zero level 4. When output is zero, quantities of variable
of output. factors are reduced to zero.
23. How technology change can affect the production function? [2016][2010]
Or what will happen in production function if technology is developed in a
significant manner? [2013]
Technological change alters the firm’s roduction function by either changing the relationshi
between inputs and output or introducing a new product and therefore a new production
function. An improvement in technology enables your firm to produce a given quantity of output
with fewer inputs shifting the production isoquant inward.
Technological change that introduces new products are difficult to view as a shift in the
production function. The new product simply has a new production function. When they were
first introduced, there weren’t any goods com arable to com uters, microwave ovens, and
cellular telephones. When introduced, these new goods had their own, new production function.
Technological change has three components — invention, innovation, and diffusion.
Invention refers to a new device, method, or process developed from study and experimentation.
According to the United States Patent and Trademark Office, an invention is “any art or rocess
(way of doing or making things), machine manufacture, design, or composition of matter, or any
new and useful improvement thereof, or any variety of plant, which is or may be patentable under
458 | Economics
the patent laws of the United States.”
An innovation is an invention that’s a lied for the first time. Although substantial evaluation
occurs during the research and development process, innovation still entails a substantial degree
of uncertainty regarding its profitability. This uncertainty can be removed only with the actual
implementation of the innovation. After the innovation has been applied, reevaluation occurs
based upon additional information obtained.
The two types of innovations are product innovations and process innovations.
Product innovation
Process innovation
Diffusion examines the speed at which an innovation is adopted. Diffusion seeks to explain how,
why, and at what rate innovations are adopted. As a result, diffusion introduces a time element in
your decision-making.
24. Define short run and long run production function? [2014]
A short-run production function refers to that period of time, in which the installation of new
plant and machinery to increase the production level is not possible. On the other hand, the Long-
run production function is one in which the firm has got sufficient time to install new machinery
or capital equipment, instead of increasing the labor units.
The short run production function is one in which at least is one factor of production is thought
to be fixed in supply, i.e. it cannot be increased or decreased, and the rest of the factors are
variable in nature.
Long run production function refers to that time period in which all the inputs of the firm are
variable. It can operate at various activity levels because the firm can change and adjust all the
factors of production and level of output produced according to the business environment. So, the
firm has the flexibility of switching between two scales.
25. What is cost least rules? In Which situation a producer will shut down its
production under a perfect competitive market? [2010]
The Least Cost Method is another method used to obtain the initial feasible solution for the
transportation problem. There are several methods available to obtain an initial basic feasible
solution of a transportation problem. We discuss here only the following three. For finding the initial
basic feasible solution total supply must be equal to total demand.
Method: Least Cost Method (LCM)
The least cost method is more economical than north-west corner rule, since it starts with a lower
beginning cost. Various steps involved in this method are summarized as under.
Step 1: Find the cell with the least (minimum) cost in the transportation table.
Step 2: Allocate the maximum feasible quantity to this cell.
Step:3: Eliminate the row or column where an allocation is made.
Step:4: Repeat the above steps for the reduced transportation table until all the allocations are made.
Shut down production
A firm will choose to implement a production shutdown when the revenue received from the sale of
the goods or services produced cannot cover the variable costs of production. In this situation, a firm
will lose more money when it produces goods than if it does not produce goods at all. Producing a
lower output would only add to the financial losses, so a complete shutdown is required. If a firm
Economics | 459
decreased production it would still acquire variable costs not covered by revenue as well as fixed
costs (costs inevitably incurred). By stopping production the firm only loses the fixed costs.
460 | Economics
CHAPTER 7
COST
1. “No cost is fixed in the long-run.” – Explain the statement.
Or, Explain why in long run all costs are variable. 2013
In the long run, when all inputs under the control of the firm are variable, there is no fixed cost. As
such, there is no need to distinguish between total cost, fixed cost, and variable cost. In the long
run, total cost is merely total cost.
With no fixed inputs in the long run, increasing and decreasing marginal returns, and especially
the law of diminishing marginal returns, are not relevant to long-run total cost. There are,
however, two similar influences, economies of scale (or increasing returns to scale) and
diseconomies of scale (or decreasing returns to scale).
a) The Short Run: In the short run, total cost increases at a decreasing rate due to increasing
marginal returns and increases at an increasing rate due to decreasing marginal returns and
the law of diminishing marginal returns. This also triggers changes in marginal cost.
b) The Long Run: In the long run, there are no fixed inputs. As such, marginal returns and
especially the law of diminishing marginal returns do not operate and thus do not guide
production and cost. Instead long-run total cost is affected by increasing and decreasing
returns to scale, which translates into economies of scale and diseconomies of scale.
3. Describe the relationship between Total, Average and Marginal Cost. 2013
Total Cost
Total cost is an economic measure that sums all expenses paid to produce a product, purchase an
investment. The Total Cost is the actual cost incurred in the production of a given level of output.
The total cost includes both the variable cost and the fixed cost.
Total Cost = Total Fixed Cost + Total Variable Cost + Opportunity Cost
Marginal Costs – Marginal cost is the cost of producing an extra unit. If the total cost of 3 units is
1550, and the total cost of 4 units is 1900. The marginal cost of the 4th unit is 350.
Marginal Cost = Total cost of nth unit - Total cost of (n-1)th unit.
Average Cost- The Average Cost is the per unit cost of production obtained by dividing the total
cost by the total output. By per unit cost of production, we mean that all the fixed and variable
cost is taken into the consideration for calculating the average cost. Thus, it is also called as Per
Unit Total Cost.
Economics | 461
AC = Average Variable cost (AVC) + Average Fixed cost (AFC)
4. What are the difference between Marginal cost and Average Cost?
Average Cost Marginal Cost
Cost per unit of output is called average Marginal cost is the change in total cost when an
cost. It is called unit cost. additional unit of output is produced.
Product of quality and AC is equal to If MC is added with the total cost of pricing units we
total cost. get total cost.
AC=AFC+AVC MC=AFC+MVC
AC=TC quantity MC=TC=TC=-1
AC is greater than MC MC is lower than AC
AC increases slower then MC. MC increases faster than AC.
8. Why does average curve and marginal revenue curve fall on the same line?
The equality between average revenue and marginal revenue occurs for a firm selling an output
in a perfectly competitive market. This is illustrated by the exhibit to the right. This exhibit
contains the average revenue curve and marginal revenue curve for zucchini sold by Phil the
zucchini grower, a hypothetical firm in Shady Valley. Phil the zucchini grower is one of thousands
of zucchini growers in the market, selling identical products. As such, Phil receives the going price
for zucchini.
Marginal Cost is the increase in cost caused by producing one more unit of the good.
The Marginal Cost curve is U shaped because initially when a firm increases its output, total costs,
as well as variable costs, start to increase at a diminishing rate. At this stage, due to economies of
scale and the Law of Diminishing Returns, Marginal Cost falls till it becomes minimum. Then as
output rises, the marginal cost increases.
11. Explain profit maximum conditions with the help of MR and MC curve. 2014
The Profit Maximization Rule states that if a firm chooses to maximize its profits, it must choose that
level of output where Marginal Cost (MC) is equal to Marginal Revenue (MR) and the Marginal
Cost curve is rising. In other words, it must produce at a level where MC = MR.
The profit maximization rule formula is
MC = MR
Marginal Cost is the increase in cost by producing one more unit of the good.
Marginal Revenue is the change in total revenue as a result of changing the rate of sales by one unit.
Marginal Revenue is also the slope of Total Revenue.
Profit = Total Revenue – Total Costs
Therefore, profit maximization occurs at the most significant gap or the biggest difference between
the total revenue and the total cost.
12. How is the shape of production possibilities frontier connected with the law of
increasing opportunity cost?
To understand the law of increasing opportunity costs, let's first define opportunity
costs. Opportunity cost is the cost of what we are giving up to do what we are currently doing. If we
can either go to work or go to the beach, and we choose to work, the opportunity cost of working is
the value we would have gotten had we gone to the beach.
466 | Economics
The law of increasing opportunity costs states that as we increase production of one good, the
opportunity cost to produce an additional good will increase.
The Production Possibilities Curve (PPC) is a model that captures scarcity and the opportunity
costs of choices when faced with the possibility of producing two goods or services. Points on the
interior of the PPC are inefficient, points on the PPC are efficient, and points beyond the PPC are
unattainable. The opportunity cost of moving from one efficient combination of production to
another efficient combination of production is how much of one good is given up in order to get
more of the other good.
18. Why total cost falls as you increase the number of production. [2010]
The production cost involves two components as written below
Total Cost = Fixed Cost + Variable Cost
The total cost can be decreased by Economies of Scale i.e by increasing production . As the
number of components produced increases the Fixed cost gets divided over a large number of
components , while the variable cost remains the same thus decreasing the Total cost.
A simple example as follows :
Case 1) Company A produces toys with the following costs
Fixed Cost = Cost of purchasing Machine = Rs.100000
Variable Cost-= Cost of Producing one unit of product = Rs.10/Unit
(Labour , electricity etc.. which changes with production )
Quantity Produced = 100
Total Cost for production for 100 components = Fixed Cost +Variable Cost
=Fixed Cost + Variable Cost/Unit *No. of units
= 100000+(10*100)
=Rs101000
Therefore Cost / Unit = Total Cost / Number of Units
=101000/100
=Rs.1010
Economics | 469
Case 1) Company B produces toys with the following costs
Fixed Cost = Cost of purchasing Machine = Rs.100000
Variable Cost-= Cost of Producing one unit of product = Rs.10/Unit
(Labour , electricity etc.. which changes with production )
Quantity Produced = 1000
Total Cost for production for 100 components = Fixed Cost +Variable Cost
=Fixed Cost + Variable Cost/Unit *No. of units
= 100000+(10*1000)
=Rs110000
Therefore Cost / Unit = Total Cost / Number of Units
=110000/1000
=Rs.110
From the above example it is clear that Company B has a clear advantage due to economies of
scale where its per unit cost decreases drastically . This reduction in cost can be used to increase
profit margins or pass on the benefit to consumers to make the market more competitive.
19. Explain the relationship between TFC, TVC and TC. [2021]
In economics, Total Fixed Cost (TFC), Total Variable Cost (TVC), and Total Cost (TC) are important
concepts related to production and cost analysis. Let's understand the relationship between these
terms:
1. Total Fixed Cost (TFC): TFC refers to the cost incurred by a firm that does not change with the
level of production in the short run. It includes expenses such as rent, salaries of permanent
employees, insurance premiums, and other fixed expenses. TFC remains constant regardless of
the quantity of output produced.
2. Total Variable Cost (TVC): TVC represents the cost incurred by a firm that varies with the level
of production. It includes expenses directly related to the production of goods or services, such as
raw materials, direct labor wages, and variable overhead costs. As the level of production
increases, TVC also increases.
3. Total Cost (TC): TC is the sum of TFC and TVC. It represents the overall cost incurred by a firm to
produce a given quantity of output. Mathematically, TC = TFC + TVC.
470 | Economics
CHAPTER 8
MARKETS AND REVENUE
OLIGOPOLY: A situation where there are only a few sellers in a particular economy who control a
particular commodity. They can, therefore, influence prices and affect the competition. In India,
an example of this would be mobile telephony - There are only a few operators, examples of which
are: Airtel, Idea, BSNL, Reliance
PERFECT COMPETITION: This is an economic situation that really doesn't exist, in which a bunch
of conditions are met, not the least of which are free entry and exit from a market, tons of sellers
selling the exact same product, and tons of buyers for that product who have perfect knowledge of
what it does and how it works. An Indian fish market might be an example of something close to
this (though real "perfect competition" doesn't really exist.) At the fist market, lots of sellers
gather together to try to sell the same wares, and lots of customers try to buy them with a good
knowledge of what they are buying. There is little to prevent someone from joining in on the
selling or quitting the market altogether.
DUOPOLY: A market in which two giant brands control most of the product being sold and
therefore have a great amount of influence over the factors involved in the selling. This is the one
I can't give you a great example of in relation to India...I just can't think of one that is specifically
"Indian." Some examples would be Visa &Mastercard and Reuters & Associated Press and
International news agencies.
MONOPOLY: A market dominated by one seller. The cable company is an example of this in India
(sort of like it is in America.) The cable company in India, facing no competition, is notorious for
poor quality and poor service.
MONOPOLISTIC COMPETITION: Here, there are lots of sellers selling similar products that don't
differ a whole lot in terms of characteristics or price. Think breakfast cereals. In India, an
example of this is the banking system. After financial sector reforms in 1992, the banking system
in India has become much more competitive with lots more banks offering similar products at
similar prices.
In the short run, perfectly competitive markets are not productively efficient as output will not
occur where marginal cost is equal to average cost (MC=AC).
4. What do you mean by perfectly competitive market and Profit Maximization? [2009]
Perfectly competitive market is a market where businesses offer an identical product and
where entry and exit in and out of the market is easy because there are no barriers. In the
example from earlier, when starting your own business in a perfectly competitive market, you
would need to sell a product that is identical to the products that other businesses are selling so
that you can enter the market more easily.
Profit Maximization: A process that companies undergo to determine the best output and price
levels in order to maximize its return. The company will usually adjust influential factors such as
production costs, sale prices, and output levels as a way of reaching its profit goal. There are
two main profit maximization methods used, and they are Marginal Cost-
Marginal Revenue Method and Total Cost-Total Revenue Method. Profit maximization is a good
thing for a company, but can be a bad thing for consumers if the company starts to use
cheaper products or decides to raise prices.
Economics | 473
5. Define Monopoly Market with their characteristics. [2008]
Definition: The Monopoly is a market structure characterized by a single seller, selling the
unique product with the restriction for a new firm to enter the market. Simply, monopoly is a form
of market where there is a single seller selling a particular commodity for which there are no close
substitutes.
Features of Monopoly Market
2. Under monopoly, the firm has full control over the supply of a product. The elasticity of
demand is zero for the products.
3. There is a single seller or a producer of a particular product, and there is no difference
between the firm and the industry. The firm is itself an industry.
4. The firms can influence the price of a product and hence, these are price makers, not the price
takers.
5. There are barriers for the new entrants.
6. The demand curve under monopoly market is downward sloping, which means the firm can
earn more profits only by increasing the sales which are possible by decreasing the price of a
product.
7. There are no close substitutes for a mono olist’s roduct.
Under a monopoly market, new firms cannot enter the market freely due to any of the reasons
such as Government license and regulations, huge capital requirement, complex technology and
economies of scale. These economic barriers restrict the entry of new firms.
474 | Economics
6. Distinguish between perfect competition and monopoly market.
A general comparison between monopoly and perfect competition for easy understanding
has been depicted as under:
The firm is in equilibrium when it maximizes its profits (11), defined as the difference
between total cost and total revenue:
Π TR – TC
Given that the normal rate of rofit is included in the cost items of the firm, Π is the rofit above
the normal rate of return on capital and the remuneration for the risk- bearing function of the
entrepreneur.
The firm is in equilibrium when it produces the output that maximizes the difference between
total receipts and total costs.
The equilibrium of the firm may be shown graphically in two ways. Either by using the TR and TC
curves, or the MR and MC curves.
476 | Economics
In figure 5.2 we show the total revenue and total cost curves of a firm in a perfectly competitive
market. The total-revenue curve is a straight line through the origin, showing that the price is
constant at all levels of output. The firm is a price-taker and can sell any amount of output at the
going market price, with its TR increasing proportionately with its sales. The slope of the TR curve
is the marginal revenue. It is constant and equal to the prevailing market price, since all units are
sold at the same price. Thus in pure competition MR = AR = P.
The shape of the total-cost curve reflects the U shape of the average-cost curve, that is, the law of
variable proportions. The firm maximizes its profit at the output X e, where the distance between
the TR and TC curves is the greatest. At lower and higher levels of output total profit is not
maximized at levels smaller than XA and larger than XB the firm has losses.
The total-revenue-total-cost approach is awkward to use when firms are combined together in the
study of the industry. The alternative approach, which is based on marginal cost and marginal
revenue, uses price as an explicit variable, and shows clearly the behavioural rule that leads to
profit maximization.
In figure 5.3 we show the average- and marginal-cost curves of the firm together with its demand
curve. We said that the demand curve is also the average revenue curve and the marginal revenue
curve of the firm in a perfectly competitive market. The marginal cost cuts the SATC at its
minimum point. Both curves are U-shaped, reflecting the law of variable proportions which is
operative in the short run during which the plant is constant. The firm is in equilibrium
(maximizes its profit) at the level of output defined by the intersection of the MC and the MR
curves (point e in figure 5.3).
To the left of e profit has not reached its maximum level because each unit of output to the left of
Xe brings to the firm a revenue which is greater than its marginal cost. To the right of X e each
Economics | 477
additional unit of output costs more than the revenue earned by its sale, so that a loss is made and
total profit is reduced.
9. In what levels of production, a perfectly competitive firms stop its production in the
short-run? Describe using diagram.
Or, A Competitive firm’s shutdown point where price cover just variable cost.
Perfect competition is said to be exist when the following conditions are fulfilled:
Infinite buyers / Sellers: Infinite customers with the willingness and ability to buy the product at
the certain price, Infinite producers with the willingness and ability to supply the product at a
certain price. Neither buyer nor seller can influence upon the price of the product as individual
sellers have insignificant amount of market share and individual buyer can buy small amount of
goods.
A monopolist may be able to engage in a policy of price discrimination. This occurs when a firm
charges a different price to different groups of consumers for an identical good or service, for
reasons not associated with the costs of production. It is important to stress that charging
different prices for similar goods is not price discrimination. For example, price discrimination
does not does not occur when a rail company charges a higher price for a first class seat. This is
because the price premium over a second-class seat can be explained by differences in the cost of
providing the service.
478 | Economics
11. Differentiate between Monopoly and Perfect Competition.
Monopolistic competition is form of imperfect competition where many competing producers sell
products that are differentiated from one another. In monopolistic in the short run including
using market power to generate profit. In the long run, other firms enter the market and the
benefits of differentiation decreases with competition; the market becomes more like perfect
competition where firms can not gain economic profit.
AR
MR
Short run equilibrium of the firm under monopolist competition. The firm maximizes it`s profit
and produces a quantity where the firm`s marginal revenue (MR) is equal to its marginal
cost(MC). The firm is able to collect a price based on the average revenue (AR) curve. The
difference between the firms average revenue and average cost gives it a profit.
P D
In the given diagram DD is the demand curve under perfect competition , parallel to X-axis. Op is
the price given or determined through the market forces of demand and supply.
17. “Marginal revenue curve of a firm can`t be above it`s average revenue curve”---
Explain.
The average revenue curve is the downward sloping industry demand curve and it`s
corresponding marginal revenue curve lies below it. The relation between the average revenue
and the marginal revenue under monopoly can be understood with the help of the table. The
marginal revenue is lower than the average revenue………
Q AR (= P) RS
1 20 20 20
2 18 36 16
3 16 48 12
4 14 56 8
5 12 60 4
6 10 60 0
7 8 56 -4
Given the demand for his product, the monopolist can increase his sales by lowering the price, the
marginal revenue also falls but the rate of fall in marginal revenue is greater than that in average
revenue. In the table AR falls by RS, 2 at a time whereas MR falls by RS.4. This is shown in which
the MR curve is below the AR curve and lies half way on the perpendicular drawn from AR to the
T-axis. The relation will always exist between straight line downward sloping AR and MR curves.
P
A C
D AR
MR
O M Output
In order to prove it, draw perpendiculars CA and CM to the y-axis and X-axis respectively from
point C on the AR curve; CA cuts MR at B and CM at D. We have to prove that AB = BC.
Economics | 483
18. Is it possible to enjoy supernormal profit by a perfectly competitive firm in the long
run? (2014)
The equilibrium market price and industry equilibrium level of output are determined by the
industry demand and supply curves. The number of firms in the industry and their size is fixed in
short run. In long run, the number of firms in the industry and their size can adjust.
Changes in the market demand affect the price and the firms profits. The presence of an economic
profit means all time passes new firms enter the industry the presence of economic loss means
that eventually some existing firms exit when firms earn a normal profit, there is no incentive to
enter or exit.
Economic profits bring entry by new firms. The industry supply curve shifts rightward and
reduces the market price. The fall in price reduces economic profit and decreases the incentive to
entry the industry. New firms enter unit it is no longer possible to earn an economic profit.
19. How is the shape of the demand curve of a firm in perfectly competitive market
situation? How the shape is differ from monopolistic market?
A market is said to be [perfect competitive market where a sharp competition exist between large
number of buyers and sellers for homogeneous product at only one price in all over the market.
Shape of the demand curve of a firm in perfectly competitive market
A perfect Competition firm has the goal to maximize economic profit, which equals total revenue
minus total cost. A table representing perfect competition market is shown below:
Quantity Price
1 10
2 8
3 6
4 4
484 | Economics
The above table shows the different price of different quantity of a perfect competitive firm. The
graphical presentation of the above table is given below:
5
4
Price
2 4 6 10 Quantity
In a perfect competitive market, there remains several product with several price, every
consumer have to buy product at a bargaining rate as the perfect competitive firm is called a price
taker.
Shape of the demand curve of Monopolistic
A Monopolistic firm has the goal to continue a certain price in a market for economic
development. A table representing perfect competition market is shown below:
Quantity Price
1 4
2 4
3 4
4 4
Economics | 485
The above table shows the different price of different quantity of a monopolistic firm. The
graphical presentation of the above table is given below:
6
Price
4
3
2
1
0 1 2 3 4 Quantity
In a monopolistic market, there remains a same price, every consumer have to buy product at a
fixed rate.
20. Show the long run market equilibrium of a firm under monopolistic market
condition.
For a firm to achieve long run equilibrium, the marginal cost must be equal to the price and the
long run average cost. That is, LMC = LAC = P. The firm adjusts the size of its plant to produce a
level of output at which the LAC is minimum. Now, we know that at equilibrium:
Short-run marginal cost = Long-run marginal cost
Short-run average cost = Long-run average cost
Therefore, in the long-run, we have: SMC = LMC = SAC = LAC = P = MR
Hence, at the minimum point of the LAC, the plant works at its optimal capacity and the minima of
the LAC and SAC coincide. Also, the LMC cuts the LAC at the minimum point and the SMC cuts the
SAC at the minimum point. Therefore, at the minimum point of the LAC, the equality mentioned
above is achieved.
486 | Economics
21. Explain short run equilibrium of a firm in perfectly? [2015]
A firm is in equilibrium in the short-run when it has no tendency to expand or contract its output
and wants to earn maximum profit or to incur minimum losses. The short-run is a period of time
in which the firm can vary its output by changing the variable factors of production. The number
of firms in the industry is fixed because neither the existing firms can leave nor new firms can
enter it.
In Fig. 5.15, the short run marginal cost curve, SMC, is equal to MR at point E. Thus E is the
equilibrium point. Corresponding to this equilibrium point, the firm produces OQ output and sells
it at a price OP. Thus, the firm earns pure profit to the extent of PARB since total revenue (OPAQ)
exceeds total cost of production (OBRQ).
A firm, in the short run, may earn only normal profit if MC = MR < AR = AC occurs. A loss may
result in the short run if MC = MR < AR < AC happens
22. How does the firm reach in equilibrium position in competitive market in the short
run?
Under perfect competition, the individual firm cannot influence the price. It must take the average
revenue (its demand) curve for granted and adjust its output according to its marginal cost curve.
The short-run equilibrium position of a firm under perfect competition is illustrated in Fig. 2,
where
OP = Price.
PR = Average Revenue Curve.
AC = Average Cost Curve.
MC = Marginal Cost Curve.
When output is OQ1 the marginal cost is the same as the price. Therefore, the firm will produce OQ
and sell it at price OP (=EQ).
In Fig. 1 the firm’s average cost ( Q1Z) is less than the price (=EQ1). Therefore, the firm is earning
excess profits (=EZ per unit). In the long run there will be new entry and the excess profits will be
competed away.
Economics | 487
488 | Economics
23. What are differences between perfect competition and monopolistic competition?
[2011]
In a monopolistic market, there is only one firm that dictates the price and supply levels of goods
and services and has total market control. Contrary to a monopolistic market, a perfectly
competitive market is composed of many firms, where no one firm has market control.
BASIS FOR PERFECT COMPETITION MONOPOLISTIC COMPETITION
COMPARISON
Meaning A market structure, where there Monopolistic Competition is a market
are many sellers selling similar structure, where there are numerous
goods to the buyers, is perfect sellers, selling close substitute goods to
competition. the buyers.
Product Standardized Differentiated
Price Determined by demand and Every firm offer products to customers
supply forces, for the whole at its own price.
industry.
Entry and Exit No barrier Few barriers
Demand Curve Horizontal, perfectly elastic. Downward sloping, relatively elastic.
slope
Relation between AR = MR AR > MR
AR and MR
Situation Unrealistic Realistic
24. Briefly explain the marginal productivity theory of wages with criticism. [2011]
The marginal productivity theory of wage states that the price of labour, and wage rate is
determined according to the marginal product of labour.
Assumptions:
a. Perfect competition prevails in both product and factor market.
b. Law of diminishing marginal returns operates on the marginal productivity of labour.
c. Labor is homogeneous.
d. Full employment prevails.
e. The theory is based on long run.
f. Modes of production in constant.
Criticism:
a) The theory is based on the assumption of perfect competition. But perfect competition is
unreal and imaginary. Thus theory seems in practicable.
b) The theory puts too much on demand side. It ignores supply side.
c) Production is started with the combination of four factors of production. It is ridiculous to say
that production has increased by the additional employment of one worker. Employment of
an additional laborer amounts nothing in a big scale industry.
d) The theory is static. It applies only when no change occurs in the economy. Under depression
wage cut will not increase employment.
e) This, theory explains that wages will be equal to MRP and ARP.
f) It is difficult to measure MRP because any product is a joint product of both fixed and variable
factors.
Economics | 489
g) According to Watson the theory is cruel and harsh. This theory never takes into consideration
the marginal product of old, aged, blind etc.
25. What is market equilibrium? Explain market equilibrium with the help of demand
and supply curve. [2017]
Market equilibrium is a market state where the supply in the market is equal to the
demand in the market. The equilibrium price is the price of a good or service when the
supply of it is equal to the demand for it in the market. If a market is at equilibrium, the
price will not change unless an external factor changes the supply or demand, which
results in a disruption of the equilibrium.
Let us understand the concept of market equilibrium with the help of an example.
Table-10 shows the market demand and supply for talcum powder in Mumbai with their
varying prices of a week:
Decrease in Demand
Under conditions of a decrease in demand, with no change in supply, the demand curve
shifts towards left. When demand decreases, a condition of excess supply is built at the old
equilibrium level. This leads to an increase in competition among the sellers to sell their
produce, which obviously decreases the price.
Now as for price decreases, more consumers start demanding the good or service.
Observably, this decrease in price leads to a fall in supply and a rise in demand. This
counter mechanism continues until the conditions of excess supply are wiped out at the old
equilibrium level and a new equilibrium is established. Effectively, there is a decrease in
both the equilibrium price and quantity.
Economics | 491
CHAPTER 9
PRICE AND OUTPUT
Fig. 1 above depicts a firm facing a downward sloping, but flat demand curve. It also has a U-
shaped short-run cost curve.
From Fig. 2 above, you can see that the industry price, OP, is fixed throughout the interaction of
demand and supply of the industry. Firms have to accept this price. Hence, they are price-takers
and not price-makers. Hence, they cannot increase or decrease the price OP.
Therefore, the line P acts as a demand curve for such firms. Hence, in perfect competition, the
demand curve of an individual firm is a horizontal line at the level of the industry-set market
price. Firms have to choose the level of output that yields maximum profit.
3. Explain the process of price and output determination under a monopoly. [2008]
A firm under monopoly faces a downward sloping demand curve or average revenue
curve. Further, in monopoly, since average revenue falls as more units of output are sold,
the marginal revenue is less than the average revenue. In other words, under monopoly the
MR curve lies below the AR curve.
The Equilibrium level in monopoly is that level of output in which marginal revenue equals
marginal cost. The producer will continue producer as long as marginal revenue exceeds
the marginal cost. At the point where MR is equal to MC the profit will be maximum and
beyond this point the producer will stop producing.
It can be seen from the diagram that up till OM output, marginal revenue is greater than
marginal cost, but beyond OM the marginal revenue is less than marginal cost. Therefore,
the monopolist will be in equilibrium at output OM where marginal revenue is equal to
marginal cost and the profits are the greatest. The corresponding price in the diagram is
496 | Economics
MP’ or OP. It can be seen from the diagram at out ut OM, while MP’ is the average revenue,
ML is the average cost, therefore, P’L is the rofit er unit. Now the total profit is equal to
P’L ( rofit er unit) multi ly by OM (total out ut).
In the short run, the monopolist has to keep an eye on the variable cost, otherwise he will
stop producing. In the long run, the monopolist can change the size of plant in response to
a change in demand. In the long run, he will make adjustment in the amount of the factors,
fixed and variable, so that MR equals not only to short run MC but also long run MC.
Perfect competition arises when there are many firms selling a homogeneous good to many
buyers with perfect information. Under perfect competition, a firm is a price taker of its good
since none of the firms can individually influence the price of the good to be purchased or sold. As
the objective of each perfectly competitive firm, they choose each of their output levels to
maximize their profits. The key goal for a perfectly competitive firm in maximizing its profits is to
calculate the optimal level of output at which its Marginal Cost (MC) = Market Price (P). As shown
in the graph above, the profit maximization point is where MC intersects with MR or P. If the
above competitive firm produces a quantity exceeding qo, then MR and Po would be less than MC,
the firm would incur an economic loss on the marginal unit, so the firm could increase its profits
by decreasing its output until it reaches qo. If the above competitive firm produces a quantity
fewer than qo, then MR and Po would be greater than MC, the firm would incur profit, but not to
its maximum. Therefore, the firm could increase its profits by increasing its output until it reaches
qo.
6. Define price discrimination. Explain the condition under which monopolistic price
discrimination is both possible and profitable.
Or Define price discrimination is both possible and profitable.
WHEN PRICE DISCRIMINATION IS POSSIBLE:
Price discrimination refers to charging of different consumers by the monopolist. It is possible
only when following conditions prevail in the market----
a. Existence of Monopoly---
Price discrimination is also called discriminating monopoly. It is evident that price discrimination
is possible only under conditions of monopoly.
b. Separate market----
Another condition necessary for discriminating monopoly is that there must between or more
markets which can be separated and can be kept separate. It can be possible only if a unit if the
commodity could not be transferred from low priced market to high priced market nor could the
buyer move from expensive market to cheap marketed. In other words unit of demand should not
move from one market to the other , otherwise goods will be purchased from the cheap market
and sold in the clear market. In the way that difference in price will disappear which the
monopolist wanted to maintain.
c. Difference in the elasticity of Demand:---
Price discrimination is possible when elasticity of demand will be different in different markets.
The monopolist will fix higher price per unit in the market where demand is in elastic and lower
price per unit in the market where demand is elastic. In this way alone he can increase his
revenue. There will be no fear or any change in demand. If elasticity of demand is the same
different markets, then price discrimination will either not be possible or will be detrimental.
d. Expenditure in dividing and sub-dividing market to be minimum---
The expenditure incurred by the monopolist in dividing and sub-dividing market should be the
least. If his expenditure neutralizes elasticity of demand, the objective of price discrimination
would not be fulfilled.
e. Commodity to order:---
If a consumer gets a commodity made to order then it is possible for the producer or the seller to
practice price discrimination. Let suppose that a furniture marker ordinarily sells a sofa-set made
by him at TK.5000 per set, but if a consumer wants a sofa set made to order, then the furniture
maker may charge TK 6000 per set.
f. Product differentiation :---
A monopolist by changing the packing, name, level etc of the good can charge different prices
although intrinsically the good is of the same quality.
7. What Are Barriers to Entry?
Barriers to entry are the obstacles or hindrances that make it difficult for new companies to enter
a given market. These may include technology challenges, government regulations, patents, start-
up costs, or education and licensing requirements.
498 | Economics
Another American economist, George J. Stigler, defined a barrier to entry as, “a cost of roducing
that must be borne by a firm which seeks to enter an industry but is not borne by firms already in
the industry.”
8. Types of Barriers to Entry
There are two types of barriers:
#1 Natural (Structural) Barriers to Entry
Economies of scale:
Network effect:
High research and development costs:
High set-up costs:
Ownership of key resources or raw material:
#2 Artificial (Strategic) Barriers to Entry
Predatory pricing, as well as an acquisition:
Limit pricing:
Advertising: Brand:
Contracts, patents, and licenses:
Loyalty schemes:
Switching costs:
9. Determining the Shutdown Point of a Business
Three main factors help determine the shutdown point of a business:
1. How much variable cost goes into producing a good or service
2. The marginal revenue received from producing that good or service
3. The types of goods or services provided by the firm
For a one-product firm, the shutdown point occurs whenever the marginal revenue drops below
marginal variable costs. For a multi-product firm, shutdown occurs when average marginal
revenue drops below average variable costs.
A firm might reach its shutdown point for reasons that range from standard diminishing marginal
returns to declining market prices for its merchandise.
2. (a)Write down the physical description, application and transmission characteristics of optical
fiber.
(b)What is noise? Describe different types of noise.
(c)What is data transmission? Explain different types of data transmission.
(d)Define unguided media. Write down the differences between
3. (a)Briefly explain ASK, FSK and PSK techniques with principal Radio Waves and Microwaves.
(b) What is bit rate and baud rate? A signal is carrying four bits in each signal element. If 1000
signal elements are sent per second advantages and disadvantages. Find the bit rate and baud
rate?
(c) Describe data encoding and modulation techniques with figures.
(d) Explain Pulse Code Modulation (PCM)technique with diagram.
4. (a) What is CRC? Explain Module 2 Arithmetic and Polynomials with example.
(b) What is bit stuffing? Suppose the data is 1+111111111111011111101111110.
What will be the data pattern after applying bit stuffing in HDLC?
(c) Write down the differences between stop and wait protocol and sliding window protocol.
(d) Describe null modem with figure.
5. (a) What is multiplexing? Describe how FDM combines multiple signals into one.
(b)Compare between the features of FDM and TDM.
(c) Explain Time Division Multiplexing(TDM)technique.
(d) A multiplexer combines four 100Kbps channel using a time slot at 2 bits. Show the output with
four arbitrary inputs:
(i) What is frame rate?
(ii) What is frame duration?
(iii)What is bit rate?
(iv)What is bit duration?
6. Write short notes (any four): 5x4=20
(a) VSAT (b) SONET (c) ATM Network
(d)X-25 Protocol (e) ARQ (f) RS232
512 | Question Bank
B.Sc (HONS) IN CSE PART-II, FOURTH SEMESTER EXAMINATION, 2018
CSE.-226
Examination Code: 5614
(Data Communications)
Time-3 hours
Full marks-80
[N. B. —the figures in right margin indicate full marks. Answer any four questions]
1.(a) Define data communication. Describe a simplified data communication model with suitable
figures. 5
(b) Describe TCP/IP protocol architecture with function of each layer. 5
(c) Distinguish between connection-oriented and connection-less protocol. 4
(d) Briefly describe simplex, half-duplex and full-duplex with figures. 6
2. (a) Define the terms frequency, spectrum and bandwidth of a signal. 3
(b) Explain the different types of noise in data transmission. 6
(c) Given a channel with an intended capacity of 20 Mbps. The 5 bandwidth of the channel is MHz.
Who signal-to-noise ratio is ( required in order to achieve this capacity? 3
(d) Describe VSAT configuration. 6
3. (a) Describe data encoding and modulation techniques with figure. 5
(b) Sketch the signal waveforms of NRZ-L. NRZ-I and Manchester encoding scheme for
01001100011. 5
(c) What is ARQ? Describe Go-Back-N ARQ. 5
(d) Describe the frame structure of HDLC protocol. 5
4. (a) Define WDM. Distinguish between synchronous and statistical TDM. 4
(b) What are the applications of FDM, WDM and TDM? 6
(c) A multiplexer combines four 100kbps channel using a time slot at 6 2 bits. Show the output
with four arbitrary inputs;
(i) What is the frame rate?
(ii) What is the bit rate? WO What is the frame duration?
(d) Explain multilevel multiplexing. Multiple slot allocation and pulse stuffing. 4
5. (a) Describe a simple switching network wills figure. 5
(b) Explain about virtual circuit and datagram approach or packet switching network with
necessary diagram. 5
(c) What is ISDN? Discuss different types of channels used in ISDN.
(d) An end system sends 50 packets per second using the User Datagram Protocol (UDP) over a
full duplex 100 Mbps Ethernet LAN connection. Each packet consists 1500 B of Ethernet frame
payload data. What is the throughput? When measured at the UDP layer?
6. Write short notes on the following (any four):
(a) CRC
(b) Cellular system
(c) Null modem
(d) Channel capacity (e) ATM network (f) LAN topologies
Question Bank | 513
B.Sc (HONS) IN CSE, PART-II, FOURTH SEMESTER EXAMINATION, 2017
Subject: [Data Communications)
Code: CSE-226 Examination Code: 614
Time--3 hours
Full marks 80
[N.B.-The figures in the right margin indicate full marks. Answer any four of the following
questions.
1. (a)What is meant by data communication? Explain its characteristics.
2+4=6
(b)Describe different types of LAN topologies. 6
(c)Compare OSI reference model with TCPIIP protocol suite. 4
(d)Define communication protocol. Write down the key elements of protocol. 1+3=4
2 . (a)Define analog and digital signal. Construct a relation between data rate and bandwidth. 5
(b)What is transmission impairments? Explain the types of transmission impairments. 6
(c)Briefly explain Nyquist bandwidth and Shannon capacity formula. 5
(d)What is the channel capacity for a tele-printer channel with a 300 Hz bandwidth and a signal
to-noise ratio of 3DB? 4
3. (a)Define transmission media. Explain with figure of a fiber optic cable with its characteristics.
6
(b)Briefly explain : AST, FSK, PSK and QPSK techniques with principal advantages and
disadvantages. 5
(c)Explain Pulse Code Modulation (PCM) technique with its limitations. 5
(d)Distinguish between asynchronous and synchronous data transmission. 4
4. (a)What is multiplexing? Describe synchronous time division multiplexing with figure. 5
(b)Explain how FDM combines multiple signals into one. 5
(c)Which of the three multiplexing techniques are common for fiber optic links Explain With
reason. 5
(d) Compare between the features of FDM and TDM. 4
5. (a)What is packet switching network? Mention the advantages of packet switching over circuit
switching network. 6
(b)Describe datagram packet switching technique. 5
(c)Given the following information, find the minimum bandwidth required for the path FDM
Multiplexing. 4
Five devices, each requiring 4000 Hz.
200 Hz guard band for each device.
(d) What is router and routing table? Explain the important characteristics of routing function.
6. Write following short notes on following (any four):
(a) Satellite;
(b) V.24 interface standard;
(c) Virtual Circuit;
(d) VSAT;
(e) HDLC;
(f) Stop-N-wait ARQ.
514 | Question Bank
B.Sc (HONS.) IN CSE, PART-II, FOURTH SEMESTER EXAMINATION, 2016
Subject Code : CSE-226
Examination Code : 614
(Data Communications)
Time--3 hours
Full marks 80
[N.B.-The figures in the right margin indicate full marks. Answer any four of the following
questions.]
1. (a) Define data communications Describe simplified data communication model with proper
diagram. 6
(b) Distinguish between connection oriented and connectionless protocols. 4
(c) Describe the layer of OSI reference model. 7
(d) Write down the different between simplex, half duplex and full duplex transmission mode. 3
2. (a) Define the terms frequency, spectrum and bandwidth of a signal. 3
(b) Differentiate between guided and unguided transmission media. 4
(c) Describe NRZ-I, Bipolar AMI and Manchester for the following data 01001101011. 6
(d) Construct a relation between data rate and bandwidth. 4
3. (a) What do you mean by HDLC? Describe the basic characteristics of HDLC protocol. 6
(b) What are the reasons a large blow of data break into smaller blocks and transmit in many
frames?
2
(c) Define data rate and attenuation. Compare between spaces- division and time- division
switches. 5
(d) What is IP address? Find out 1PV4 class types and calculating subnet mask as following
addresses: 7
(i) 192.16.0.0/29;
(ii) 172.17.0.0/23;
(iii) f0.0.0.0/12.
4. (a) Define multiplexing. Briefly explain synchronous time division multiplexing technique
with figure. 6
(b)What is SONET? Describe the propagation of light through optical fiber. 6
(c)Derive an expression for s(t) if x (t) is amplitude- modulating signal cos2nfmt. 4
(d)Briefly explain the following terms:- 4
(i) Damaged frame
(ii) Frame synchronization
5. (a) What is switching network? Describe circuit switching network with figure. 6
(b)Explain about X-25 protocol standard. 4
(c)Explain about virtual circuit and datagram approach of packet switching network with
necessary diagram. 6
(d)Describe the need for switching and define a switch. 4
6. Write short note (any four):-
5x4=20
(a)OSI model;
(b) Cellular communication;
(c)VSAT; (d) AM and FM techniques; (e) FDM; (f) CRC techniques.
Question Bank | 515
B.Sc (HONS.) IN CSE, PART-II, FOURTH SEMESTER EXAMINATION, 2015
CSE-226
Examination Code: 614
(Data Communications)
Time--3 hours
Full marks 80
[N.R.-The figures in the right margin indicate full marks. Answer any four of the following
questions.]
1 (a) Define data communication. Explain the characteristics of a data communication system.
(b)What is protocol? Describe the key elements: of protocol.
(c)What is transmission impairments? Explain the types of transmission impairments.
(d)Describe the layers of TCP/IP mode
2(a) Define analog , and digital signal. Briefly explain the different types of noise in data
transmission
5
(b)What is channel capacity? Briefly describe the Nyquist Bandwidth and Shanon capacity
formula.
6
(c) Describe VSAT configuration. 4
(d)Given a channel with an intended capacity of 20 MbPS. The bandwidth of the channel isMHz.
What signal-to noise ratio is required in order to achieve this capacity? 3
3 (a) Define data rate and signal rate. 5
(b)Describe data encoding &modulation techniques with figures. 3
(c)Distinguish among AM, FM & PM. 3
(d)Explain pulse code modulation (PCM) technique with diagram. 5
(e)Describe CRC technique for error detection. 4
4.(a) Define multiplexing: Describe Frequency Division Multiplexing (FDM). 6
(b) Compare between the features of FDM and TDM. 4
Given the following information find the minimum bandwidth required for the bath: 5
FDM Multiplexing
Five devices, each required 4000Hz, 290Hz guard band for each device.
(d) What is IP address? Classify the IP address of crass A,B, C& D network 5
5.(a) Distinguish guided and unguided media with examples: 5
(b)What is 'packet switching? Write down flit advantages of packet switching over circuit
switching network.
(c)What is rotifer ’& routing table? Explain the important characteristics of routing function.
(d)A channel has a bit rite of 4KbPS and a propagation delay - of 20 m sec. For what range of
frame size does stop and wait give and efficiency of at least 50percent?
6. Write short notes on the following (any four):
(a) Circuit switching;
(b) Wireless transmission;
(c) HDLC,
(d) ARQ; (e) ATM network (f) Datagram.
516 | Question Bank
B.Sc (HONS) IN CSE, PART-II, FOURTH SEMESTER EXAMINATION, 2014
Subject Code: CSE-226
Examination Code: 614
[Data Communications)
Time--3 hours
Full marks 80
[N.R.-The figures in the right margin indicate full marks. Answer any four of the following
questions]
1(a) Define data communication. Briefly explain the simplified model of data communication. 6
(b)Write down the difference, between circuit switching and packet switching. 4
(c)What is the difference between, a port address, a logical address and a physical address?
(d)What i9 a protocol? Describe the layers of ISO model.
2(a) What is transmission impairments? Explain the type of transmission impairments.
(b)Differentiate between guided media and unguided media. 2
(c)What is the relationship between a signal's spectrum and its bandwidth? 4
(d)Define fundamental frequency and channel capacity. 2
(e)Describe data encoding and modulation technique with figure 6
3 (a) Define frequency, spectrum, bandwidth and band rate with example. 4
(b)Briefly explain: ASK, FSK, PSK and QAM techniques with principle advantages and
disadvantages. 8
(c)Briefly explain Pulse Code Modulation (PCM) technique with its limitations. 5
(d)For the following digital data sketch the signal waveforms using NRZ-I.,
Bipolar-AMI and Manchester encoding scheme: 1011000111001.
4.(a) Define multiplexing. What arc the: different types of multiplexing techniques?
(b)Briefly explain the Synchronous. Time Division multiplexing techniques. 6
(c)With neat diagram ex lain the interleaving technique 4
(d)A multiplexer combine’s four: 100 Mbps. channels using a time? 7
Slot of 2 bits: Show the out with four arbitrary inputs:-
(i)What is the frame rate?
(ii)What is the frame duration?
(iii)What is the bit rate?
(iv)Whit is the bit duration?,
5. (a) Name 'the advantages, of optical fiber over twisted pair and conial cable. 3
(b)How does sky propagation differ from line of sight propagation? 3
(c)Discuss about wireless, transmission waves
(d)Describe the need for switching and define a swatch
(e)Compare space-division and time-division switches,
6. Write short notes (any four) :-
5x4=20
(a) Digital switch;
(b) Cellular Communications;
(c) Stop-and-wait ARQ;
(d) VSAT; (e) QPSK; (f) X=25 Protocols.
Question Bank | 517
B.Sc (HONS) IN CSE, PART-II, FOURTH SEMESTER EXAMINATION, 2013
Subject Code: CSE-226
Examination Code: 614
[Data Communications)
Time--3 hours
Full marks 80
[N.R.-The figures in the right margin indicate full marks. Answer any four of the following
questions]
1(a) Define data communication. Draw and explain the simplified of data communication.
(b)Write down the difference between simplex and duplex transmission mode with suitable
example.
(c)Make a comparison between TCP/IP and OSI. 5
(d)Distinguish between connection oriented and connectionless protocol, 4
(e)Define protocol. List the key elements of protocol. ' 3
2(a) Name the types of transmission impairments. Briefly explain the different types of noise with
examples.
(b)What does the Nyquist theorem and Shannon capacity formula have to do with
communications? 4
(c)We have a channel 5KI-Iz bandwidth. If we want to send data at 150 bps, what is the minimum
SNR (dB)?
(d)Define frequency, spectrum, band width and buad rate with example. 4
3. (a) What is unguided transmission medial What are the drawback of this? 4
b .Briefly explain ASK, FSK, PSK and QAM techniques with the incipient 6 advantages and
disadvantages.
(c) Explain the Pulse Code Modulation (PCM) technique and state its limitation.
(b)How does sky propagation differ from line of sight propagation? 3
(c) Discuss about wireless, transmission waves
(d)Describe the need for switching and define a swatch
(e)Compare space-division and time-division switches,
6. Write short notes (any four) :-
5x4=20
(a)Digital switch;
(b)Cellular Communications;
(c)Stop-and-wait ARQ;
(d)VSAT;
(e)QPSK;
(f)X=25 Protocols.
518 | Question Bank
B.Sc (HONS) IN CSE, PART-II, FOURTH SEMESTER EXAMINATION, 2012
Subject Code: CSE-226
Examination Code: 614
(Data Communications)
Time--3 hours
Full marks 80
[N.R.-The figures in the right margin indicate full marks. Answer any four of the following
questions.]
1(a) Define data communication. Draw and explain the simplified of data communication.
(b)Write down the difference between simplex and duplex transmission mode with suitable
example.
(c)Explain' the functions of transport layer and network layer of ISO reference model.
(d)What is the different between a port address, a logical address and a physical address? 5
2(a) what is transmission impairments? Explain the types or transmission impairments. 6
(b)What do you mean by. Nyquist bandwidth and Shannon capacity rite? 2
(c)What are the bit rate and band rate? A signal is carrying four in each signal element. If 1006
signal elements are sent per second, find the bit rate and band rate 6
(d)Sketch the signal waveforms of NRZ-L, NRZ-4 and Manchester encoding scheme for 101100
111.
6
3.(a) What is multiplexing? Explain synchronous time division multiplexing techniques. 6
(b)Which of the three multiplexing techniques are common for fiber optic link? Explain the
mason. 4
(c)Two channels, one with a bit we of 150 kbp9 and another with a bit rate of 140 kbps arc to die
multiplexed using pulse slurring TDM with no synchronous bits. Answer the following questions:-
6
(i)What is the size of la franc in bits?
(ii)What is the frame rate?
(iii)What is the duration or, frame?
(iv)What is (he data rate?
(d)What is VSAT7 Discuss VSAT communication system with configuration.
4 (a) Describe ASK, FSK'and PSK with figure.
(b)Write down the digital signal encoding format.
(c)Explain error detection process.
5.(a) Describe the model of frame transmission for flow control. 6
(b)Describe Pie adaptive routing strategies in the packet switch network. 8
(c)What are the steps of sliding .window flow control? Describe. 6
6. Write short notes (any four) :-
(a) TCP/IP
(b) Channel capacity
(c)Wireless transmission
(d) CRC
(e) Digital switch
(f) Packet Switching Networks
Question Bank | 519
B.Sc (HOES.) IN CSE, PART-11, FOURTH SEMESTER EXAMINATION, 2011
Subject Code: CSE-226
Examination Code: 614
[Data Communications)
Time--3 hours
Full marks 80
[N.R.-The figures in the right margin indicate full marks. Answer any four of the following
questions.
1(a) Define standard. State and explain the characteristic of data Communication.
2+4=6
(b)What are the key Clements of protocol? 3
(c)Describe TCP/IP model. 6
(d)Briefly discuss about the Nyquist bandwidth and Shanon capacity formula. 5
2.(a) Define the terms frequency spectrum amid bandwidth of a signal. 3
(b)What types of impairments are, common in data communication Description of noise? 7
(c)Using Shannon's formula castigates the chancel capacity of a voice grad telephone line having
S/N ratio of 30dB and bandwidth 3400Hz. 4
(d)Name the coming guided transmission media and give the physical description application
1+3=4 areas and transmission characteristics of any one of them.
(e)Depict and describe VSAT Communication system and explain it. 3
3. (a) Why scrambling technique is used for digital to digital encoding? Depict and describe.B8Zs
or HDB3.
(b)Distinguish between AM, FM and PM. 5
(c)Describe CRC technique for error detection. 4
(d)Describe the procedure of dial up operation using the interface of EIA-232 interface. 5
4.(a) What is multiplexing? Describe synchronous. Time division multiplexing with figure.
(b)What is packet switching? Mention the advantage of packet Switching over circuit switching. 6
(c)Describe asynchronous transfer mode (ATM) with respect to switching mode, Packet size, ATM
cells. 5
(d)State necessity' of Frame Relay in communication network. 3
5.(a) With diagram, explain frequency division multiplexing (FDM) 4
(b)Distinguish between synchronous and statistical TDM. 3
(c)With diagram describet6c architecture of a three stage space Division switch. 5
(d)Describe the advantages and disadvantages of optical fiber and twisted pair cable in brief. 4
(e)Describe propagation of light though optical fiber. 4
6. Write short note with necessary diagram (any four) .- 5x4=20
(a)QPSK;
(b)HDLC;
(c)Null Medicine;
(d)Channel capacity.
520 | Question Bank
B.Sc (HONS) IN CSE, PART-II, FOURTH SEMESTER EXAMINATION, 2010
Subject Code: CSE-226
Examination Code: 614
[Data Communications)
Time--3 hours
Full marks 80
[N.R.-The figures in the right margin indicate full marks. Answer any four of the following
questions.]
1.(a) what is the fundamental purpose of data communication ?
(b) Describe the simplified Data communication Model with block diagram.
(c) Define Guided and Unguided Media?
(d) What are the activities of, each layer in the OSI 4yers
2.(a) Explain the bask principles of ASK and FSK (Data transition in digital to analog conversation.
(b)what is constellation diagram? Show the constellation diagram of OK.
(c)What do you mean by one coding and block coding? Encode the bit stream 10110101. By
Manchester and differential Manchester encoding techniques.
(d)What are bit rate and baud rate? A signal is carrying four bits in each signal element if
1000'digital elements are sent per second, Find the bit rate and baud rate.
3.(a) What is multiplexing ? Explain how FDM combines multiple signals into one FDM is on
analog multiplexing technique that combines analog signals.
(b).Discuss synchronous TDM with diagram. Distinguish between Multilevel TDM and Multiple
slots TDM.
(c).With a neat diagram explains the interleaving technique.
(d).Describe the "Setup Request" phase of a Virtual circuit Network (VCN)
4.(a).Construct the Hemming coqe for the bit sequence 10011101
(b).Assuming even parity. Find the panty bit for each of the following data units:
(i) 1001011 (ii) 1110111
(c).Given a remainder of 111, a data unit of 10110011 and a divisor of 1001, find whether there is
an error or not the data unit.
(d). what is a crossbar switch? What is the major limitation? Explain how a multistage switch
overcomes the limitations of the crossbar switch.
5.(a). Explain satellite transmission with VSA1 configuration.
(b).what are the important applications of satellite?
(c).What 6 the base of pulse code modulation? Why delta modulation is used?
(d).Data exchanges over a transmission. Line can be classified as frill duplex or half duplex.
Compare this two way of transmission
6(a).What is flow control?
Describe the process of stop and wait control with necessary diagram
(b).Explain the operation of stop and wait ARQ error control method in case of lost and damaged
frames.
(c).What is a sliding window? What is the purpose of it? A sliding window protocol uses a window
of side 15. How many bits are needed to define the sequence number?
(d).what is ISDN? Discuss different types of channels used in ISDN,
Question Bank | 521
B.Sc (HONS.) IN CSE, PART-II, FOURTH SEMESTER EXAMINATION, 2009
Subject Code: CSE-226
Examination Code: 614
[Data Communication)
Time--3 hours.
[N.R.-The figures in the right margin indicate full marks. Answer any four of the following
questions.]
1.(a) Illustrate 'a communication model in simplified form. 4
(b) Briefly describe major communication tasks that involved in data communication. 5
(c) Distinguish between LAN and WAN. 4
d) What do you mean by network protocol? Compare TCP/IP protocol, suite and OSI reference
model. “
2.(a) Define the terms frequency, spectrum and bandwidth of a signal.
(b) What are major transmission impairments? Explain. Write down about thermal noise.
(c) Using Shannon's formula, estimate the channel capacity of a voice grade 5 telephone line
having S/N ratio of sO4B and bandwidth 3400Hz.
(d) Name the common guided transmission media and give the physical description. Application
areas and transmission characteristics of any one of them.
3.(a) Write down the advantages of packet switching over circuit switching. 4
(b) Distinguish between datagram and virtual circuit with diagram. 6
(c) Write short notes on any two of the following:- 10
(i)Microwave transmission.
(ii)Time Division switch.
(iii)Cellular system.
(iv)Amplitude Modulation (AM).
4.(a) What are three popular ARQ mechanisms for error control in data communication? 3
(b) How does ARQ correct an error? 2
(c) How does Go-Bank-N ARQ differ from Selective Repeat ARQ? 3
(d) Write down the types of HDLC frames and give a brief description of each. 12
5.(a) Write down about basic characteristic of HDLC ‘protocol. Briefly explain information
format.
(b)With figure explain FDM; Distinguish between Synchronous and Statistical TDM.
4+3=7
(c) Explain CRC technique for error detection. 4
(d) Describe with diagram the advantages of multistage space division switch with diagram.
6.(a) Why is FM superior to AM? 3
(b) Compare the FM bañd width with the AM bandwidth’ 6
(c) What are the advantages QAM over ASK and PSK? 6
(d) Given a bandwidth of 5000 Hz for an 8-PSK signal. Calculate the band rate.
522 | Question Bank
B.Sc (HONS.) IN CSE THIRD YEAR, FIFTH SEMESTER EXAMINATION, 2021
ECONOMICS
[According to the New Syllabus]
Subject Code: 530207
Time-3 hours
Full marks-80
[N.B. The figures in the right margin indicate full marks. Answer any four questions.]
1. (a) Distinguish between positive economics and normative economics.
(b) What are the fundamental economics problems? How these problems can solved?
(c) What is opportunity cost?
(d) How the shape of Production Possibility Frontier (PPF) is affected by opportunity cost?
2. (a) What do you mean by movement and shift in demand? Explain graphically.
(b) What are the determining factors of demand? Explain.
(c) What do you mean by elasticity of demand? Graphically explain cross elasticity of demand.
(d) How is market equilibrium achieved with the help of demand and supply? Explain with
proper diagram.
3. (a) At the equilibrium point, Demand=Supply.-Explain.
(b) What are the factors responsible to change in the quantity of supply of a product?
(c) Define indifference curve? Write down the properties of indifference curve?
(d) Draw a budget line from the equation 500=100x+5y.What is 8 the slope of the equation?
4. (a) Describe the law of diminishing marginal return?
(b) Distinguish between fixed cost and variable cost.
(c)“Marginal revenue curve of a firm cannot be above its average revenue curve.”-Explain.
(d)Explain the law of returns to scale in the long run production. Why do we get decreasing
returns to scale?
5. (a) How does a consumer achieve maximum satisfaction by minimum expenditure? Illustrate
with the help of indifference curve.
(b) Describe two measurement methods of utility.
(c) Draw an Engel curve from ICC.
(d) Explain the relationship between TFC, TVC and TC.
6. (a) What does the firm reach in equilibrium position in a competitive market in short run?
(b) What do you mean by factor pricing?
(c) Wrie short note (any four):(i) Wants
(ii) Utility
(iii)Commodity
(iv) Capitalism
(v) Inferior Goods
(vi) Oligopoly Market.
Question Bank | 523
B.SC.(HON'S.)IN CSE, THIRD YEAR, FIFTH SEMESTER EXAMINATION, 2020
ECONOMICS
[According to the New Syllabus]
Subject Code: CSE-53020
Time-3 hours
1. (a)Define Economics. Discuss the scope of economics.
(b)Differentiate between microeconomics and macroeconomics.
(c)What are the factors of production?
(d)What is meant by budget constraint?
2. (a)Explain the law of diminishing marginal utility with exceptions.
(b)“No cost is fixed in the long run"-Explain it.
(c) Define isoquants and state its properties.
(d)Define total product, average product and marginal product
3. (a) The following are the demand and supply functions:
Qd=60-3P,Qs=20+P
(i) Determine equilibrium price and quantity in a perfectly competitive market mathematically
and graphically.
(ii) Determine Ed and Es, from the above equation.
(iii) What will be the effect on the market equilibrium if the government imposes a tax of Tk.4 on
each unit of the output?
(iv) (What will be the s effect on the market equilibrium if the government gives a subsidy of
Tk.2 on each unit of the output?
(b)What is short run average cost? Why is average cost curve generally 'U'shaped?
4. (a)Define the market. Explain the different forms of market.
(b) What is market equilibrium? Explain the market equilibrium with the help of demand and
supply curve.
(c)What do you mean by returns to scale? Explain and graphically show the points of optimum
production of constant, increasing and decreasing return to scale.
5. (a) Explain why the marginal cost curve cuts average cost curve and variable cost curve at
their minimum values.
(b)What is production function?
(c) How price and output are determined in monopolistic competition?
(d)What are the determinants of price elasticity of demand?
6. (a)What do you mean by marginal rate of substitution?
(b)Explain the terms Ed=1,Ed>1 and Ed<1.
c) What is budget line? Draw a budget line from an imaginary budget equation.
(d)Define demand. Draw an individual demand curve from the law of demand.
524 | Question Bank
B.Sc (HONS.) IN CSE, BART-II, FOURTH SEMESTER EXAMINATION, 2017
ECONOMICS
Subject Code: GED-227
Examination Code: 614
Time-3 hours
Full marks 80
[N.R.-The figures in the right margin indicate full marks. Answer any four of the following
questions.
1.(a) The central problem of economics is the allocation of scarce resources for the satisfaction of
unlimited wants."--Discuss. 5
(b)Distinguish between Micro Economics and Macro Economics. 5
(c)Define demand. Draw an Individual Demand Curve from the law of demand 6
(d)What are the determinants of demand? Explain. 4
2.(a) What do you mean by utility? Explain the law of diminishing marginal utility using necessary
diagrams. 6
(b)What is short run average cost? Why is average cost curve generally U shaped?
(c)Define production function with input-output relationships,. 4
(d)Discuss the different types of returns to scale. 6
3. (a) "The high rate of Inflation degraded the living standard of people."-Do you agree with the
statement Explain? 5
(b)What do you mean by multiplier? "The higher the MPC, the highest will be the value of
multiplier."---Explain. 5
(c)Explain the significance of the equation c = a + by. Derive a saving function from an arbitrary
consumption function and - graphically. Explain. 6
(d) Define Monetary Policy and Fiscal Policy with their distinct features. 4
4. (a) What is Market Equilibrium? Explain Market Equilibrium with the help of demand and
supply curve. 7
(b) What are the determinants of price elasticity of demand? 4
(c) Show the difference between cardinal and ordinal utility. 3
(d) Describe the Law of Diminishing Marginal Utility' with example. 6
5. (a) Explain the idea of consumer's surplus. 4
(b) What do you mean by marginal rate of substitution? 4
(c) Explain the law of variable proportion, what is the optimum stage of production and why? 7
(d) Explain the concepts of opportunity cost. 5
6. (a) Draw a consumption curve from a given consumption function 300+0,5y and explain the
nature of the consumption curve. 6
(b) Prove that 0< MPC < 1.
(c) What is marginal efficiency of capital (MEC)? Why MEC curve is downward slopped+
(d)Make a short note about (any three) :--
(i)GDP
(ii)CPI
(iii)Demand pull inflation (iv)Inflationary gaps (v)Scarcity and selection problem
Question Bank | 525
B.Sc (HONS) IN CSE, BART-II, FOURTH SEMESTER EXAMINATION, -2016
GED-227
(Economics)
Examination Code: 614
Time-3 hours
Full marks-80
[N.R.-The figures in the right margin indicate full marks. Answer any four of the following
questions.
1.(a) What do you mean by resource allocation and economic efficiency? 6
Show the differences between positive and normative economics.
(b)What are the determinants of demand? 4
(c)What do you mean by shift in demand curve? 4
(d)Explain the fundamental problems of economic organization? 6
How these problems can be solved?
2(a) what are the differences between elastic and inelastic demand? 5
(b)Explain the relationship between total and marginal utility. 6
(c)What is production function? Discuss the differences between fixed factors and variable factors
of production. 5
(d)How technological change can affect the production function? 4
3. (a) Define opportunity cost. Why short run AC curve is ’U’-Shaped? 5
(b)What are returns to scare? Discuss the different phases of returns to scale. 6
(c)Why does supply curve slope upward? 3
(d)Explain the law of Diminishing Marginal Returns’ with exceptions. 6
4.(a) Graphically explain the circular flow of national income. 5
(b)Prove that, (i) APC + APS =1, (ii) MPC + MPS = 1. 4
(c)Define investment. What are the determinants of investment? 5
(d) Write short notes on any two of the following -- 3
x2=6
(i) Market equilibrium, (ii) Envelope curve; (iii) Aggregate; demand and Aggregate Supply;
(iv) GDP deflator.
5.(a) In the short and long run identification the production function.
5(b) Describe three stages of the law of variable proportion in production function. 6
(c) What is Explicit and implicit cost? 4
(d) Explain AFC, AVC and ATC with curve. 5
6.(a) Why is there need a separate theory of macro economics? Explain. 4
(b) State and Proof. I = S, For National Income in Saving-Investment. 6
(c) Briefly explain Circular flow in two sector economy. 5
(d) Implication the Value Added Method to measure National Income. 5
526 | Question Bank
B.Sc (HONS.) IN CSE; BART-II, FOURTH SEMESTER EXAMINATION, -2015
GED-227
(Economics)
Examination Code: 614
Time-3 hours
Full marics-80
[N. B. —the figures in right margin indicate full marks. Answer any four questions.]
1(a) what are the determinants of supply? Explain Law of Supply. 5
(b) Define Market Equilibrium. Discuss the impact of change in Demand on Market Equilibrium.
7
(c) What is the difference between Demand. schedule and Demand curve? 4
(d) What do you mean by Contraction and Extension of Demand?
2.(a) What is Demand 7 Describe rim Law off demand With exceptions. 6
(b) Graphically prove that at the Equilibrium Point -Demand =Supply 5
(c) Describe the "Law of Diminishing. Marginal Utility ' with example 5
(d) Describe different cases of elasticity with graphs. 4
3.(a) What do you mean by scarcity and selection problem? 5
(b) Show the difference between-cardinal and ordinal utility. 5
(c) Should you define the term "Market"? Classify Market in terms of competition.
(d) Explain the idea of consumer's surplus.
4.(a) Define MEC and MEIL.
(b) Explain the economic significance of equation.
(c) What do you mean by APC and MPC? 4
(d) Explain the Kuznet's puzzle about consumption. 6
5.(a) What are the characteristics of a perfectly competitive market 4
(b) Explain short-run equilibrium of a firm in perfectly. 6
(c) Define nominal GNP and real GNP. 4
(d) What are the problems in computing national income? 6
6.(a) Briefly discuss about the concept of multiplier. 4
(b) Make 'a short note about (any three) :
(i)GNP
(ii)Monopoly Market
(iii)Production Possibility Curve; -
(iv)Personal Income;
(v)Consumer Price Index (CPI).
(c)What is Marginal Efficiency of Capital (MEC)? Why MEC curve is downward Slopped? 5
(d)"The: high rate of inflation degraded .the living standard of people --Do you agree with the
statement? Explain. 5
Question Bank | 527
B.Sc (HONS) IN CSE; BART-II, FOURTH SEMESTER EXAMINATION, -2014
GED-227
(Economics)
Examination Code: 614
Time-3 hours
Full marks-80
[N. B. —the figures in right margin indicate full marks. Answer any four questions.]
1(a) Briefly discuss the fundamental problems of economics. How does price theory solve these
problems? 6
(b)Explain the production possibility curve with figure. 6
(c)Show the difference between microeconomics and macro- economics 4
(d)Is economics, positive or normative? 4
2.(a) What do you mean by shift in demand curve?
(b)State the "Law of Diminishing Return" with example.
(c)Explain market equilibrium with the help of demand and Supply curve. 7
(d)What are the determinants of demand? Explain law of demand. 5
3.(a) What do you mean by elasticity? What are the different types of elasticity? 5
(b)How would you define "Market"? What are the different forms of market? 3
(c)Discuss the differences between perfect competitive market and monopoly market function?
6
(d)What do you mean by production function indicates? 4
4.(a) Define short -run and tong-run production function. 2
(b)What is the optimum stage of production and why? 5
(c)What is short-run average cost? Why is average cost curve generally ‘U’ shaped? 5
(d)Explain profit maximizing conditions with the help of MR and S MC curve. 5
(e) Explain the least cost rule? 3
5.(a) Illustrate the concept of GDP. Discuss different method of GDP calculation. 5
(b)What are the basic differences between GDP and GNP? How can NNP be calculated from GDP?
5
(c)What do you mean by MPC and MPS? Prove that MPC + MPS = 1. 5
(d)Graphically explain the circular flow national income. 5
6.(a) Define monetary policy and fiscal policy with their distinct features. 5
(b)Discuss about the concept of multiplier and accelerator. 5
(c)Define personal income and disposable income.
(d)A high rate of Unemployment stagnant the economic welfare of a country-Explain. 6
528 | Question Bank
B.Sc (HONS.) IN CSE; BART-II, FOURTH SEMESTER EXAMINATION, -2013
GED-227
Examination Code: 614
Time-3 hours
Full marks-80
[N. B. —The figures in right margin indicate full marks. Answer any four questions]
1.(a) "The central problem of economics is the allocation of scarce resources for the satisfaction of
unlimited wants"-- Discuss.
(b)Distinguish between positive and nonnative economics. 4
(c)What is demand? Draw a demand curve from a demand schedule. 4
(d)Why does demand curve slope downward? 4
(e)Is Economics a science or an -arts? Explain. 3
2 (a)State the law of demand with diagram,
Suppose you are a buyer of a specific product. How can you reach the equilibrium condition
through the interaction with the seller? 6
(c)What is the determinants of supply? Why supply curve is upward slopped? 5
(d)Discuss about different exceptional demand curve. 4
3.(a) Define total product, average product and marginal product. 4
(b)What is return to scale? Graphically show the points of optimum production of constant;
increasing and decreasing return to scale. 5
(c)Describe implicit and opportunity cost. 2
(d)"No cost is fixed in the long rim"--Explain it. 4
(e)Explain the envelope curve. 5
4.a) Define macroeconomics. Discuss the subject-matters of macroeconomics. 4
(b)What is NEW? 2
(c)Explain graphically the circular flow of national income under simple two sector economy. 5
(d)Describe the different methods of measuring national income. 5
(e)Discuss the difficulties of measuring national income. 4
5.(a) What is production function? 3
(b) State about the law of diminishing returns. 6
(c) What will happen in production function if technology is: developed in a significant manner?
4
d) Draw the relationship between total, average and marginal cost of production. 4
(e) Describe different types of market. 3
6.(a) Macroeconomics play an. important tote in the economic welfare of a country-Explain. 5
Make a short note-any (any three):- 2x3-=6
(i) GDP;
(ii) National income;
(iii) MPC;
(iv)Disposable income
(c)What is marginal efficiency of capital (MEC)? Why MEC curve slopped downward?
(d)Briefly discuss about the concept of multiplier.
Question Bank | 529
B.Sc (HONS) IN CSE, BART-II, FOURTH SEMESTER EXAMINATION, -2012
GED-227
(Economics)
Examination Code: 614
Time-3 hours
Full marks-80
[N. B. —the figures in right margin indicate full marks. Answer any four questions.]
1. (a) State the definition of economics. 3
(b)"The scope of economics is very large”-Is it true? Describe. 4
(c)Distinguish between Microeconomics and Macroeconomics. 5
(d)What are the basic problem of an economic organization? Explain. 4
(e)Describe the concept of production Possibility Frontier (PPF) with example. 4
2(a) Define about aggregate demand and aggregate supply. 4
(b)Discuss about te circular flow of income. 4
(c)What is market? Describe differs characteristics of a perfectly competitive market. 5
(d)What are the determinants of Investment? 3
(e)Define personal income and disposable income. 4
3.(a) What is marginal efficiency of capital? Why MEC curve slope downward? 4
(b) Distinguish Between MPC and MPS. 4
(c)Describe about the concept of multiplier and accelerator. 4
(d)Distinguish between GDP and GNP. 4
(e)What are the problem of national income accounting? 4
4.(a) What is elasticity? Describe dit7ercnt topes ct price elasticity. 6
(b)Explain the law of diminishing marginal utility with exceptions. 7
(c)Describe the two measurement method of utility. 4
(d)Define production function with input-output relationship. 3
5.(a) What is least cost rule? In which situation a producer will about down under perfectly
competitive market? 7
(b)What is market? Describe the classification of marked. 5
(c)Explain the equilibrium situation of a firm tinder monopoly market 7
6(a). Explain how income and employment determined under Keynesian model
(b)What happens we move from (lie equilibrium position of income and employment
determination?4
(c)Decline inflationary gap and dc0ationary gap.
(d)Explain Simon Kuzncts's Puzzle. 4
530 | Question Bank
B.Sc (HONS.) IN CSE, BART-II, FOURTH SEMESTER EXAMINATION, -2010
GED—227
(Economics)
Examination Code: 614
Time-3 hours
Full marks-80
[N. B. —the figures in right margin indicate full marks. Answer any four questions.]
1.(a) Define Economics . Describe the major branches of economics.
(b)What is demand? Draw a demand curve from a demand schedule
(c)What are the fundamental problems of economic organization" How these problems can be
solved?
(d)Is Economics a science or an art Explain?
2.(a) What is the law of supply ? Why supply curve is upward slopped 1 explains.
(b)What is elasticity? Narrate layout different types of elasticity.
(c)How can you reach the equilibrium point in a perfectly competitive market?
(d)Distinguish between total and marginal utility.
3.(a)What is the least cost rule ? In which situation a producer will shut down its production
under a perfectly competitive market?
(b)How technological change can affect the production function?
(c)Illustrate the law of diminishing marginal utility with exceptions
(d)Briefly discuss about the determinants of investment.
4.(a)What is market ? Describe the classification of market.
(b).What is inflation? What is the objective of macroeconomics?
(c).Make a short note:
(i) GDP deflator
(ii) National Income
(iii) CPL
(v) Disposable income.
5. (a) Distinguish between fiscal policy and monetary policy.
(b)Describe the interaction in between agree ate demand and aggregate supply.
(c). Describe different methods of national income accounting
(d).Why total cost falls as you increase the number of production.
6.(a)What is production possibility frontier ?
(b). Describe different determinates of Demand? What are the exceptions of law of Demand?
(c)Describe about total cost (TC), variable cost (VC) and margin haziest (MC) with example.
(d). Distinguish between perfect competition and monopoly market.
Question Bank | 531
B.Sc(HONS.)IN CSE THIRD YEAR,FIFTH SEMESTER EXAMINATION,2021
OPERATING SYSTEM
[According to the New Syllabus]
Time-3 hours
Full marks-80
[N.B. The figures in the right margin indicate full marks. Answer any four questions’
1. (a) What do you mean by operating system? Explain the services provided by an operating
system.
(b) Distinguish between command line interface and graphical user interface.
(c) Write down the advantages of micro-kernel system structure.
(d) (d) Discuss about hard real time and soft real time systems.
2. (a) What are the different states of process? Briefly explain the 2+4=6 contents of the Process
Control Block (PCB).
(b) Consider the following set of processes with the length CPU burst times are given in
milliseconds :
Process Burst Time Priority
P1 8 3
P2 3 1
P3 2 3
P4 1 4
P5 4 2
(Suppose that all the processes have arrived at time 0.)
(i) Draw Gantt charts illustrating the executing processes using FCFS, SJF, non-preemptive
priority (a smaller priority number indicates a higher priority) and RR (time quantum=1)
scheduling.
(ii) Calculate the average waiting time of processes for each of the above scheduling
algorithms.
(iii) Calculate the average turnaround time of processes for each of the above scheduling
algorithms.
(c) What are context switch and dispatcher?
3. (a) What is thread? How does thread differ from process?
(b) Mention different types of scheduler with their functions.
(c) Briefly explain about the contents of Process Control Block (PCB).
(d) Describe different states of process with diagram.
4. (a) What is Dining Philosophers problem? How can this problem be solved by using
semaphore?
(b) Describe the properties of resource allocation graph. How can this be used to determine
whether or not a deadlock occurred?
(c) Write down Banker's algorithm for dead-lock avoidance.
532 | Question Bank
(d)
Allocation Max Available
A B C D A B C D A B C D
P1 0 0 1 2 0 0 1 2 1 5 2 0
P2 1 0 0 0 1 7 5 0
P3 1 3 5 4 2 3 5 6
P4 0 6 3 2 0 6 5 2
P5 0 0 1 4 0 6 5 6
With reference to Banker's algorithm-
i. What is the content of the matrix need?
ii. Is the system in a safe state?
iii. If a request from process P1 arrives for (0,4,2,0), can the request be granted immediately?
5. (a) What is paging? Briefly explain paging address translation scheme with TLB.
(b) Describe first-fit, best-fit and worst-fit algorithms for dynamic5 storage allocation
problem.
(c) Consider the following page reference string: 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1.
Assume 3 frames are available, how many page fault would occur for the following page
replacement algorithms:
(i) FIFO replacement
(ii) Optimal replacement
(iii) LRU replacement
Write down the difference between internal and external fragmentation. Which fragmentation can
be solved by compaction?
6. (a) Mention basic file operations and explain those.
(b) What are the advantages of virtual memory?
P2 1 4
P3 4 2
P4 0 6
Ps 2 3
Calculate the average waiting time and turnaround times for these processes with SJF, preemptive
SJF and RR scheduling. (Quantum time=1 ms)
4. (a)What do you mean by deadlock? Write down at least two real examples of deadlock.
(b)Briefly explain four necessary conditions for deadlock.
(c)What is infinite blocking? How can overcome from this type of situation?
(d) Consider the following snapshot of a system:
Allocation Max Available
A B C A B C A B C
0 1 0 7 5 3 3 3 2
2 0 0 3 2 2
3 0 2 9 0 2
2 1 1 2 2 2
0 0 2 4 3 3