Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 47

PLATFORM TECHONOLOGY

BSIT 2

MLAF.PAZ
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

Objectives:
Upon completion of this lesson, you should be able to:
 To understand the basic components of a computer operating system and the interactions among the
various components.
 To understand the functions of an operating system
 To analyze and differentiate the types of memory inside a computer.
 To understand the different types of an Operating System.

What is a Platform?

Hardware + Software + Networks = Platform

 In general, a computing platform is any pre-existing hardware environment, a piece of software that is
designed to run within it, and any associated facilities used with it.
 A platform is any base of technologies on which other technologies or processes are built.
 Most services that the end users use will be built on top of platforms.

GENERATIONS OF COMPUTING

1. (1945–55) Vacuum Tubes • Punch cards and machine language programming

 The first generation of computers used vacuum tubes as a major piece of technology. Vacuum
tubes were widely used in computers from 1940 through 1956. Vacuum tubes were larger
components and resulted in first generation computers being quite large in size, taking up a lot of
space in a room. Some of the first-generation computers took up an entire room.

 The ENIAC is a great example of a first-generation computer. It consisted of nearly 20,000 vacuum
tubes, 10,000 capacitors, and 70,000 resistors. It weighed over 30 tons and took up a lot of space,
requiring a large room to house it. Other examples of first-generation computers include the
EDSAC, IBM 701, and Manchester Mark 1.

2. (1955–65) Transistors and Batch Systems • Mainframes (IBM 1401, IBM 7094), FORTRAN compiler
 The second generation of computers saw the use of transistors instead of vacuum tubes.
Transistors were widely used in computers from 1956 to 1963. Transistors were smaller than
vacuum tubes and allowed computers to be smaller in size, faster in speed, and cheaper to build.

 The first computer to use transistors was the TX-0 and was introduced in 1956. Other computers
that used transistors include the IBM 7070, Philco Transac S-1000, and RCA 501.

page. 1
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

3. (1965–1980) ICs and Multiprogramming • IBM System/360, OS/360, multiprogramming, timesharing,


MULTICS

 The third generation of computers introduced the use of IC (integrated circuits) in computers. Using
IC's in computers helped reduce the size of computers even more compared to second-generation
computers, and make them faster.

 Nearly all computers since the mid to late 1960s have utilized IC's. While the third generation is
considered by many people to have spanned from 1964 to 1971, IC's are still used in computers
today. Over 45 years later, today's computers have deep roots going back to the third generation.

 This invention makes computers smaller in size, reliable, and efficient. The remote processing, time-
sharing, and multiprogramming operating systems were used in this generation. The integrated
circuits were small in size, less power consuming and less expensive than transistors which are
used in the previous generation of computer. The high-level languages were improved in these
types of computers.

Features of the third generation

1. The integrated circuits (ICs) are used in the computer of this generation.
2. These computers are more reliable as compare to previous generations.
3. These are small in size.
4. The computer of the third generation supports the high-level language.
5. This consumed lesser electricity.
6. The AC is also required in this generation of computer.
7. The maintenance is not good in the third generation of computer.
8. The computers of this generation are faster in speed.
9. These types of computers generate less heat
10. These are very costly computers.

4. (1980–Present) Personal Computers • IBM PC, DOS, Macintosh, Windows, Linux

 The fourth generation of computers took advantage of the invention of the microprocessor, more
commonly known as a CPU. Microprocessors, along with integrated circuits, helped make it
possible for computers to fit easily on a desk and for the introduction of the laptop.

page. 2
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

 Some of the earliest computers to use a microprocessor include the Altair 8800, IBM 5100, and
Micral. Today's computers still use a microprocessor, despite the fourth generation being
considered to have ended in 2010.

5. (1990–Present) Mobile Computers • PDAs, Symbian OS, Blackberry OS, Smartphones, iOS, Android
 The fifth generation of computers is beginning to use AI (artificial intelligence), an exciting
technology that has many potential applications around the world. Leaps have been made in AI
technology and computers, but there is still room for much improvement.

 One of the more well-known examples of AI in computers is IBM's Watson, which was featured
on the TV show Jeopardy as a contestant. Other better-known examples include Apple's Siri on
the iPhone and Microsoft's Cortana on Windows 8 and Windows 10 computers. The Google
search engine also utilizes AI to process user searches.

TRANSISTORS AND BATCH SYSTEMS

Steps:
1. Programmers bring cards to 1401. 4. 7094 does computing.
2. 1401 reads batch of jobs onto tape. 5. Operator carries output tape to 1401.
3. Operator carries input tape to 7094. 6. 1401 prints output.

ICs and Multiprogramming

page. 3
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

A multiprogramming system with three jobs in memory.

MODERN COMPUTERS
A modern computer consists of:
1. One or more processors
2. Main memory
3. Disks
4. Printers
5. Various input/output devices
Managing all these components requires a layer of software:
 the OPERATING SYSTEM
HARDWARE ARCHITECTURE
 A set of disciplines that describes a computer system by specifying its parts and their relations
provides physical environment.
 Hardware architecture is a view of the physical architecture, which represents the hardware
components and their interrelationships.
Before we start learning the language, we speak to give instructions to computers to develop software, we need
to learn a small amount about how computers are built. If you were to take apart your computer or cell phone
and look deep inside, you would find the following parts:

Common Types:
• Commodity computing platforms
page. 4
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

• Video game consoles


• RISC
• Midrange computers
• Mainframe computers
• Supercomputer
OPERATING SYSTEM

 A collection of software that manages computer hardware resources and provides common services for
computer programs.
o Every PC has to have one to run other applications or programs.
o It’s the first thing “loaded”.
 An Operating System (OS) is an interface between a computer user and computer hardware. An
operating system is a software which performs all the basic tasks like file management, memory
management, process management, handling input and output, and controlling peripheral devices such
as disk drives and printers.
 The operating system is an essential component of the system software in a computer system.
 Application programs usually require an operating system to function.
 Operating systems simplify and manage the complexity of running application programs efficiently.
 The most important program that runs on your computer.
 In simple terms, an operating system is a manager.
o It manages all the available resources on a computer, from the CPU, to memory, to hard disk
accesses.

page. 5
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

THE OPERATING SYSTEM AS AN EXTENDED MACHINE

Operating systems turn the ugly hardware details into beautiful abstractions for the use of other
software.
The Operating System as a Resource Manager

 Allow multiple programs to run at the same time


 Manage and protect memory, I/O devices, and other resources
 Includes multiplexing (sharing) resources in two different ways:
o In time
o In space

OPERATING SYSTEM CONCEPTS

 Processes
 Address spaces (Memory)
 Files
 Input/Output
 Protection
 The shell
 Development in computing over time
o Large memories
o Protection hardware
o Disks

page. 6
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

o Virtual memory

FUNCTIONS OF AN OPERATING SYSTEM

 Memory Management
o Management of Primary and Main Memory
o 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:
 Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are
not in use.
 In multiprogramming, the OS decides which process will get memory when and how
much.
 Allocates the memory when a process requests it to do so.
 De-allocates the memory when a process no longer needs it or has been terminated.
 Processor Management
