Explain The Working of CPU New
Explain The Working of CPU New
Explain The Working of CPU New
ROLL #: 16956
TOPIC: COMPUTER
PROGRAM: PHARM. D
SEMESTER: 6TH
SESSION: 2017-2022
pg. 1
Contents
Question # 1....................................................................................................................................3
Explain the working of CPU:........................................................................................................3
Units of CPU:..............................................................................................................................3
Arithmetic and logic unit: (ALU):............................................................................................4
Functions:...................................................................................................................................5
Arithmetic operations................................................................................................................5
Types of shift:.............................................................................................................................7
Applications................................................................................................................................7
Computer unit:...........................................................................................................................8
QUESTION # 2............................................................................................................................13
Differentiate the following:.....................................................................................................13
A. Half duplex and full duplex.................................................................................................13
B. Impact printer and non-impact printer.............................................................................14
C. Difference between HDD and CD.......................................................................................16
D. Web site and web browser:..................................................................................................19
Advantages:..............................................................................................................................19
Question # 3..................................................................................................................................21
What is an operating system? Briefly describe scheduling techniques First come first
serve (FCFS), Shortest job first (SJF), Round robin scheduling.........................................21
Operating system:........................................................................................................................21
Types of operating system:......................................................................................................21
Functions of an operating system:..........................................................................................23
Applications:.............................................................................................................................24
Operating system types and examples:..............................................................................24
A. First come first secure scheduling:.....................................................................................26
Problems with FCFS Scheduling............................................................................................27
B. Short job first scheduling:...................................................................................................27
1. Non-Preemptive SJF.........................................................................................................28
pg. 2
2. Pre-emptive SJF................................................................................................................28
C. Round robin scheduling :.....................................................................................................29
Question # 4:.................................................................................................................................30
What is transmission media? Briefly describe transmission media with diagrams..........30
Transmission media:...................................................................................................................30
Means for transmitting radiations:........................................................................................30
Types of transmission:.............................................................................................................30
Types of media:........................................................................................................................31
Bending of a light ray:.............................................................................................................36
Multimode step index fiber:................................................................................................37
Multimode graded index fiber:...........................................................................................37
Single mode step index fiber:..............................................................................................37
Unguided media:......................................................................................................................39
Question # 5..................................................................................................................................39
Write a short note on the following........................................................................................39
A. Transmission media:............................................................................................................39
B. Volatile memory...................................................................................................................41
C. Internet..................................................................................................................................42
D. DBMS....................................................................................................................................43
pg. 3
Question # 1
CPU continually receives instructions to execute. Each instruction tells CPU to process data.
CPU performs all operations on data according to the given instructions it executes instructions
and tells otcxher parts of computer what to do. Most of the work consists of calculations and data
transfer.
Units of CPU:
CPU consists of two main units:
pg. 4
Arithmetic and logic unit: (ALU):
It is a combinational digital circuit that plays arithmetic and bitwise operations on integer binary
numbers. This is in comparison to a floating-point unit (FPU), which operates on floating point
numbers. An ALU is a fundamental building block of many forms of computing circuits, which
include the central processing unit (CPU) of computer systems, FPUs, and graphic processing
unit (GPUs). A CPU, FPU or GPU may additionally include a multiple of ALUs.
The inputs to an ALU are the statistics to be operated on, known as operands, and a code
indicating the operation to be done; the ALU's output is the end result of the performed
operation. In many designs, the ALU also has popularity inputs or outputs, or each, which carry
data approximately a previous operation or the present day operation, respectively, between the
ALU and outside repute registers.
Signals
An ALU has a collection of input and output signals, which are the electric conductors used to
convey virtual signals between the ALU and external circuitry. When an ALU is working,
external circuits observe signals to the ALU inputs and, in response, the ALU produces and
conveys alerts to external circuitry through its outputs.
Data
A basic ALU has three parallel facts buses including two enter operands (A and B) and a result
output (Y). Each data bus is a set of signals that conveys one binary integer variety. Typically,
the A, B and Y bus widths (the quantity of signals comprising every bus) are identical and suit
the local word size of the outside circuitry (e.g., the encapsulating CPU or different processor).
Opcode
The opcode input is a parallel bus that conveys to the ALU an operation selection code, which is
an enumerated price that specifies the favored mathematics or common sense operation to be
carried out through the ALU. The opcode length (its bus width) determines the most wide variety
of various operations the ALU can perform; for example, a four-bit opcode can specify as much
as 16 specific ALU operations. Generally, an ALU opcode isn't always similar to a gadget
language opcode, though in some instances it may be without delay encoded as a bit subject
within a machine language opcode.
pg. 5
Status:
Outputs:
The repute outputs are various individual signals that carry supplemental facts about the result of
the contemporary ALU operation. General-cause ALUs generally have status signals including:
At the end of each ALU operation, the reputation output signals are generally stored in external
registers to make them to be had for destiny ALU operations (e.g., to put in force multiple-
precision arithmetic) or for controlling conditional branching. The collection of bit registers that
keep the register outputs are regularly treated as a single, multi-bit check in, that's known as the
"status register" or "condition code sign in".
Inputs:
The status inputs permit additional information to be made available to the ALU when acting an
operation. Typically, that is a single "carry-in" bit that is the stored carry-out from a preceding
ALU operation.
Functions:
A wide variety of simple arithmetic and bitwise good judgment functions are normally supported
with the aid of ALUs. Basic, trendy reason ALUs typically encompass those operations of their
repertoires:
Arithmetic operations
Addition: A and B are summed and the sum seems at Y and bring-out.
pg. 6
Addition with deliver: A, B and carry-in are summed and the sum seems at Y and carry-out.
Subtract: B is subtracted from A (or vice versa) and the difference appears at Y and carry-out.
For this characteristic, carry-out is efficiently a "borrow" indicator. This operation will also be
used to examine the magnitudes of A and B; in such cases the Y output can be ignored by way of
the processor, that's most effective interested in the popularity bits (especially 0 and poor) that
end result from the operation.
Subtract with borrow: B is subtracted from A (or vice versa) with borrow (carry-in) and the
distinction appears at Y and carried-out (borrow out).
Two's complement (negate): A (or B) is subtracted from 0 and the distinction appears at Y.
Increment: A (or B) is multiplied by way of one and the resulting value seems at Y.
Decrement: A (or B) is decreased through one and the ensuing value appears at Y.
Pass through: All bits of A (or B) seem unmodified at Y. This operation is usually used to
decide the parity of the operand or whether it's miles zero or poor, or to load the operand into a
processor register.
ALU shift operations purpose operand A (or B) to shift left or right (relying at the opcode) and
the shifted operand seems at Y. Simple ALUs usually can shift the operand by means of simplest
one bit role, whereas greater complex ALUs appoint barrel shifters that allow them to shift the
operand by using an arbitrary range of bits in a single operation. In all unmarried-bit shift
operations, the bit shifted out of the operand appears on carry-out; the value of the bit shifted into
the operand depends at the type of shift.
pg. 7
Types of shift:
1. Arithmetic shift:
The operand is treated as a two's complement integer, which means that the maximum
massive bit is a "sign" bit and is preserved.
2. Logical shift:
A common sense zero is shifted into the operand. This is used to shift unsigned integers.
3. Rotate:
The operand is handled as a round buffer of bits so its least and most huge bits are
correctly adjoining.
4. Rotate thru bring:
The deliver bit and operand are together treated as a round buffer of bits.
Applications
1. Multiple-precision arithmetic:
It is an algorithm that operates on integers which might be larger than the ALU phrase size. To
do that, the algorithm treats each operand as an ordered series of ALU-length fragments,
arranged from most significant (MS) to least-significant (LS) or vice versa. For instance, inside
the case of an eight-bit ALU, the 24-bit integer 0x123456 could be treated as a collection of three
8-bit fragments: 0x12 (MS), 0x34, and 0x56 (LS). Since the dimensions of a fragment exactly
fits the ALU word length, the ALU can at once function in this "piece" of operand.
The set of rules makes use of the ALU to without delay function on specific operand fragments
and for this reason generate a corresponding fragment (a "partial") of the multi-precision end
result. Each partial, when generated, is written to an associated location of garage that has been
distinctive for the multiple-precision end result. This system is repeated for all operand
fragments a good way to generate a whole collection of partials, which is the result of the a
couple of-precision operation.
Complex operations:
Although an ALU can be designed to carry out complicated functions, the ensuing better circuit
complexity, value, power consumption and larger size makes this impractical in lots of instances.
Consequently, ALUs are frequently restricted to easy capabilities that can be done at very high
pg. 8
speeds (i.e., very short propagation delays), and the external processor circuitry is accountable
for performing complicated functions by way of orchestrating a chain of simpler ALU
operations.
For example, computing the square root of a number might be applied in diverse methods,
depending on ALU complexity:
Calculation in a single clock: a totally complex ALU that calculates a rectangular root in
a single operation.
Calculation pipeline: a set of easy ALUs that calculates a rectangular root in degrees,
with intermediate results passing via ALUs organized like a manufacturing unit
production line. This circuit can take delivery of new operands before finishing the
preceding ones and produces results as speedy because the very complex ALU, though
the effects are behind schedule with the aid of the sum of the propagation delays of the
ALU ranges. For extra data, see the article on instruction pipelining.
Iterative calculation: A easy ALU that calculates the rectangular root thru several steps
underneath the path of a manipulate unit.
Computer unit:
The control unit (CU) is a component of a central processing unit (CPU) that directs the
operation of the processor. It tells the computer reminiscence, arithmetic and logic unit and enter
and output devices a way to reply to the instructions which have been dispatched to the
processor.
It directs the operation of the opposite gadgets by way of imparting timing and manipulate
signals. Most computer assets are managed with the aid of the CU. It directs the flow of records
among the CPU and the alternative gadgets. John von Neumann protected the manipulate unit as
part of the von Neumann architecture. In present day computer designs, the control unit is
generally an internal a part of the CPU with its average function and operation unchanged
because its creation.
pg. 9
The simplest computer systems use a multicycle microarchitecture. These had been the earliest
designs. They are nonetheless famous in the very smallest computers, such as the embedded
systems that perform machinery.
In a multicycle computer, the manage unit frequently steps via the Von Neumann Cycle: Fetch
the practice, Fetch the operands, do the practice, write the results. When the subsequent
education is positioned within the manage unit, it modifications the conduct of the control unit to
complete the preparation successfully. So, the bits of the practice at once manage the manage
unit, which in turn controls the computer.
Multicycle manage gadgets commonly use both the growing and falling edges in their square-
wave timing clock. They operate a step in their operation on each fringe of the timing clock, in
order that a four-step operation completes in two cycles.
Many computer systems have distinct kinds of sudden occasions. An interrupt takes place due to
the fact some sort of input or output needs software interest if you want to function efficiently.
An exception is caused by the computer operation. One essential difference is that the timing of
an interrupt cannot be expected. Another is that a few exceptions (e.g. A reminiscence-not-
available exception) may be as a result of an practice that needs to be restarted.
In a pipelined computer, the manipulate unit arranges for the drift to start, keep, and prevent as a
application commands. The practice information is commonly surpassed in pipeline registers
from one stage to the next, with a really separated piece of manage good judgment for each
stage. The control unit also assures that the coaching in every stage does not harm the operation
pg. 10
of commands in other stages. For instance, if two levels ought to use the identical piece of
information, the control logic assures that the uses are completed in the precise series.
When working efficiently, a pipelined computer will have an training in every degree. It is then
working on all of these instructions at the identical time. It can finish about one practice for each
cycle of its clock. When a program makes a decision, and switches to a unique series of
instructions, the pipeline every so often ought to discard the records in process and restart. This
is referred to as a "stall." When commands may want to intrude, every so often the manage unit
have to forestall processing a later practice until an earlier instruction completes. This is referred
to as a "pipeline bubble" due to the fact part of the pipeline isn't always processing instructions.
Pipeline bubbles can arise while two instructions function on the equal sign in.
Control gadgets use many methods to preserve a pipeline full and avoid stalls. For example, even
simple manage devices can assume that a backwards department, to a lower-numbered, in
advance preparation, is a loop, and could be repeated. So, a manipulate unit with this design will
continually fill the pipeline with the backwards department route. If a compiler can come across
the maximum frequently-taken path of a branch, the compiler can just produce instructions so
that the maximum often taken department is the preferred course of department. In a like way, a
manipulate unit would possibly get hints from the compiler: Some computer systems have
instructions that may encode suggestions from the compiler approximately the course of branch.
Some manage units do department prediction: A manipulate unit continues an digital listing of
the current branches, encoded by way of the cope with of the branch training. This listing has
some bits for every department to remember the course that turned into taken maximum lately.
Some manage gadgets can do speculative execution, in which a laptop might have or greater
pipelines, calculate each directions of a branch, then discard the calculations of the unused
direction.
Results from memory can turn out to be available at unpredictable times because very rapid
computers cache reminiscence. That is, they reproduction constrained quantities of memory
records into very rapid reminiscence. The CPU ought to be designed to technique on the very
rapid speed of the cache reminiscence. Therefore, the CPU may stall when it should get entry to
pg. 11
foremost memory directly. In modern-day PCs, essential reminiscence is as a whole lot as 3
hundred times slower than cache.
A manipulate unit can be designed to complete what it can. If several instructions can be finished
at the same time, the manage unit will set up it. So, the quickest computers can technique
instructions in a series which could vary rather, depending on whilst the operands or guidance
locations turn out to be to be had. Most supercomputers and lots of PC CPUs use this approach.
The exact organization of this type of control unit depends on the slowest a part of the pc.
When the execution of calculations is the slowest, commands drift from memory into pieces of
electronics referred to as "problem devices." An problem unit holds an practice until each its
operands and an execution unit are available. Then, the guidance and its operands are "issued" to
an execution unit. The execution unit does the guidance. Then the ensuing statistics is moved
right into a queue of facts to be written back to memory or registers. If the computer has more
than one execution devices, it is able to typically do several instructions in keeping with clock
cycle.
It is not unusual to have specialized execution devices. For example, a modestly priced pc would
possibly have most effective one floating-point execution unit, due to the fact floating factor
gadgets are highly-priced. The equal computer may have several integer gadgets, because these
are exceedingly cheaper, and may do the bulk of instructions.
One form of manipulate unit for issuing uses an array of electronic common sense, a
"scoreboard" that detects whilst an guidance may be issued. The "peak" of the array is the range
of execution devices, and the "length" and "width" are every the range of sources of operands.
When all of the items come together, the alerts from the operands and execution unit will cross.
The good judgment at this intersection detects that the education can paintings, so the practice is
"issued" to the unfastened execution unit. An opportunity style of issuing manage unit
implements the Tomasulo set of rules, which reorders a hardware queue of commands. In a few
experience, each patterns make use of a queue. The scoreboard is an alternative way to encode
and reorder a queue of commands, and some designers call it a queue table.
pg. 12
Translating manipulate units
Some computers translate each single education into a series of less complicated instructions.
The benefit is that an out of order computer can be less difficult in the bulk of its logic, at the
same time as handling complicated multi-step commands. X86 Intel CPUs because the Pentium
Pro translate complicated CISC x86 commands to extra RISC-like internal micro-operations.
In those, the "the front" of the control unit manages the translation of commands. Operands aren't
translated. The "back" of the CU is an out-of-order CPU that issues the micro-operations and
operands to the execution devices and records paths.
Functions:
Thus a program of instructions in memory will cause the CU to configure a CPU's data flows to
manipulate the data correctly between instructions. This results in a computer that could run a
complete program and require no human intervention to make hardware changes between instructions (as
had to be done when using only punch cards for computations before stored programmed computers with
CUs were invented).
Hardwired control units are implemented through use of combinational logic units, featuring a
finite number of gates that can generate specific results based on the instructions that were used
to invoke those responses. Hardwired control units are generally faster than the
microprogrammed designs.
The concept of microprogramming was introduced with the aid of Maurice Wilkes in 1951 as an
intermediate level to execute computer application commands. Microprograms had been
organized as a sequence of microinstructions and stored in special manage memory. The
algorithm for the microprogram control unit, in contrast to the hardwired control unit, is typically
specified by way of flowchart description. The important advantage of the microprogram control
unit is the simplicity of its shape. Outputs of the controller are prepared in microinstructions and
that they may be easily replaced.
pg. 13
QUESTION # 2
Differentiate the following:
Full duplex:
In a complete-duplex machine, each parties can speak with each other simultaneously. An
example of a full-duplex tool is a cellphone; the parties at both ends of a name can communicate
and be heard by using the other party simultaneously. The earphone reproduces the speech of the
far off birthday celebration as the microphone transmits the speech of the nearby birthday party
because there may be a -manner verbal exchange channel between them, or extra strictly
speaking because there are verbal exchange channels among them.
Half duplex
pg. 14
In a half-duplex device, each events can speak with every other, however not concurrently; the
verbal exchange is one course at a time. An instance of a half of-duplex device is a walkie-talkie
-manner radio that has a "push-to-communicate" button; when the nearby user wishes to speak to
the faraway individual they push this button, which activates the transmitter however turns off
the receiver, so they can-not listen the faraway character. To concentrate to the opposite
character they release the button, which turns on the receiver but turns off the transmitter.
Systems that do not need the duplex capability may rather use simplex communique, in which
one tool transmits and the others can best "pay attention". Examples are broadcast radio and
television, garage door openers, child monitors, wireless microphones, and surveillance cameras.
In these devices, the communique is simplest in one path.
Impact Printers:
It is a type of printer that works with the aid of direct touch of an ink ribbon with paper. These
printers are typically loud however continue to be in use these days because of their specific
capacity to characteristic with multipart bureaucracy. An impact printer has mechanisms
comparable to the ones of a typewriter. Example of Impact Printers, Dot-matrix printers, Daisy-
wheel printers, and line printers.
pg. 15
Non-Impact Printers:
It is a kind of printer that does not hit or effect a ribbon to print. They used laser, xerographic,
electrostatic, chemical and inkjet technologies. Non-impact printers are typically tons quieter.
They are less in all likelihood to want preservation or upkeep than in advance impact printers.
pg. 16
paper
Dot-matrix printer, Daisy wheel inkjet printers, photo printers, laser
printers, line printer are examples. printers are examples.
A hard disc drive - frequently abbreviated to hard drive - and hard drive are not very similar
things, however they are bundled as a unit and either term can allude to the entire unit.
In a computer, a HDD is usually found in the drive cover and is associated with the motherboard
by means of an ATA, SATA or SCSI link. The HDD is likewise associated with a force flexibly
unit and can keep put away information while shut down.
Various disk platters that are situated around an axle inside a fixed chamber. The
chamber likewise incorporates read-and-compose heads and motors.
The motor is utilized to turn the platters, which hold the information, at up to 15,000
revolutions for every moment (a higher rpm number outcomes in quicker execution). As
pg. 17
the platters turn, a subsequent motor controls the situation of the read-and-put down
heads that attractively account data to, and read data from, tracks on every platter.
External HDDs
Most HDDs are found inside in a computer and work as expressed previously. In any case,
people can likewise buy external hard drives. external hard drives can be utilized to grow the
capacity limit, or go about as a convenient spot to back information up to. An external hard drive
can associate with a PC or gadget through a USB 2.0 interface or with eSATA. external hard
drives may likewise have more slow information move rates contrasted with internal HDDs.
Compact disc:
CD is scanned by a laser beam for the reproduction of recorded sound and other information.
Since its commercial introduction in 1982, the audio CD has almost completely replaced
the phonograph disc (or record) for high-fidelity recorded music. Coinvented by Philips
Electronics NV and Sony Corporation in 1980, the compact disc has expanded beyond audio
recordings into other storage-and-distribution uses, notably for computers (CD-ROM) and
entertainment systems (DVD).
Mechanical Features
pg. 18
Physical characteristics
A trendy CD is a hundred and twenty mm (4.Seventy five inch) in diameter and 1.2 mm (0.05
inch) thick. It consists of a clear polycarbonate plastic substrate, a reflective metallic layer, and a
clean protecting coating of acrylic plastic. The reflective metal layer is in which audio statistics
is examine within the shape of minuscule (as quick as zero.83 micrometre) depressions (pits) and
contrasting flat areas (lands) that are organized in a spiral tune (groove) winding from the disc’s
internal hole to its outer edge. The centres of adjoining grooves are spaced 1.6 micrometres
(0.0016 mm) apart. A smaller CD unmarried (80 mm [3.1 inches] in diameter) is likewise used
for audio distribution.
By the mid-1990s, but, traits in laptop era advanced such that CD recording and replication may
want to keep away from the want for a virtual tape master. High-first-rate sound recordings
might be sent from the microphone or other tool without delay to pc applications whose digital
documents could be stored on the computer’s difficult disk (or magnetic garage media) before
being transferred to a CD.
laser scanner
The laser scanning method employed in compact disc players. An infrared laser is targeted onto
the metallic reflective layer of the disc, wherein a spiral track of “pits” and “lands” represents the
zeros and ones of digital alerts. The go back sign is transformed via a photodiode sensor into a
virtual electric signal, that is converted to analog form for copy of the original recorded sound.
pg. 19
Optical recording, delivered by means of Sony Corporation and Philips Electronics N.V. In
1982, allows correct replica of sound over without a doubt the whole range of human hearing.
Working:
When a disc is inserted into a CD player, the disc’s track is scanned through a low-intensity
infrared laser with a 1-micrometre-diameter focal factor. In order for the laser to keep a
consistent scanning rate, the disc’s rotation price decreases from 500 to two hundred revolutions
in step with minute because the mild beam spirals out from the disc’s centre. (Some CD players
use two extra lasers to help manipulate the disc’s rotation and the scanning laser’s attention.)
When the mild beam strikes a land, it is pondered lower back to a photodiode, and an electrical
pulse is generated. When the light beam strikes a pit, however, no electric pulse is generated.
This is due to the fact light pondered from the pit, which has a depth of approximately one-area
the wavelength of the scanning infrared beam (0.78 micrometre), is out of segment with mild
contemplated from the adjoining separation track, and hence the reflected mild is decreased
underneath the level vital to spark off the photodiode. Each “dark” pit on the music is interpreted
(based on its period) as a chain of 0s in binary logic, and each “bright” land is interpreted (once
more based on its period) as a series of 1s. A tool known as a virtual-to-analog convertor is
essential to translate—and correct for records misinterpret because of minor floor blemishes at
the disc or imperfect laser alignment—this binary statistics into audio alerts for playback.
The central page of a website is called a home page. This is usually the first page you see when
you call a website up and can also be called a ‘start page’ or ‘index page’. From here onwards,
the user delves into the site’s subpages.
Types of web-sites
1. Static website
2. Dynamic website
Static website
pg. 20
Advantages:
Static websites are cheap to operate.
HTML documents are created once and are delivered unmodified from then on.
If a static website is used to provide timeless information, it is clearly more low-
maintenance than a dynamic website.
They are also a lot faster since the websites are loaded by the server without any changes.
Static websites are usually cheaper to host because the server doesn’t have any further
demands to carry out apart from the storage option.
Disadvantages:
Outdated information has to be manually replaced on the HTML pages of a static
website, which takes a lot of effort.
This requires relevant programming knowledge.
An FTP program for transferring HTML documents on the web server is also required.
Dynamic website:
Advantages:
Dynamic websites benefit from their flexibility.
Due to the strict separation of web content and layout, content changes can be made by
users without any former programming knowledge.
A text editor is usually available.
Dynamic websites also have the advantage of being able to react to user input.
Disadvantages:
Creating a dynamic website generally needs a management system (CMS or web shop
system).
As well as basic HTML knowledge, setting up the system also requires a further
programming language, such as Perl or PHP.
The server on which the system is hosted must have a database.
Depending on the size of the project, dynamic websites demand a lot more server
resources than static website projects.
Web-browser:
A web browser (usually called a browser) is a software program software for having access to
data on the World Wide Web. When a person requests an internet page from a selected internet
site, the net browser retrieves the vital content from a web server and then shows the page at the
screen.
A net browser isn't the identical aspect as a seek engine, even though the two are regularly
pressured. For a user, a seek engine is only a internet site, which includes Google Search, Bing,
pg. 21
or DuckDuckGo, that stores searchable records about different websites. However, to connect to
an internet site's server and show its web pages, a user to have an internet browser hooked up.
Function:
The purpose of a web browser is to fetch information resources from the Web and display them
on a user's device.
This process begins when the user inputs a Uniform Resource Locator (URL), such as http//en.
Web browser. Org/ into the browser. Virtually all URLs on the Web start with either http: or
https: which means the browser will retrieve them with the Hypertext Transfer Protocol (HTTP).
In the case of https:// the communication between the browser and the web
server is encrypted for the purposes of security and privacy.
Once a web page has been retrieved, the browser's rendering engine displays it on the user's
device. This includes image and video formats supported by the browser. Web pages usually
contain hyperlinks to other pages and resources. Each link contains a URL, and when it
is clicked or tapped, the browser navigates to the new resource. Thus the process of bringing
content to the user begins again.
Most browsers use an internal cache of web page resources to improve loading times for
subsequent visits to the same page. The cache can store many items, such as large images, so
they do not need to be downloaded from the server again. Cached items are usually only stored
for as long as the web server stipulates in its HTTP response messages.
Question # 3
What is an operating system? Briefly describe scheduling techniques First
come first serve (FCFS), Shortest job first (SJF), Round robin scheduling
Operating system:
Operating system is soft-ware that manages computer hardware, software resources and provide
common service for computer programs.
For hardware features together with input and output and memory allocation, the working
machine acts as an intermediary between programs and the computer hardware, although the
application code is typically carried out immediately by way of the hardware and frequently
makes system calls to an OS characteristic or is interrupted through it. Operating structures are
determined on many devices that contain a computer – from mobile phones and video game
consoles to internet servers and super-compute.
pg. 22
Types of operating system:
1. Single-tasking and multi-tasking operating system:
A single-tasking device can best run one software at a time, while a multi-tasking working
device lets in multiple software to be going for walks in concurrency. This is completed via time-
sharing, where in the to be had processor time is divided among more than one technique. These
approaches are every interrupted time and again in time slices by a mission-scheduling
subsystem of the running device. Multi-tasking can be characterized in pre-emptive and co-
operative types. In pre-emptive multitasking, the working gadget divide the CPU time and
dedicates a slot to every of the packages. Unix-like working structures, such as Solaris and Linux
—in addition to non-Unix-like, consisting of Amiga OS—help preemptive multitasking.
Cooperative multitasking is executed via relying on every system to offer time to the other
methods in a described way. Sixteen-bit variations of Microsoft Windows used cooperative
multi-tasking; 32-bit variations of both Windows NT and Win9x used preemptive multi-tasking.
pg. 23
walks digital machines. The technique is used each in virtualization and cloud computing
management, and is common in huge server warehouses.
It offers a user input (UI) through a command line interference (CLI) or graphic UI (GUI); it launches and
manages the software execution; and it identifies and exposes gadget hardware assets to those packages --
normally, thru a standardized application program interference (API).
1. User input:
Every running machine requires a UI, permitting users and administrators to engage with the OS so one
can installation, configure or even troubleshoot the working device and its underlying hardware. There
are two number one varieties of UI to be had: CLI and GUI.
pg. 24
The CLI, or terminal mode window, provides a textual content-primarily based interface where
customers depend on the traditional keyboard to enter precise instructions, parameters and
arguments associated with particular tasks.
The GUI, or computer, affords a visible interface based totally on icons and emblems where users
depend upon gestures introduced with the aid of human interface devices, including touchpads,
touchscreens and mouse gadgets.
The GUI is most regularly utilized by casual or give up customers that are primarily interested in
manipulating documents and packages, such as double-clicking a document icon to open the file in its
default software. The CLI remains famous amongst advanced users and machine directors that need to
cope with a series of surprisingly granular and repetitive instructions on an everyday foundation,
including developing and making scripts to set up new personal computers (PCs) for employees.
3. Application management.
An operating system handles the launch and management of each software. This usually supports an array
of behaviors, which includes timesharing a couple of tactics, or threads, in order that numerous duties can
proportion the to be had processors' time; handling interruptions that programs produce to benefit a
processor's immediate interest, making sure there's enough memory to execute the utility and its
corresponding statistics without interfering with other procedures; carrying out error handling which
could gracefully eliminate an application's approaches; and acting memory control with-out disrupting
other programs or the OS.
An operating system also can assist APIs that permit programs to make use of OS and hardware
capabilities without the need to recognize anything about the low-degree OS or hardware country. As an
instance, a Windows API can allow an application to acquire enter from a keyboard or mouse; create GUI
elements, including dialog home windows and buttons; examine and write files to a garage device; and
extra. Applications are almost continually tailor-made to use the operating device on which the
application intends to run.
Applications:
In a multitasking operating system, wherein more than one programs may be strolling on the
same time, the OS determines which applications must run in what order and how much time
must be allowed for each utility before giving every other software a turn.
It handles input/output (I/O) to and from attached hardware devices, together with difficult disks,
printers and dial-up ports.
It sends messages to each application or interactive consumer -- or to a device operator --
approximately the repute of operation and any mistakes which could have took place.
It can offload the control of batch jobs -- as an example, printing -- so that the starting up utility is
free of this work.
On computer systems which could offer parallel processing, an operating system can manage a
way to divide this system so that it runs on a couple of processors at a time.
pg. 25
Operating system types and examples:
Although the fundamental roles of an operating system are ubiquitous, there are countless
operating systems that serve a wide range of hardware and user needs:
Windows
Mac OS
Unix
Linux
2. Mobile operating system. Mobile operating systems are designed to accommodate the
unique needs of mobile computing and communication-centric devices, such as
smartphones and tablets. Mobile devices typically offer limited computing resources
compared to traditional PCs, and the OS must be scaled back in size and complexity in
order to minimize its own resource use, while ensuring adequate resources for one or
more applications running on the device. Mobile operating systems tend to emphasize
efficient performance, user responsiveness and close attention to data handling tasks,
such as supporting media streaming.
pg. 26
Apple iOS
Google Android
3. Embedded operating system. Not all computing devices are general purpose. A huge
assortment of dedicated devices -- including home digital assistants, automated teller
machines (ATMs), airplane systems, retail point of sale (POS) terminals and internet of
things (IoT) devices -- includes computers that require an operating system. The principal
difference is that the associated computing device only does one major thing, so the OS is
highly stripped down and dedicated to both performance and resilience. The OS should
run quickly, not crash, and handle all errors gracefully in order to continue operating in
all circumstances
When a computing device must interact with the real world within constant and
repeatable time constraints, the device manufacturer may opt to use a real-time operating
system (RTOS). For example, an industrial control system may direct the operations of a
sprawling factory or power plant. Such a facility will produce signals from myriad
sensors and also send signals to operate valves, actuators, motors and countless other
devices. In these situations, the industrial control system must respond quickly and
predictably to changing real-world conditions -- otherwise, disaster may result. An RTOS
must function without buffering, processing latencies and other delays, which are
perfectly acceptable in other types of operating systems.
pg. 27
RTOSes include FreeRTOS and VxWorks.
First Come First Serve, is just like FIFO(First in First out) Queue data structure, where the
data element which is added to the queue first, is the one who leaves the queue first.
This is used in Batch Systems.
It's easy to understand and implement programmatically, using a Queue data structure,
where a new process enters through the tail of the queue, and the scheduler selects process
from the head of the queue.
A perfect real life example of FCFS scheduling is buying tickets at ticket counter.
It is Non Pre-emptive algorithm, which means the system precedence would not rely.
If a system with very least priority is being completed, more like day by day routine backup
technique, which takes more time, and all of a sudden a few other excessive precedence
system arrives, like interrupt to keep away from machine crash, the excessive priority
process will must wait, and hence in this example, the device will crash, just due to wrong
process scheduling.
Not foremost Average Waiting Time.
Resources usage in parallel isn't feasible, which ends up in Convoy Effect, and therefore bad
resource (CPU, I/O and so on) utilization.
pg. 28
B. Short job first scheduling:
Shortest Job First (SJF) is a set of rules wherein the procedure having the smallest execution time is
selected for the subsequent execution. This scheduling method may be preemptive or non-preemptive. It
considerably reduces the common waiting time for other approaches watching for execution.
Non-Preemptive SJF
Preemptive SJF
1. Non-Preemptive SJF
In non-preemptive scheduling, as soon as the CPU cycle is allotted to manner, the method holds it till it
reaches a ready state or terminated.
2. Pre-emptive SJF
In Preemptive SJF Scheduling, jobs are put into the ready queue as they come. A process with
shortest burst time begins execution. If a process with even a shorter burst time arrives, the
current process is removed or preempted from execution, and the shorter job is allocated CPU
cycle.
Advantages of SJF
Here are the advantages of the usage of SJF method:
pg. 29
For the batch gadget of long-time period scheduling, a burst time estimate may be received
from the job description.
For Short-Term Scheduling, we need to expect the value of the following burst time.
Probably gold standard with regard to common turnaround time.
Disadvantages of SJF
Here are a few drawbacks/cons of SJF algorithm:
Job completion time must be known in advance, but it's miles tough to expect.
It is frequently used in a batch machine for long term scheduling.
SJF cannot be carried out for CPU scheduling for the short time period. It is due to the fact
there may be no specific approach to expect the period of the imminent CPU burst.
This algorithm might also purpose very lengthy turnaround instances or hunger.
Requires information of ways long a process or job will run.
It results in the starvation that does not lessen average turnaround time.
It is hard to recognize the length of the CPU request.
Elapsed time have to be recorded, that effects in greater overhead on the processor.
pg. 30
quantum.
4. While performing a round-robin Gantt chart seems to come too big (if
scheduling, a particular time quantum time is less for scheduling. For
quantum is allocated to different Example:1ms for big scheduling.)
jobs.
5. Each process get a chance to Time consuming scheduling for small
reschedule after a particular quantum’s.
quantum time in this scheduling.
Question # 4:
What is transmission media? Briefly describe transmission media with
diagrams.
Transmission media:
A transmission medium is something that can mediate the propagation of signals for the
purposes of telecommunication.
Signals are typically imposed on a wave of some kind suitable for the chosen medium. For
example, data can modulate sound and a transmission medium for sounds may be air, but solids
and liquids may also act as the transmission medium. Vacuum or air constitutes a good
transmission medium for electromagnetic waves such as light and radio waves. While material
substance is not required for electromagnetic waves to propagate, such waves are usually
affected by the transmission media they pass through, for instance by absorption or
by reflection or refraction at the interfaces between media. Technical devices can therefore be
employed to transmit or guide waves. Thus, an optical fiber or a copper cable are used as
transmission media.
Means for transmitting radiations:
Electromagnetic radiation can be transmitted through an optical medium, such as optical fiber, or
through twisted pair wires, coaxial cable, or dielectric-slab waveguides. It may also pass through
any physical material that is transparent to the specific wavelength, such as water, air, glass,
or concrete. Sound is, by definition, the vibration of matter, so it requires a physical medium for
transmission, as do other kinds of mechanical waves and heat energy. Historically, science
incorporated various theories to explain the transmission medium. However, it is now known
that electromagnetic waves do not require a physical transmission medium, and so can travel
through the "vacuum" of free space. Regions of the insulative vacuum can
pg. 31
become conductive for electrical conduction through the presence of free electrons, holes,
or ions.
Types of transmission:
Simple transmission
In this type signals are transmitted only in one direction i.e. only one station can transmit
and other can only receive data
Half duplex
In this type of transmission both stations can transmit but only one at one time
Full duplex
Full duplex transmission allow both stations to transmit at the same time, in this type
medium is carried the signals in both directions at a same time.
Types of media:
2. Coaxial cable
3. Fiber optics
A twisted pair consists of conductors (usually copper), each with its very own plastic insulation,
twisted collectively. One of those wires is used to carry indicators to the receiver, and the other is
pg. 32
used most effective as ground reference. The receiver makes use of the distinction between the
two. In addition to the sign sent with the aid of the sender on one of the wires, interference(noise)
and crosstalk may additionally affect each wires and create unwanted signals. If the two wires
are parallel, the effect of these undesirable indicators isn't the identical in each wires because
they are at unique locations relative to the noise or crosstalk sources. This effects in a difference
at the receiver.
UTP cables encompass 2 or 4 pairs of twisted cable. Cable with 2 pair use RJ-eleven connector
and four pair cable use RJ-45 connection.
Advantages
Installation is simple
Flexible
Cheap
It includes two insulating copper wires (1mm thick). The wires are twisted together in a helical
shape to reduce electrical interference from comparable pair.
Disadvantage
pg. 33
Bandwidth is low when compared with Coaxial Cable
It has equal attenuation as unshielded twisted pair. It is faster the unshielded and coaxial cable. It
is more pricey than coaxial and unshielded twisted pair
Advantages
Easy to install
Performance is ok
Eliminates crosstalk
Disadvantages
Difficult to manufacture
Heavy
pg. 34
One way to measure the overall performance of twisted-pair cable is to compare attenuation
versus frequency and distance. As proven in the underneath figure, a twisted-pair cable can skip
a wide variety of frequencies. However, with increasing frequency, the attenuation, measured in
decibels in keeping with kilometre (dB/km), sharply will increase with frequencies above
100kHz. Note that gauge is a measure of the thickness of the cord.
Applications
In phone strains to provide voice and statistics channels. The DSL strains that are used by the
telephone groups to provide excessive-information-charge connections also use the excessive-
bandwidth functionality of unshielded twisted-pair cables.
Local Area Network, together with 10Base-T and 100Base-T, additionally use twisted-pair
cables.
2. Coaxial Cable
Coaxial is called via this call because it consists of conductors which can be parallel to each
other. Copper is used on this as center conductor which may be a stable twine or a widespread
one. It is surrounded by PVC set up, a sheath that is encased in an outer conductor of steel foil,
board or both.
Outer metal wrapping is used as a shield in opposition to noise and as the second conductor
which completes the circuit. The outer conductor is likewise encased in an insulating sheath. The
outermost element is the plastic cowl which protects the complete cable
Requirement
50-Ohm RG-7 or RG-eleven : used with thick Ethernet.
pg. 35
Standards
Coaxial cables are classified via their Radio Government(RG) ratings. Each RG wide variety
denotes a unique set of physical specifications, which include the cord gauge of the internal
conductor, the thickness and the form of the internal insulator, the development of the protection,
and the dimensions and sort of the outer casing.
The BNC connector is used to attach the cease of the cable to the tool, consisting of a TV set.
The BNC T connector is used in Ethernet networks to branch out to a connection to a pc or
different tool. The BNC terminator is used at the end of the cable to prevent the mirrored image
of the sign.
Types
1. Base-Band
This is a 50 ohm (Ω) coaxial cable that's used for virtual transmission. It is commonly used for
LAN's. Baseband transmits a single signal at a time with very excessive pace. The important
downside is that it desires amplification after each 1000 ft.
2. Broad-Band
This makes use of analog transmission on widespread cable television cabling. It transmits
numerous simultaneous signal the use of exceptional frequencies. It covers large region whilst in
comparison with Baseband Coaxial Cable.
pg. 36
3. Fiber Optic Cable
A fibre-optic cable is made of glass or plastic and transmits signals in the form 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.
If the angle of incidence is greater than the critical angle, the ray reflects(makes a turn)
and travels again in the denser substance.
If the angle of incidence is equal to the critical angle, the ray refracts and moves parallel
to the surface.
Note: The critical angle is a property of the substance, and its value differs from one substance to
another.
Optical fibres use reflection to guide light through a channel. A glass or plastic core is
surrounded by a cladding of less dense glass or plastic. The difference in density of the two
materials must be such that a beam of light moving through the core is reflected off the cladding
instead of being refracted into it.
pg. 37
Propagation Modes of Fiber Optic Cable
Multimode step index fiber:
In multimode step-index fiber, the density of the core remains constant from the centre to the
edges. A beam of light moves through this constant density in a straight line until it reaches the
interface of the core and the cladding.
The term step-index refers to the suddenness of this change, which contributes to the distortion
of the signal as it passes through the fiber.
pg. 38
The decrease in density results in a critical angle that is close enough to 90 degree to make the
propagation of beams almost horizontal.
Advantages
Fiber optic has several advantages over metallic cable:
Higher bandwidth
Light weight
Disadvantages
There are some disadvantages in the use of optical fibre:
High Cost
Some cable TV companies use a combination of optical fiber and coaxial cable thus creating
a hybrid network.
Local-area Networks such as 100Base-FX network and 1000Base-X also use fiber-optic cable.
pg. 39
Unguided media:
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
Terrestrial
Satellite.
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.
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.
Geeks has prepared a complete interview preparation course with premium videos, theory,
practice problems, TA support and many more features.
Question # 5
Write a short note on the following
A. Transmission media:
A transmission medium is something that can mediate the propagation of signals for the purposes
of telecommunication.
Signals are typically imposed on a wave of some kind suitable for the chosen medium. For
example, data can modulate sound and a transmission medium for sounds may be air, but solids
and liquids may also act as the transmission medium. Vacuum or air constitutes a good
pg. 40
transmission medium for electromagnetic waves such as light and radio waves. While material
substance is not required for electromagnetic waves to propagate, such waves are usually
affected by the transmission media they pass through, for instance by absorption or
by reflection or refraction at the interfaces between media. Technical devices can therefore be
employed to transmit or guide waves. Thus, an optical fiber or a copper cable are used as
transmission media.
Electromagnetic radiation can be transmitted through an optical medium, such as optical fiber, or
through twisted pair wires, coaxial cable, or dielectric-slab waveguides. It may also pass through
any physical material that is transparent to the specific wavelength, such as water, air, glass,
or concrete. Sound is, by definition, the vibration of matter, so it requires a physical medium for
transmission, as do other kinds of mechanical waves and heat energy. Historically, science
incorporated various theories to explain the transmission medium. However, it is now known
that electromagnetic waves do not require a physical transmission medium, and so can travel
through the "vacuum" of free space. Regions of the insulative vacuum can
become conductive for electrical conduction through the presence of free electrons, holes,
or ions.
pg. 41
B. Volatile memory
Volatile reminiscence, in evaluation to non-risky reminiscence, is computer reminiscence that
requires electricity to hold the saved statistics; it keeps its contents even as powered on however
while the power is interrupted, the saved facts is fast lost.
Volatile reminiscence has several uses together with as number one storage. In addition to
generally being quicker than sorts of mass storage which includes a difficult disk force, volatility
can shield sensitive information, because it will become unavailable on power-down. Most of the
overall-reason random-get right of entry to memory (RAM) is unstable.
Types
1. Dynamic
2. Static
It may be very popular due to its cost effectiveness. DRAM shops every bit of facts in a
distinctive capacitor in the integrated circuit. DRAM chips want simply one single capacitor and
one transistor to save each bit of facts. This makes it space green and cheaper.
The most important benefit of static RAM (SRAM) is that it is plenty faster than dynamic RAM.
Its downside is its high rate. SRAM does not need continuous electric refreshes, but it
nevertheless calls for constant modern to maintain the difference in voltage. Every single bit in a
static RAM chip desires a cellular of six transistors, whereas dynamic RAM calls for best one
capacitor and one transistor. As a end result, SRAM is not able to perform the storage
capabilities of the DRAM own family. SRAM is typically used as CPU cache and for processor
registers and in networking gadgets.
C. Internet
The net is a globally linked community system that uses TCP/IP to transmit data through diverse
styles of media. The internet is a network of global exchanges – which includes personal, public,
pg. 42
commercial enterprise, instructional and authorities’ networks – connected by using guided,
wireless and fiber-optic technologies.
The phrases net and World Wide Web are frequently used interchangeably, but they may be now
not precisely the same issue; the net refers to the global conversation system, such as hardware
and infrastructure, at the same time as the web is one of the services communicated over the
internet.
This is the internet’s number one component and communications backbone. Because the IP is
constructed from hardware and software program layers, the IP communication general is used to
deal with schemes and become aware of specific connected devices. Prominent IP variations
used for communications encompass
Communications:
The internet is the maximum price-effective communications method inside the world, in which
the following offerings are immediately available:
Instant messaging
Internet forums
Social networking
Online shopping
Financial services
History:
pg. 43
The internet communication originated with the U.S. Government, which began constructing a
computer network within the Sixties called ARPANET. In 1985, the U.S. National Science
Foundation (NSF) commissioned the improvement of a college community spine referred to as
NSFNET.
The device changed into changed via new networks operated by using business net provider
companies in 1995. The net changed into delivered to the public on a larger scale at round this
time.
D. DBMS
A database management machine (DBMS) is a software bundle designed to define, control,
retrieve and control records in a database. A DBMS normally manipulates the records itself, the
facts format, discipline names, document shape and report structure. It additionally defines
guidelines to validate and manipulate these facts.
A DBMS relieves users of framing programs for facts upkeep. Fourth-era query languages, along
with SQL, are used at the side of the DBMS bundle to interact with a database.
Examples:
MySQL
SQL Server
Oracle
dBASE
FoxPro
A database control gadget receives education from a database administrator (DBA) and
therefore instructs the machine to make the important modifications. These commands can be to
load, retrieve or modify current statistics from the machine.
Forms of DBMA:
Relational Database:
Data is organized as logically unbiased tables. Relationships among tables are proven via
shared records. The data in a single desk may also reference comparable statistics in other
pg. 44
tables, which keeps the integrity of the links among them. This characteristic is called
referential integrity – an crucial idea in a relational database device. Operations such as "pick"
and "be part of" can be done on these tables. This is the most broadly used system of database
employer.
Flat Database:
Data is prepared in a single kind of document with a set wide variety of fields. This database
kind encounters more mistakes because of the repetitive nature of statistics.
Object-Oriented Database:
Hierarchical Database:
Data is prepared with hierarchical relationships. It turns into a complicated network if the one-
to-many courting is violated.
pg. 45