o In multiprogramming environment, the OS decides which process gets the processor when and
for how much time.
o This function is called process scheduling. An Operating System does the following activities for
processor management:
 Keeps tracks of processor and status of process. The program responsible for this task
is known as traffic controller.
 Allocates the processor (CPU) to a process.
 De-allocates processor when a process is no longer required.
 Device Management
o An Operating System manages device communication via their respective drivers. It does the
following activities for device management −
 Keeps tracks of all devices. Program responsible for this task is known as the I/O
controller.
 Decides which process gets the device when and for how much time.
 Allocates the device in the efficient way.
 De-allocates devices.
 File Management
o A file system is normally organized into directories for easy navigation and usage. These
directories may contain files and other directions.
o An Operating System does the following activities for file management:

page. 7
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

 Keeps track of information, location, uses, status etc. The collective facilities are often
known as file system.
 Decides who gets the resources.
 Allocates the resources.
 De-allocates the resources.
 Security
o By means of password and similar other techniques, it prevents unauthorized access to
programs and data.
 Control over system performance
o Recording delays between request for a service and response from the system.
 Job accounting
o Keeping track of time and resources used by various jobs and users.
 Error detecting aids
o Production of dumps, traces, error messages, and other debugging and error detecting aids.
 Coordination between other software and users
o Coordination and assignment of compilers, interpreters, assemblers and other software to the
various users of the computer systems.

MULTITHREADED AND MULTICORE CHIPS


 MULTICORE

o Refers to a computer or processor that has more than one logical CPU core, and that can
physically execute multiple instructions at the same time. A computer's "core count" is the total
number of cores the computer has: computers may have multiple processors, each of which
might have multiple cores; the core count is the total number of cores on all of the processors.

page. 8
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

(a) A quad-core chip with a shared L2 cache.


(b) A quad-core chip with separate L2 caches.
Explanation: The small/fast caches built-in to other cores are there to speed up those cores. Sharing them
directly would probably cost more power (and maybe even more transistors / die area) than other ways of
increasing cache hit rate. (Power is a bigger limiting factor than transistor count or die area. That's why modern
CPUs can afford to have large private L2 caches).
Note: CACHE is a hardware or software component that stores data so that future requests for that data can be
served faster.
BENEFITS OF CACHES
 They make everything run faster. The key benefit of a cache is that it improves the performance of the
system. By storing local copies of web site files, for example, your browser only needs to download that
information the first time you visit, and can load the local files on subsequent visits.

 They save data. To help improve performance, apps store recently and frequently used data to the
cache. Not only does this allow everything to run faster as previously mentioned, but in some cases, it
can allow apps to work "offline." For example, if you don't have internet access, an app can rely on
cached data to continue to work even without a connection.

 They store data for later use. There's a lot of efficiency in only downloading files once. If a copy of a file
is stored in the cache, then the app doesn't need to waste time, battery power, and other resources
downloading it a second time. Instead, the app only needs to download changed or new files.
DOWNSIDES OF CACHES
While modern software depends heavily on the use of caches, they have some disadvantages as well:
 THEY CAN TAKE UP A LOT OF STORAGE SPACE. In principle, a cache is a small repository of files
used by an app. But some caches can grow exceedingly large and limit the free space on your device.
Clearing the cache can erase the files and recover a large amount of memory.

 A CORRUPTED CACHE CAN CAUSE THE APP TO BEHAVE BADLY. If there's something wrong with
a file stored in the cache, it can cause the app to display data incorrectly, glitch, or even crash. That's
why a common remedy for browser issues is clearing the cache.

page. 9
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

 CACHES CAN PREVENT APPS FROM LOADING THE LATEST VERSION OF A WEB PAGE OR
OTHER DATA. In theory, apps are supposed to only use the cache to display files unchanged since the
last visit. That doesn't always work, though, and sometimes the only way to see the latest version of a
web site or other info is to clear the cache, so the app is forced to download everything anew.
SOLUTION: CLEARNING THE CACHE
Given the downsides of cache, it makes practical sense to clear your cache as part of regular maintenance. In
addition to corrupted files, if a cache gets too large, or if your computer starts to run low on storage space, these
issues can also affect your PC's performance.
The solution is to "clear the cache," which deletes the files stored in the cache.
 The advantages of clearing the cache include freeing up previous storage space on your computer and
eliminating any files that might be causing it to misbehave.

 Unfortunately, clearing the cache also eliminates the files that are designed to make your computer run
more efficiently.

o For example, clearing a browser cache typically means you'll have to log into all your favorite
websites all over again, and you'll lose any special customizations or personalization you had
there, including the contents of shopping carts or baskets.

MULTITHREADING

 Refers to a program that can take advantage of a multicore computer by running on more than
one core at the same time. In general, twice as many cores equals twice as much computing
power (for programs that support multithreading) though some problems are limited by factors
other than CPU usage; these problems will not experience gains that are as dramatic from
multithreading.

 Multithreading is the ability of a program or an operating system process to manage its use by
more than one user at a time and to even manage multiple requests by the same user without
having to have multiple copies of the programming running in the computer.

 Each user request for a program or system service (and here a user can also
be another program) is kept track of as a thread with a separate identity. As

page. 10
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

programs work on behalf of the initial request for that thread and are
interrupted by other requests, the status of work on behalf of that thread is kept
track of until the work is completed.

 a THREAD is a sequence of responses to an initial message


Explanation: Most programs you will ever run will not need 3400 threads running at once. Also, a running thread
will consume all of a core. The only reason your CPU isn’t running at 100% all the time is that the operating
system knows how to suspend the processor, which basically makes it stop everything and wait until something
happens (such as an IO event or a clock tick).
NOTE: Only one thread can run on a core at once. Different threads running is actually just threads jumping
onto the CPU and running for short periods of time, then being switched out with other threads which also need
to run. It's important to note that performance is not the only reason programs use many threads.

MEMORY

• Questions when dealing with cache:


• When to put a new item into the cache.
• Which cache line to put the new item in.
• Which item to remove from the cache when a slot is needed.
• Where to put a newly evicted item in the larger memory.

COMPUTER MEMORY WORKS


If your computer's CPU had to constantly access the hard drive to retrieve every piece of data it needs, it would
operate very slowly. When the information is kept in memory, the CPU can access it much more quickly. Most
forms of memory are intended to store data temporarily.

page. 11
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

The diagram above, the CPU accesses memory according to a distinct hierarchy. Whether it comes from
permanent storage (the hard drive) or input (the keyboard), most data goes in random access memory (RAM)
first. The CPU then stores pieces of data it will need to access, often in a cache, and maintains certain special
instructions in the register.
All of the components in your computer, such as the CPU, the hard drive and the operating system, work
together as a team, and memory is one of the most essential parts of this team. From the moment you turn your
computer on until the time you shut it down, your CPU is constantly using memory. (Example scenario below)
SCENARIO:
1. You turn the computer on.
2. The computer loads data from read-only memory (ROM) and performs a power-on self-test (POST) to
make sure all the major components are functioning properly. As part of this test, the memory controller
checks all of the memory addresses with a quick read/write operation to ensure that there are no errors
in the memory chips. Read/write means that data is written to a bit and then read from that bit.
3. The computer loads the basic input/output system (BIOS) from ROM. The BIOS provides the most basic
information about storage devices, boot sequence, security, Plug and Play (auto device recognition)
capability and a few other items.
4. The computer loads the operating system (OS) from the hard drive into the system's RAM. Generally,
the critical parts of the operating system are maintained in RAM as long as the computer is on. This
allows the CPU to have immediate access to the operating system, which enhances the performance
and functionality of the overall system.
5. When you open an application, it is loaded into RAM. To conserve RAM usage, many applications load
only the essential parts of the program initially and then load other pieces as needed.
page. 12
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

6. After an application is loaded, any files that are opened for use in that application are loaded into RAM.
7. When you save a file and close the application, the file is written to the specified storage device, and
then it and the application are purged from RAM.
Analysis:
In the list above, every time something is loaded or opened, it is placed into RAM. This simply means that it has
been put in the computer's temporary storage area so that the CPU can access that information more easily.
The CPU requests the data it needs from RAM, processes it and writes new data back to RAM in a continuous
cycle. In most computers, this shuffling of data between the CPU and RAM happens millions of times every
second. When an application is closed, it and any accompanying files are usually purged (deleted) from RAM to
make room for new data. If the changed files are not saved to a permanent storage device before being purged,
they are lost.

TYPES OF COMPUTER MEMORY


A typical computer has:
1. Level 1 and level 2 caches
2. Normal system RAM
3. Virtual memory
4. A hard disk
Fast, powerful CPUs need quick and easy access to large amounts of data in order to maximize their
performance. If the CPU cannot get to the data it needs, it literally stops and waits for it. Modern CPUs running
at speeds of about 1 gigahertz can consume massive amounts of data, potentially billions of bytes per second.
The problem that computer designers face is that memory that can keep up with a 1-gigahertz CPU is extremely
expensive
Computer designers have solved the cost problem by "tiering" memory, by using expensive memory in small
quantities and then backing it up with larger quantities of less expensive memory.
The cheapest form of read/write memory in wide use today is the HARD DISK. Hard disks provide large
quantities of inexpensive, permanent storage. You can buy hard disk space for pennies per megabyte, but it can
take a good bit of time (approaching a second) to read a megabyte off a hard disk. Because storage space on a
hard disk is so cheap and plentiful, it forms the final stage of a CPUs memory hierarchy, called VIRTUAL
MEMORY.
VIRTUAL MEMORY is a common part of most operating systems on desktop computers. It has become so
common because it provides a big benefit for users at a very low cost. Most computers today have something
like 32 or 64 megabytes of RAM available for the CPU to use. Unfortunately, that amount of RAM is not enough
to run all of the programs that most users expect to run at once.

page. 13
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

For example, if you load the operating system, an e-mail program, a Web browser and word processor into RAM
simultaneously, 32 megabytes is not enough to hold it all. If there were no such thing as virtual memory, then
once you filled up the available RAM your computer would have to say, "Sorry, you can not load any more
applications. Please close another application to load a new one." With virtual memory, what the computer can
do is look at RAM for areas that have not been used recently and copy them onto the hard disk. This frees up
space in RAM to load the new application.
Because this copying happens automatically, you don't even know it is happening, and it makes your computer
feel like is has unlimited RAM space even though it only has 32 megabytes installed. Because hard disk space
is so much cheaper than RAM chips, it also has a nice economic benefit.
The read/write speed of a hard drive is much slower than RAM, and the technology of a hard drive is not geared
toward accessing small pieces of data at a time. If your system has to rely too heavily on virtual memory, you will
notice a significant performance drop. The key is to have enough RAM to handle everything you tend to work on
simultaneously -- then, the only time you "feel" the slowness of virtual memory is when there's a slight pause
when you're changing tasks. When that's the case, virtual memory is perfect.
When it is not the case, the operating system has to constantly swap information back and forth between RAM
and the hard disk. This is called thrashing, and it can make your computer feel incredibly slow.
The area of the hard disk that stores the RAM image is called a PAGE FILE. It holds pages of RAM on the hard
disk, and the operating system moves data back and forth between the page file and RAM. On a Windows
machine, page files have a .SWP extension.

THE NEXT LEVEL OF THE HIERARCHY IS RAM.


Random access memory (RAM) is the best-known form of computer memory. RAM is considered "random
access" because you can access any memory cell directly if you know the row and column that intersect at that
cell.
The opposite of RAM is serial access memory (SAM). SAM stores data as a series of memory cells that can
only be accessed sequentially (like a cassette tape). If the data is not in the current location, each memory cell is
checked until the needed data is found. SAM works very well for memory buffers, where the data is normally
stored in the order in which it will be used (a good example is the texture buffer memory on a video card).
RAM data, on the other hand, can be accessed in any order. Similar to a microprocessor, a memory chip is an
integrated circuit (IC) made of millions of transistors and capacitors. In the most common form of computer
memory, dynamic random-access memory (DRAM), a transistor and a capacitor are paired to create a memory
cell, which represents a single bit of data.
A capacitor is like a small bucket that is able to store electrons. To store a 1 in the memory cell, the bucket is
filled with electrons. To store a 0, it is emptied. The problem with the capacitor's bucket is that it has a leak. In a
matter of a few milliseconds a full bucket becomes empty. Therefore, for dynamic memory to work, either the
page. 14
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

CPU or the memory controller has to come along and recharge all of the capacitors holding a 1 before they
discharge. To do this, the memory controller reads the memory and then writes it right back. This refresh
operation happens automatically thousands of times per second.
The capacitor in a dynamic RAM memory cell is like a leaky bucket. It needs to be refreshed periodically or it will
discharge to 0. This refresh operation is where dynamic RAM gets its name. Dynamic RAM has to be
dynamically refreshed all of the time or it forgets what it is holding. The downside of all of this refreshing is that it
takes time and slows down the memory.

TYPES OF RAM
The following are some common types of RAM:
 SRAM: Static random access memory uses multiple transistors, typically four to six, for each memory
cell but doesn't have a capacitor in each cell. It is used primarily for cache.
 DRAM: Dynamic random access memory has memory cells with a paired transistor and capacitor
requiring constant refreshing.
 FPM DRAM: Fast page mode dynamic random access memory was the original form of DRAM. It waits
through the entire process of locating a bit of data by column and row and then reading the bit before it
starts on the next bit. Maximum transfer rate to L2 cache is approximately 176 MBps.
 EDO DRAM: Extended data-out dynamic random access memory does not wait for all of the processing
of the first bit before continuing to the next one. As soon as the address of the first bit is located, EDO
DRAM begins looking for the next bit. It is about five percent faster than FPM. Maximum transfer rate to
L2 cache is approximately 264 MBps.
 SDRAM: Synchronous dynamic random access memory takes advantage of the burst mode concept to
greatly improve performance. It does this by staying on the row containing the requested bit and moving
rapidly through the columns, reading each bit as it goes. The idea is that most of the time the data
needed by the CPU will be in sequence. SDRAM is about five percent faster than EDO RAM and is the
most common form in desktops today. Maximum transfer rate to L2 cache is approximately 528 MBps.
 DDR SDRAM: Double data rate synchronous dynamic RAM is just like SDRAM except that is has higher
bandwidth, meaning greater speed. Maximum transfer rate to L2 cache is approximately 1,064 MBps
(for DDR SDRAM 133 MHZ).
 RDRAM: Rambus dynamic random access memory is a radical departure from the previous DRAM
architecture. Designed by Rambus, RDRAM uses a Rambus in-line memory module (RIMM), which is
similar in size and pin configuration to a standard DIMM. What makes RDRAM so different is its use of a
special high-speed data bus called the Rambus channel. RDRAM memory chips work in parallel to
achieve a data rate of 800 MHz, or 1,600 MBps. Since they operate at such high speeds, they generate
much more heat than other types of chips. To help dissipate the excess heat Rambus chips are fitted
with a heat spreader, which looks like a long thin wafer. Just like there are smaller versions of DIMMs,
there are also SO-RIMMs, designed for notebook computers.

page. 15
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

 Credit Card Memory: Credit card memory is a proprietary self-contained DRAM memory module that
plugs into a special slot for use in notebook computers.
 PCMCIA Memory Card: Another self-contained DRAM module for notebooks, cards of this type are not
proprietary and should work with any notebook computer whose system bus matches the memory
card's configuration.
 CMOS RAM: CMOS RAM is a term for the small amount of memory used by your computer and some
other devices to remember things like hard disk settings.This memory uses a small battery to provide it
with the power it needs to maintain the memory contents.
 VRAM: VideoRAM, also known as multiport dynamic random access memory (MPDRAM), is a type of
RAM used specifically for video adapters or 3-D accelerators. The "multiport" part comes from the fact
that VRAM normally has two independent access ports instead of one, allowing the CPU and graphics
processor to access the RAM simultaneously.
 VRAM is located on the graphics card and comes in a variety of formats, many of which are
proprietary. The amount of VRAM is a determining factor in the resolution and color depth of the
display. VRAM is also used to hold graphics-specific information such as 3-D geometry data
and texture maps. True multiport VRAM tends to be expensive, so today, many graphics cards
use SGRAM (synchronous graphics RAM) instead. Performance is nearly the same, but
SGRAM is cheaper.

DISK (HARD DISC/ HARD DRIVE)

The hard drive, which typically provides storage for data and applications within a computer, has four key
components inside its casing -- the platter (for storing data), the spindle (for spinning the platters), the read/write
arm (for reading and writing data) and the actuator (for controlling the actions of the read/write arm).

page. 16
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

Four (4) Major Component of a Hard Drive


1. Platters

The platters are the circular discs inside the hard drive where the 1s and 0s that make up your files are
stored. Platters are made out of aluminum, glass or ceramic and have a magnetic surface in order to
permanently store data. On larger hard drives, several platters are used to increase the overall capacity
of the drive. Data is stored on the platters in tracks, sectors and cylinders to keep it organized and
easier to find.

2. The Spindle

The spindle keeps the platters in position and rotates them as required. The revolutions-per-minute
rating determines how fast data can be written to and read from the hard drive. A typical internal
desktop drive runs at 7,200 RPM, though faster and slower speeds are available. The spindle keeps the
platters at a fixed distance apart from each other to enable the read/write arm to gain access. (ref 1+3)

3. The Read/Write Arm

The read/write arm controls the movement of the read/write heads, which do the actual reading and
writing on the disk platters by converting the magnetic surface into an electric current. The arm makes
sure the heads are in the right position based on the data that needs to be accessed or written; it's also
known as the head arm or actuator arm. There is typically one read/write head for every platter side,
which floats 3 to 20 millionths of an inch above the platter surface.

4. Actuator

The actuator or head actuator is a small motor that takes instructions from the drive's circuit board to
control the movement of the read/write arm and supervise the transfer of data to and from the platters.
It's responsible for ensuring the read/write heads are in exactly the right place at all times.

5. Other Components

As well as the casing on the outside of the hard disk that holds all of the components together, the front-
end circuit board controls input and output signals in tandem with the ports at the end of the drive. No
matter what the type of drive, it has one port for a power supply and one port for transferring data and
instructions to and from the rest of the system.

page. 17
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

INPUT and OUTPUT DEVICES (I/O DEVICES)

(a) The steps in starting an I/O device and getting an interrupt.

(b) Interrupt processing involves taking the interrupt, running the interrupt handler, and returning to the
user program.

 An INTERRUPT I/O is a way of controlling input/output activity in which a peripheral or terminal


that needs to make or receive a data transfer sends a signal that causes a program interrupt to
be set.

page. 18
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

 Interrupt driven I/O is an alternative scheme dealing with I/O. Interrupt I/O is a way of controlling
input/output activity whereby a peripheral or terminal that needs to make or receive a data
transfer sends a signal.
At a time, appropriate to the priority level of the I/O interrupt, relative to the total interrupt system, the
processor enters an interrupt service routine (ISR). The function of the routine will depend upon the
system of interrupt levels and priorities that is implemented in the processor.

For input, the device interrupts the CPU when new data has arrived and is ready to be retrieved by the
system processor. The actual actions to perform depend on whether the device uses I/O ports or
memory mapping.

For output, the device delivers an interrupt either when it is ready to accept new data or to acknowledge
a successful data transfer. Memory-mapped and DMA-capable devices usually generate interrupts to
tell the system they are done with the buffer.

Here the CPU works on its given tasks continuously. When an input is available, such as when
someone types a key on the keyboard, then the CPU is interrupted from its work to take care of the
input data. The CPU can work continuously on a task without checking the input devices, allowing the
devices themselves to interrupt it as necessary.

page. 19
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

BASIC OPERATIONS OF INTERRUPT


1. CPU issues read command.
2. I/O module gets data from peripheral whilst CPU does other work.
3. I/O module interrupts CPU.
4. CPU requests data.
5. I/O module transfers data.

INTERRUPT PROCESSING

1. A device driver initiates an I/O request on behalf of a process.


2. The device driver signals the I/O controller for the proper device, which initiates the requested
I/O.
3. The device signals the I/O controller that is ready to retrieve input, the output is complete or that
an error has been generated.
4. The CPU receives the interrupt signal on the interrupt-request line and transfer control over the
interrupt handler routine.

page. 20
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

5. The interrupt handler determines the cause of the interrupt, performs the necessary processing
and executes a “return from” interrupt instruction.
6. The CPU returns to the execution state prior to the interrupt being signaled.
7. The CPU continues processing until the cycle begins again.

Advantages & Disadvantages of Interrupt Drive I/O


Advantages:
1. Fast 2. Efficient
Disadvantages:
1. can be tricky to write if using a low-level language
2. can be tough to get various pieces to work well together
3. usually done by the hardware manufacturer / OS maker, e.g. Microsoft

BUSES/ BUS
Alternatively known as an address bus, data bus, or local bus, a bus is a connection between
components or devices connected to a computer.
For example, a bus carries data between a CPU and the system memory via the motherboard.
You can think of a computer bus like public transportation or a school bus. These types of buses are
capable of transporting people from one destination to another destination. Like these buses, a
computer bus transmits data from one location or device to another location or device.
A computer bus maintains a strict schedule, "picking up" data and "dropping it off" at a regular
interval. For example, if a bus operates at a frequency of 200 MHz, it completes 200 million data
transfers per second.
The bus contains multiple wires (signal lines) with addressing information describing the memory
location of where the data is being sent or retrieved. Each wire in the bus carries a bit(s) of
information, which means the more wires a bus has, the more information it can address. For
example, a computer with a 32-bit address bus can address 4 GB of memory, and a computer with
a 36-bit bus can address 64 GB of memory.

TYPES OF COMPUTER BUSES


A bus is either a parallel or serial bus, and either an internal bus (local bus) or an external bus
(expansion bus).
page. 21
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

Internal bus vs. external bus


An internal bus enables the communication between internal components, such as a video card and
memory. An external bus is capable of communicating with external components, such as a USB or
SCSI device.
Parallel bus vs. serial bus
A computer bus can transmit its data using either a parallel or serial method of communication. With
a parallel bus, data is transmitted several bits at a time. However, with a serial bus, the data is
transferred one bit at a time.

Bus speeds
A computer or device's bus speed is measured in MHz, e.g., an FSB may operate at a frequency of
100 MHz. The throughput of a bus is measured in bits per second (Bps) or megabytes per
second(Mbps).

MOST POPULAR COMPUTER BUSES


Today, many of the buses listed above are no longer used or are not as common. Below is a listing
of the most common buses and how they are used with a computer.
1. eSATA and SATA - Computer hard drives and disc drives.
2. PCIe - Computer expansion cards and video cards.
3. USB - Computer peripherals.
4. Thunderbolt- Peripherals connected through a USB-C cable.

TYPES OF OPERATING SYSTEMS


• Mainframe operating systems
• Server operating systems
• Multiprocessor operating systems
• Personal computer operating systems
• Handheld operating systems
• Embedded operating systems
• Sensor node operating systems
• Real-time operating systems

page. 22
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

• Smart card operating systems

OPERATING SYSTEM
An operating system or OS is a software installed on a computer's hard drive that enables the computer
hardware to communicate and operate with the computer software. Without a computer operating system, a
computer and software programs would be useless.
When computers were first introduced, the user interacted with them using a command line interface, which
required commands. Today, almost every computer is using a GUI (Graphical User Interface) operating system
that's easy to use and operate.
THE OPERATING SYSTEM'S JOB
You've probably heard the phrase boot your computer, but do you know what that means?
Booting is the process that occurs when you press the power button to turn your computer on. During this
process (which may take a minute or two), the computer does several things:

1. It runs tests to make sure everything is working correctly.


2. It checks for new hardware.
3. It then starts up the operating system.
Once the operating system has started up, it manages all of the software and hardware on the computer. Most
of the time, there are many different programs running at the same time, and they all need to access your
computer's Central Processing Unit (CPU), memory, and storage.
The operating system coordinates all of this to make sure that each program gets what it needs. Without the
operating system, the software wouldn't even be able to talk to the hardware, and the computer would be
useless.

EXAMPLES OF COMPUTER OPERATING SYSTEMS


Below is a list of examples of different computer operating systems over the evolution of computers.
Reminder: The following operating systems are considered GPOS (general purpose operating systems).
Microsoft Windows
Microsoft Windows is the most common and used operating system on computers today, with Microsoft
Windows 10 being the most recently released version of Windows. The operating system is used PC
and IBM compatible computers.
Apple macOS
page. 23
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

With Apple computers, macOS is the primary operating system used with Apple desktop and laptop
computers.
Android
Android in an operating system used with smartphones and tablets. Today, Android is the most popular
operating system worldwide because of how many smartphones use a variant of the Android operating
system.
Apple iOS
The Apple iOS operating system used is the operating system used with the Apple iPhone and iPads.
Linux
Linux is a free and open source operating system used with PC and IBM compatible computers.
Because the operating system is open source, it is used to create many variants of Linux, including
Ubuntu, Debian, Red Hat, and Slackware. See our Linux page for a full listing of variants listed on our
site with further information about the operating system.
Chromium / Chrome OS
Chrome OS is an operating system used with Google Chromebooks.

TYPES OF OPERATING SYSTEMS


• Mainframe operating systems
Mainframe operating systems are advanced products with significantly different attributes and
objectives. A mainframe computer is a large computer efficient in taking care of and processing very
large volumes of data rapidly. They are used by large institutions, such as government firms and
large corporations. Nearly all mainframes have the ability to run (or host) multiple operating
systems. Mainframes can add or hot swap system capacity without disruption.
• Server operating systems
A server operating system, also called a server OS, is an operating system specifically
designed to run on servers, which are specialized computers that operate within a client/server
architecture to serve the requests of client computers on the network.
The server operating system, or server OS, is the software layer on top of which other software
programs, or applications, can run on the server hardware. Server operating systems help enable
and facilitate typical server roles such as Web server, mail server, file server, database server,
application server and print server.
• Multiprocessor operating systems
page. 24
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

A multiprocessing operating system (OS) is one in which two or more central processing units
(CPUs) control the functions of the computer. Each CPU contains a copy of the OS, and these
copies communicate with one another to coordinate operations. The use of multiple processors
allows the computer to perform calculations faster, since tasks can be divided up between
processors.
• Personal computer operating systems
A personal computer OS is a general-purpose computer whose size, capabilities and original
sale price make it useful for individuals, and is intended to be operated directly by an end-user with
no intervening computer operator.

• Handheld operating systems


This are operating systems designed to run on machines that have lower speed processor and
less memory, they are designed to use less memory and require fewer resources.
Ex. Smartphone (There are different types of OS for Mobile Phones like Android OS, Bada,
iOS, MeeGo OS, Palm OS etc.)

• Embedded operating systems


An embedded operating system (OS) is a specialized operating system designed to perform a
specific task for a device that is not a computer. An embedded operating system’s main job is to run
the code that allows the device to do its job. The embedded OS also makes the device’s hardware
accessible to the software that is running on top of the OS.
An embedded system is a computer that supports a machine. Examples include computers in cars,
traffic lights, digital televisions, ATMs, airplane controls, point of sale (POS) terminals, digital
cameras, GPS navigation systems, elevators, digital media receivers and smart meters, among
many other possibilities.
• Real-time operating systems
An RTOS performs these tasks, but is also specially designed to run applications with very precise
timing and a high degree of reliability. This can be especially important in measurement and
automation systems where downtime is costly or a program delay could cause a safety hazard.
Real-Time systems are becoming pervasive. Typical examples of real-time systems include Air
Traffic Control Systems, Networked Multimedia Systems, Command Control Systems etc. In a Real-
Time System the correctness of the system behavior depends not only on the logical results of the
computations, but also on the physical instant at which these results are produced. Real-Time

page. 25
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

systems are classified from a number of viewpoints i.e. on factors outside the computer system and
factors inside the computer system.
A missed deadline in hard real-time systems is catastrophic and in soft real-time systems it can lead
to a significant loss.
EVOLUTION OF IT INFRASTRUCTURE

General-Purpose Mainframe and Minicomputer Era: (1959 to Present)


The introduction of the IBM 1401 and 7090 transistorized machines in 1959 marked the beginning
of widespread commercial use of mainframe computers. In 1965, the mainframe computer truly
came into its own with the introduction of the IBM 360 series. Mainframe computers became
powerful enough to support thousands of online remote terminals connected to the centralized
mainframe using proprietary communication protocols and proprietary data lines.
Personal Computer Era: (1981 to Present)
Proliferation of PCs in the 1980s and early 1990s launched a spate of personal desktop productivity
software tools—word processors, spreadsheets, electronic presentation software, and small data
management programs—that were very valuable to both home and corporate users. These PCs
were stand-alone systems until PC operating system software in the 1990s made it possible to link
them into networks.
Client/Server Era (1983 to Present)
In client/server computing, desktop or laptop computers called clients are networked to powerful
server computers that provide the client computers with a variety of services and capabilities.
Computer processing work is split between these two types of machines. The client is the user point
page. 26
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

of entry, whereas the server typically processes and stores shared data, serves up Web pages, or
manages network activities. The term “server” refers to both the software application and the
physical computer on which the network software runs. The server could be a mainframe, but today,
server computers typically are more powerful versions of personal computers, based on
inexpensive chips and often using multiple processors in a single computer box., or in server racks.
Enterprise Computing Era (1992 to Present)
In the early 1990s, firms turned to networking standards and software tools that could integrate
disparate networks and applications throughout the firm into an enterprise-wide infrastructure. As
the Internet developed into a trusted communications environment after 1995, business firms began
seriously using the Transmission Control Protocol/Internet Protocol (TCP/IP) networking standard to
tie their disparate networks together.
Cloud and Mobile Computing Era (2000 to Present)
The growing bandwidth power of the Internet has pushed the client/server model one step further,
towards what is called the “Cloud Computing Model.” Cloud computing refers to a model of
computing that provides access to a shared pool of computing resources (computers, storage,
applications, and services) over a network, often the Internet. These “clouds” of computing
resources can be accessed on an as-needed basis from any connected device and location.

IT INFRASTRUCTURE HAS SEVEN MAIN COMPONENTS:

1. Computer hardware platforms


2. Operating system platforms
3. Enterprise software applications
4. Data management and storage
5. Networking platforms
6. Internet platforms
7. Consulting system integration services

INFRASTRUCTURE COMPONENTS
1. COMPUTER HARDWARE PLATFORMS
 Client machines
• Desktop PCs, mobile devices, laptops
 Servers

page. 27
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

• Blade servers: ultrathin computers stored in racks


 Mainframes:
• IBM mainframe equivalent to thousands of blade servers
 Top chip producers:
• Intel, AMD, ARM, IBM
 Top firms:
• IBM, HP, Dell, Lenovo

2. OPERATING SYSTEM PLATFORMS


 Operating systems
o Server level: 65% run Unix or Linux; 35% run Windows
o Client level:
 90% run Microsoft Windows (XP, 2000, CE, etc.)
 Mobile/multitouch (Android, iOS)
 Cloud computing (Google’s Chrome OS)
 Enterprise software applications
o Enterprise application providers: SAP and Oracle
o Middleware providers: BEA

3. DATA MANAGEMENT AND STORAGE


 Database software:
o IBM (DB2), Oracle, Microsoft (SQL Server), Sybase (Adaptive Server Enterprise),
MySQL
 Physical data storage:
o EMC Corp (large-scale systems), Seagate, Maxtor, Western Digital
 Storage area networks (SANs):
o Connect multiple storage devices on dedicated network.
4. NETWORKING/TELECOMMUNICATIONS PLATFORMS
 Telecommunication services
 Telecommunications/cable company charges for voice lines and Internet
access AT&T, Verizon
 Network operating systems:
 Windows Server, Linux, Unix
 Network hardware providers:
 Cisco, Alcatel-Lucent, Nortel, Juniper Networks
5. INTERNET PLATFORMS
 Hardware, software, management services to support company web sites,
 (including web-hosting services) intranets, extranets
i. Internet hardware server market:
page. 28
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

1. IBM, Dell, Oracle, HP


 Internet services:
i. Amazon, Google
 Web development tools/suites:
i. Microsoft (.NET) Oracle (Java), Adobe.
6. Consulting and system integration services
 Even large firms do not have resources for full range of support for new,
 complex infrastructure
 Software integration:
• ensuring new infrastructure works with legacy systems
 Legacy systems:
• older TPS created for mainframes that would be too costly to replace or
redesign
 Accenture, IBM Global Services, EDS, Infosys, Wipro

TOPIC: COMPUTER PROCESSES

 A process is an abstraction of a running program


 A process or running process refers to a set of instructions currently being processed by the
computer processor.

o For example, in Windows you can see each of the processes running by opening
the Processes tab in Task Manager. Windows Processes are Windows Services
and background programs you normally don't see running on the computer. A
process may be a printer program that runs in the background and monitors the ink
levels and other printer settings while the computer is running.

o A typical computer has multiple processes running all the time to help manage the
operating system, its hardware, and the software running on the computer.

 it enables doing several things at the same time


o support the ability to have (pseudo) concurrent operation
o Ex. consider a user PC

 In a multiprogramming system, the CPU switches from process to process quickly, running
each for tens or hundreds of milliseconds

PROCESS AND PROGRAM


 A process is an activity of some kind
page. 29
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

 A program is something that may be stored on disk, not doing anything


• Ex: baking vs. recipe

The Process Model


 All the runnable software on the computer, sometimes including the operating system, is
organized into a number of sequential processes
 To understand the system, it is much easier to think about a collection of processes running
in (pseudo) parallel.
 This rapid switching back and forth is called multiprogramming.
o A multiprogramming is a parallel processing in which the multiple programs can run
simultaneously.
o Multiprogramming is the allocation of more than one concurrent program on a
computer system and its resources.
o Multiprogramming allows using the CPU effectively by allowing various users to
use the CPU and I/O devices effectively.
o Multiprogramming makes sure that the CPU always has something to execute, thus
increases the CPU utilization.
o multi programming is the ability of an OS to execute multiple programs at the same
time on single processor machine .one or more programs reside in the main
memory which are ready to execute. The CPU can execute only one instruction at
a time. If the currently executing process performs i/o operation or waiting for I/O
then the OS may interrupt that process and gives the control to other process
residing in main memory.

o the main aim of multi programming is to make CPU busy until as there are
processes waiting to execute.
o thus, no CPU time is wasted by the system waiting for I/O task to be completed.

page. 30
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

NOTE: Meaning the Central Processing Unit (CPU) works at all times keeping it self-
busy.

THE PROCESS MODELS

a) Multiprogramming four programs. b) Conceptual model of four independent, sequential


processes. c) Only one program is active at once.

Explanation:
a. Each process has its own job to perform, if such jobs are finished it will be switch to another job
connecting to the previous work.
b. Each process from A to D has a task to perform separately.
c. Each task has its own job like letter A, however, jobs are divided accordingly in such a way it will
switch on the other process from A to D then switch again to process A until jobs are all finished.

A. PROCESS CREATION
A process may be created by another process using fork(). The creating process is called the parent process
and the created process is the child process. A child process can have only one parent but a parent process
may have many children. Both the parent and child processes have the same memory image, open files and
environment strings. However, they have distinct address spaces.
Example:

page. 31
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

 A process may be created in the system for different operations. Some of the events that lead to
process creation are as follows
1. System initialization.
2. Execution of a process creation system call by a running process.
3. A user request to create a new process.
4. Initiation of a batch job.
explanation: (example below)
1. User logs on.
2. User starts a program.
3. Operating systems creates process to provide service, e.g., to manage printer.
4. Some program starts another process, (Play music, open web-browser, open PS etc.)

 In all these cases, a new process is created by having an existing process execute a process creation
SYSTEM CALL.
o 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.
o 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.
o 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. System calls are the
only entry points into the kernel system. All programs needing resources must use system calls.

Services Provided by System Calls:


1. Process creation and management
2. Main memory management
3. File Access, Directory and File system management
4. Device handling(I/O)
5. Protection
6. Networking, etc.
Types of System Calls: There are 5 different categories of system calls
page. 32
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

1. Process control: end, abort, create, terminate, allocate and free memory.
2. File management: create, open, close, delete, read file etc.
3. Device management
4. Information maintenance
5. Communication

B. PROCESS TERMINATION
 A process terminates when it finishes executing its last statement.
 Process termination occurs when the process is terminated The exit() system call is used by most
operating systems for process termination.
Some of the causes of process termination are as follows:
 A process may be terminated after its execution is naturally completed. This process leaves the
processor and releases all its resources.
 A child process may be terminated if its parent process requests for its termination.
 A process can be terminated if it tries to use a resource that it is not allowed to.
 For example - A process can be terminated for trying to write into a read only
file.
 If an I/O failure occurs for a process, it can be terminated.
 For example - If a process requires the printer and it is not working, then the process
will be terminated.
 In most cases, if a parent process is terminated then its child processes are also terminated.
This is done because the child process cannot exist without the parent process.
 If a process requires more memory than is currently available in the system, then it is
terminated because of memory scarcity.

a) Normal Exist - Most processes terminate because they have done their job.
b) Error Exist - When process discovers a fatal error. For example, a user tries to compile a
program that does not exist.
c) Fatal Error - An error caused by process due to a bug in program for example, executing an
illegal instruction, referring non-existing memory or dividing by zero.
d) Killed by another Process - A process executes a system call telling the Operating Systems
to terminate some other process. In some systems when a process kills all processes it
created are killed as well. (ex. TASK MANAGER: To end processes)

C. PROCESS STATE

page. 33
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

DIFFERENT PROCESS STATES


Processes in the operating system can be in any of the following states:
a) NEW- The process is being created.
b) READY- The process is waiting to be assigned to a processor.
c) RUNNING- Instructions are being executed.
d) WAITING- The process is waiting for some event to occur(such as an I/O completion or reception of a
signal).
e) TERMINATED- The process has finished execution.

OPERATIONS ON THE PROCESS


1. Creation
Once the process is created, it will be ready and come into the ready queue (main memory) and will
be ready for the execution.

2. Scheduling
Out of the many processes present in the ready queue, the Operating system chooses one process
and start executing it. Selecting the process which is to be executed next, is known as scheduling.

3. Execution
page. 34
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

Once the process is scheduled for the execution, the processor starts executing it. Process may
come to the blocked or wait state during the execution then in that case the processor starts
executing the other processes.

4. Deletion/killing
Once the purpose of the process gets over then the OS will kill the process. The Context of the
process (PCB) will be deleted and the process gets terminated by the Operating system.

PROCESS TABLE
 The process table is a data structure maintained by the operating system to facilitate
context switching and scheduling, and other activities. Each entry in the table, often called a
context block, contains information about a process such as process name and state,
priority, registers, and a semaphore (a semaphore is a variable or abstract data type used
to control access to a common resource by multiple processes in a concurrent system such
as a multitasking operating system.)
 A table containing all of the information that must be saved when the CPU switches from
running one process to another in a multitasking system.
 The information in the process table allows the suspended process to be restarted at a later
time as if it had never been stopped. Every process has an entry in the table. These entries
are known as process control/context blocks and contain the following information:
 process state - information needed so that the process can be loaded into memory and
run, such as the program counter, the stack pointer, and the values of registers.
 memory state - details of the memory allocation such as pointers to the various memory
areas used by the program
 resource state - information regarding the status of files being used by the process
such as user ID.
 PROCESS CONTROL BLOCK (PCB) is used to track the process’s execution status. Each
block of memory contains information about the process state, program counter, stack
pointer, status of opened files, scheduling algorithms, etc. All this information is required
and must be saved when the process is switched from one state to another. When the
process makes a transition from one state to another, the operating system must update
information in the process’s PCB.
INTERRUPT HANDLING
Interrupts are signals sent to the CPU by external devices, normally I/O devices. They tell the CPU to
stop its current activities and execute the appropriate part of the operating system.

page. 35
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

THERE ARE THREE TYPES OF INTERRUPTS:


 Hardware Interrupts are generated by hardware devices to signal that they need some
attention from the OS. They may have just received some data (e.g., keystrokes on the
keyboard or a data on the ethernet card); or they have just completed a task which the
operating system previous requested, such as transferring data between the hard drive and
memory.
 Software Interrupts are generated by programs when they want to request a system call to
be performed by the operating system.
 Traps are generated by the CPU itself to indicate that some error or condition occurred for
which assistance from the operating system is needed.
NOTE: Interrupts are important because they give the user better control over the computer.
Without interrupts, a user may have to wait for a given application to have a higher priority over the
CPU to be ran. This ensures that the CPU will deal with the process immediately.

THREADS
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.
• In many applications, multiple activities are going on at once
• Threads give the ability for the parallel entities to share an address space and all of its data
• not possible with multiple processes (with their separate address spaces)
• Threads are lighter weight than processes, so they are easier (i.e.,faster) to create and destroy
• Threads allow computing and IO activities to overlap

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.

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.
Each thread belongs to exactly one process and no thread can exist outside a process. Each thread represents
a separate flow of control. Threads have been successfully used in implementing network servers and web
server. They also provide a suitable foundation for parallel execution of applications on shared memory
multiprocessors. The following figure shows the working of a single-threaded and a multithreaded process.
page. 36
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

DIFFERENCE BETWEEN PROCESS AND THREAD


N. Process Thread
1 Process is heavy weight or Thread is light weight, taking lesser resources
resource intensive. than a process.
2 Process switching needs Thread switching does not need to interact
interaction with operating system. with operating system.
3 In multiple processing All threads can share same set of open files,
environments, each process child processes.
executes the same code but has its
own memory and file resources.
4 If one process is blocked, then no While one thread is blocked and waiting, a
other process can execute until the second thread in the same task can run.
first process is unblocked.
5 Multiple processes without using Multiple threaded processes use fewer
threads use more resources. resources.
6 In multiple processes each process One thread can read, write or change another
operates independently of the thread's data.
others.

Advantages of Thread
 Threads minimize the context switching time.
page. 37
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

 Use of threads provides concurrency within a process.


 Efficient communication.
 It is more economical to create and context switch threads.
 Threads allow utilization of multiprocessor architectures to a greater scale and efficiency.
Types of Thread
Threads are implemented in following two ways −
1. User Level Threads − User managed threads.
2. Kernel Level Threads − Operating System managed threads acting on kernel, an operating
system core.
User Level Threads
In this case, the thread management kernel is not aware of the existence of threads. The thread
library contains code for creating and destroying threads, for passing message and data between
threads, for scheduling thread execution and for saving and restoring thread contexts. The
application starts with a single thread.

Advantages
 Thread switching does not require Kernel mode privileges.
 User level thread can run on any operating system.
 Scheduling can be application specific in the user level thread.
 User level threads are fast to create and manage.
Disadvantages
 In a typical operating system, most system calls are blocking.
 Multithreaded application cannot take advantage of multiprocessing.

KERNEL LEVEL THREADS

page. 38
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

In this case, thread management is done by the Kernel. There is no thread management code in the
application area. Kernel threads are supported directly by the operating system. Any application can
be programmed to be multithreaded. All of the threads within an application are supported within a
single process.
The Kernel maintains context information for the process as a whole and for individuals threads
within the process. Scheduling by the Kernel is done on a thread basis. The Kernel performs thread
creation, scheduling and management in Kernel space. Kernel threads are generally slower to
create and manage than the user threads.
Advantages
 Kernel can simultaneously schedule multiple threads from the same process on multiple
processes.
 If one thread in a process is blocked, the Kernel can schedule another thread of the same
process.
 Kernel routines themselves can be multithreaded.
Disadvantages
 Kernel threads are generally slower to create and manage than the user threads.
 Transfer of control from one thread to another within the same process requires a mode
switch to the Kernel.

MULTITHREADING MODELS
Some operating system provide a combined user level thread and Kernel level thread facility. Solaris is a good
example of this combined approach. In a combined system, multiple threads within the same application can run
in parallel on multiple processors and a blocking system call need not block the entire process. Multithreading
models are three types
a) Many to many relationship.
b) Many to one relationship.
c) One to one relationship.

A. MANY TO MANY MODEL


The many-to-many model multiplexes any number of user threads onto an equal or smaller number of kernel
threads.

page. 39
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

The following diagram shows the many-to-many threading model where 6 user level threads are multiplexing
with 6 kernel level threads. In this model, developers can create as many user threads as necessary and the
corresponding Kernel threads can run in parallel on a multiprocessor machine. This model provides the best
accuracy on concurrency and when a thread performs a blocking system call, the kernel can schedule another
thread for execution.

B. MANY TO ONE MODEL


Many-to-one model maps many user level threads to one Kernel-level thread. Thread management
is done in user space by the thread library. When thread makes a blocking system call, the entire
process will be blocked. Only one thread can access the Kernel at a time, so multiple threads are
unable to run in parallel on multiprocessors.
If the user-level thread libraries are implemented in the operating system in such a way that the
system does not support them, then the Kernel threads use the many-to-one relationship modes.

page. 40
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

C. ONE TO ONE MODEL


There is one-to-one relationship of user-level thread to the kernel-level thread. This model provides
more concurrency than the many-to-one model. It also allows another thread to run when a thread
makes a blocking system call. It supports multiple threads to execute in parallel on microprocessors.

Disadvantage of this model is that creating user thread requires the corresponding Kernel thread.
OS/2, windows NT and windows 2000 use one to one relationship model.

page. 41
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

Difference between User-Level & Kernel-Level Thread

S.N. User-Level Threads Kernel-Level Thread


1 User-level threads are faster to Kernel-level threads are slower to create
create and manage. and manage.
2 Implementation is by a thread library Operating system supports creation of
at the user level. Kernel threads.
3 User-level thread is generic and can Kernel-level thread is specific to the
run on any operating system. operating system.
4 Multi-threaded applications cannot Kernel routines themselves can be
take advantage of multiprocessing. multithreaded.

THREAD USAGE: WORD PROCESSOR (example: MS OFFICE)

1. First thread interacts with the user.


2. Second thread handles reformatting in the background.
3. Third thread handles the disk backups.
THREAD USAGE - A MULTITHREADED WEB SERVER

page. 42
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

The dispatcher reads incoming requests for work from then network and chooses an idle (i.e.,
blocked) worker thread to hand the request

THE CLASSICAL THREAD MODEL


• Multithreading is the situation of allowing multiple threads in the same process

(a) Three processes each with one thread. (b) One process with three threads.
A process contains a number of resources such as address space, open files, accounting
information, etc. In addition to these resources, a process has a thread of control, e.g., program
counter, register contents, stack. The idea of threads is to permit multiple threads of control to
execute within one process. This is often called multithreading and threads are sometimes called
lightweight processes. Because threads in the same process share so much state, switching
between them is much less expensive than switching between separate processes.
page. 43
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

ADVANTAGES OF THREAD OVER PROCESS


• Responsiveness:
If the process is divided into multiple threads, one thread can complete its execution
and its output can be immediately returned.
• Faster context switch:
Context switch time between threads is lower compared to process context switch.
Process context switching needs more CPU overhead.
• Effective utilization of multiprocessor system:
If we have multiple threads in a single process, then we can schedule multiple threads
on multiple processors.
• Resource sharing:
Resources like code, data, and files can be shared among all threads within a process.
(Stack and registers can’t be shared)
• Communication:
Communication between multiple threads is easier, as the threads shares common address
space. while in process we have to follow some specific communication technique for
communication between two process.
• Enhanced throughput of the system:
If a process is divided into multiple threads, and each thread function is considered as one job, then
the number of jobs completed per unit of time is increased, thus increasing the throughput of the
system.

Process Summary
A. What are the units of execution?
a. Processes
B. How are those units of execution represented?
a. Process Control Blocks (PCBs)
C. How is work scheduled in the CPU?
b. Process states, process queues, context switches
D. What are the possible execution states of a process?
c. Running, ready, waiting
page. 44
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

E. How does a process move from one state to another?


d. Scheduling, I/O, creation, termination
F. How are processes created?
e. Create Process (Windows),

Threads Summary
A. The operating system as a large multithreaded program
a. Each process executes as a thread within the OS
B. Multithreading is very useful for applications
a. Efficient multithreading requires fast primitives
b. Processes are too heavyweight
C. Solution is to separate threads from processes
a. Kernel-level threads much better, but still significant overhead
b. User-level threads even better, but not well integrated with OS

REMINDER: QUIZZES are posted on the FB group.

GOOD JOB FINISHING YOUR FIRST MODULE. KEEP IT UP.

References:
OS Processes from https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/3_Processes.html
Threads from https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/4_Threads.html

PC CPU models from https://www.pcmag.com/encyclopedia/term/pc-cpu-models

https://smallbusiness.chron.com/four-major-components-hard-drive-70821.html

https://www.computerhope.com/jargon/b/bus.htm

https://www.tutorialspoint.com/process-creation-vs-process-termination-in-operating-system

Process operation from


https://www.personal.kent.edu/~rmuhamma/OpSystems/Myos/processOperate.htm#:~:text=System
%20initialization.,Initialization%20of%20a%20batch%20job.
page. 45
Republic of the Philippines
Province of Ilocos Sur
ILOCOS SUR COMMUNITY COLLEGE
Zone V, Bantay

PLATFORM TECHNOLOGY

Process Creation vs Process Termination in Operating System from https://www.javatpoint.com/os-


process-states

page. 46

You might also like