Академический Документы
Профессиональный Документы
Культура Документы
INDIVIDUAL ASSIGNMENT
CT049-3-1-OS
UC1F1609IT
Page 0 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Marking Grid
Page 1 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Abstract
1. Operating System
This report deals with memory management in operating systems, in this case Windows 7 is
the chosen OS. The first part introduces operating systems along with memory management and
Virtual Memory. It further explains the several tasks of the Virtual Memory Manager of Windows
7 and gives and insight of Microsoft SuperFetch which is a technology used in memory
management. Problems faced by memory management are thoroughly discussed along with
solutions to overcome them. Limitations together with their extensions to this research were listed.
The last part consists of the conclusion which assesses the importance of the memory management
and consists of Appendix A comprising of data charts, Figures, Frequently Asked Questions
(FAQs) and the Gantt Chart which is the plan of the activities done throughout this research.
2. Computer Architecture
This part of the report tackles microprocessors which form part of computers’ architecture.
The beginning introduces microprocessors and gives a brief overview of the generation of
computers. This research shows Moore’s prediction over the years in co-relation with the major
trends which affect the performance of microprocessors. This report further differentiates between
the microprocessor design for different devices; desktops, embedded computers, laptops, and
servers. Finally, the last part contains the conclusion and the of Appendix B comprising of data
charts, Figures, Frequently Asked Questions (FAQs) and the Gantt Chart which is the plan of the
activities done throughout this research.
Page 2 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Contents
Marking Grid .................................................................................................................................. 1
Abstract ........................................................................................................................................... 2
SECTION 1: OPERATING SYSTEMS ......................................................................................... 6
Introduction ..................................................................................................................................... 6
Memory Management ..................................................................................................................... 7
Virtual Memory .............................................................................................................................. 7
Virtual Memory Manager in Windows 7 ........................................................................................ 8
Paging ............................................................................................................................................. 8
Microsoft SuperFetch...................................................................................................................... 9
Demand Paging ............................................................................................................................... 9
Segmentation................................................................................................................................. 10
Demand Segmentation .................................................................................................................. 10
Page Faults and Solutions to overcome them ............................................................................... 10
1. First in First Out (FIFO) Page Replacement ...................................................................... 11
2. Not frequently used (NFU) page replacement ................................................................... 11
3. Aging page replacement algorithm .................................................................................... 11
4. Least Recently Used (LRU) Page Replacement ................................................................ 11
5. Optimal Page Replacement ................................................................................................ 11
Windows 7 Page Replacement Technique .................................................................................... 12
Limitation and Extension .............................................................................................................. 13
Limitations: ............................................................................................................................... 13
Extensions: ................................................................................................................................ 13
Conclusion .................................................................................................................................... 14
Appendix A ................................................................................................................................... 15
Figures, Data Charts, etc ........................................................................................................... 15
Frequently Asked Questions (FAQs) ........................................................................................ 17
Gantt Chart ................................................................................................................................ 18
SECTION 2: COMPUTER SYSTEMS ARCHITECHTURE ..................................................... 19
Definition of a Microprocessor ..................................................................................................... 19
Introduction ................................................................................................................................... 19
Generation of Computers .............................................................................................................. 20
Page 3 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Page 4 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Page 5 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Introduction
An operating system is a program that manages the computer hardware, providing a basis
for application programs and acts as an intermediary between the computer user and the computer
hardware (Silberschatz, et al., 2005).
The operating system has various tasks such as providing an interface for the user to
communicate with the computer, controlling and handling of the peripherals and managing
memory, which will be discussed in this research documentation, amongst others.
Page 6 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Memory Management
Memory management can be defined as the process of subdividing memory for the
accommodation of multiple processes (Stallings, 2012). The process of memory management is
necessary in a multiprogramming system. The purpose of memory management is to allow the
allocation of portions of memory to programs when needed and free the portion of memory when
the program which has been allocated to it is no more required. Memory needs to be properly
allocated to guarantee a rational supply of ready processes to consume accessible processor time.
Virtual Memory
In windows, virtual memory is regarded a storage allocation scheme in which secondary
memory can be addressed as though it were part of main memory (Stallings, 2012). Virtual
memory is also defined as a technique that allows the execution of processes that are not
completely in memory (Silberschatz, et al., 2005).
Virtual memory has many advantages and is widely used to since with this memory
management method, the programs can be practically larger than the physical memory itself which
helps resolving the problems related to memory limitations. In addition, Virtual Memory allows
multitasking where several applications can be run all at once. An overview of the virtual memory
can be seen in Appendix A, Figure 1.
Page 7 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
1. Managing logical address whereby logical address space in memory is organized through
Page-in/Page-Out.
2. Managing memory which is the tracking of the free/occupied spaces in memory
3. Collecting page reference information
4. Performing Page Replacement when a fault arises
5. Allocating physical memory
In windows 7, 32-Bit, the virtual memory manager makes use of a paging scheme of
management with pages of 4 kilobytes (kb) each whereas for the 64-Bit, pages are of 8kb each.
The address space in the windows 7, 32-bit, is of 4GB whereby 3GB is reserved for address space
and 1GB for the kernel mode.
Paging
Paging is the management scheme used in windows 7, whereby space is broken into fixed
sized pieces for data to be stored and retrieved from the secondary storage. It allows the physical
address space of a process to be noncontiguous. For paging to be implemented, a process address
space is split into fixed sized units which are called pages. Physical memory is considered as an
array which’s slots are called page frames (Arpaci-Dusseau, 2014). Figure 2 (Appendix A) shows
an example of the physical memory and its various page frames.
The virtual memory manager works by loading one component of the address space of a
process in memory to begin with. The component that contains the start address of the process,
which is the actual address of the instruction to be executed and loads the other parts of the process
when needed through a technique known as demand paging. (Dhamdhere, 2009)
Page 8 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Microsoft SuperFetch
Microsoft SuperFetch is a technology which is used in windows 7 to reduce time required
to launch applications and works along with the memory manager service to manage the RAM. It
has two goals which are to decrease the boot time and to make applications launch faster.
SuperFetch attempts to make data which is often accessed to be read from the RAM instead of the
hard drive.
Demand Paging
The technique of demand paging is to achieve an efficient usage of the memory and to
achieve a balance between the main memory and disk (secondary memory). The concept of
demand paging tags along with memory virtualization. The demand paging system is quite same
as a paging system whereby swapping takes place. Instead of loading the whole program, only the
process is loaded into memory thus maximizing space.
The paging table is responsible in moving the sections of virtual memory into and out of
physical memory. Whenever more memory is needed that what is already available in the RAM
(physical memory), the processes are stored as low priority on the disk. (Stallings, 2012)
The virtual address is split into a virtual page number (high-order bits) and an offset (low-
order bits). The virtual page number is used as an index into the page table to find the entry for a
virtual page. From the page table entry, the page frame number is then found. The page frame
number is attached to the high-order end of the offset, replacing the virtual page number, to form
a physical address that can be sent to the memory. The purpose of the page table is to map virtual
pages onto page frames. The page table is a function, with the virtual page number as argument
and the physical frame number as result. Using the result of this function, the virtual page field in
a virtual address can be replaced by a page frame field, thus forming a physical memory address
(Tanenbaum, 2009).
Page 9 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Segmentation
Segmentation is a user-visible division of a process into multiple variable-size segments,
whose sizes change dynamically during execution. It enables fine-grained sharing and protection.
In a computer system using segmentation, a reference to a memory location includes a value that
identifies a segment and an offset (memory location) within that segment. In segmentation, the
virtual address space is divided into several variable-size segments.
Demand Segmentation
Demand segmentation is used whenever there is insufficient hardware available for the
implementation of demand paging. The segment table has a valid bit to specify if the segment is
already in physical memory or not. If a segment is not in physical memory then segment fault
results, which traps to the operating system and brings the needed segment into physical memory,
much like a page fault. Demand segmentation allows for pages that are often referenced with each
other to be brought into memory together, this decreases the number of page faults.
When memory is overallocated, which is when there is no free frame in memory for a new
page, some processes can either be swapped out or some pages can be overwritten. Usually this is
called page replacement.
Page 10 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
There are several page replacement techniques whereby the goal is to minimize the number
of page faults. These include:
Page 11 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Figure 3 in Appendix A illustrates how aging algorithm works. Suppose that after the first
clock tick the R bits for pages 0 to 5 have the values 1, 0, 1, 0, 1, and 1, respectively (page 0 is 1,
page 1 is 0, page 2 is 1, etc.). In other words, between tick 0 and tick 1, pages 0, 2, 4, and 5 were
referenced, setting their R bits to 1, while the other ones remain 0. After the six corresponding
counters, have been shifted and the R bit inserted at the left, they have the values shown in column
(a) of figure 3. The four remaining columns show the six counters after the next four clock ticks.
When a page fault occurs, the page whose counter is the lowest is removed. A page that has not
been referenced for, say, four clock ticks will have four leading zeros in its counter and thus will
have a lower value than a counter that has not been referenced for three clock ticks.
Page 12 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Limitations:
1. In Windows 7, Kernel address space shares the same space and is no longer divided
into some sections. But it still has some limitations, the space is not dynamic enough
to handle a very oversized resource.
2. Microsoft SuperFetch spends the leftover free memory on a low-priority applications
and processes. The effect will occur when the user tries to run a high-resolution video
or high performance game, the effects will slow down the computer because there are
no more or very few free memories left.
Extensions:
1. Kernel virtual address space should be dynamic enough to overcome any possibilities. The
user address space is a space that will not be unavailable each time, so it does not mean it
cannot be available to handle some oversized-resources problem. The virtual memory
space should be dynamic enough to let user address space to share a little space for the
Kernel address space.
2. Microsoft SuperFetch need to have some reserved memory for some applications that
require a lot of memory in their processes. SuperFetch should allocate the free memory for
the high-performance processes also, without neglecting the existence of low priority
processes in the free memory.
Page 13 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Conclusion
Memory management is important in Operating Systems so that data is well organized such
that it provides easier access of data to the user improving performance. A correct memory
management mechanism is one which should be easy to implement, causing the least possible
number of page faults and must be able to execute instructions quite quickly to avoid overhead
along with avoiding thrashing.
Page 14 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Appendix A
Page 15 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Figure 3: Aging algorithm; 6 pages for five clock ticks (LiraLab, n.d.)
Page 16 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
The amount of RAM available is never enough to run all the programs of the user all at once. With
virtual memory, the computer searches the RAM for areas that have not been used recently and
copies them onto the hard disk. Virtual memory is used to help physical memory to execute more
tasks because some pieces of processes are loaded to physical memory and it can handle a process
that may be larger than physical memory.
What is thrashing?
Thrashing occurs when a computer's virtual memory subsystem is in a constant state of paging,
rapidly exchanging data in memory for data on disk, to the exclusion of most application-level
processing which then causes the computer’s performance to degrade.
It is the preference of the user but SuperFetch has various advantages. Microsoft SuperFetch can
give memory manager a hand to divide an often-used program into priorities It keeps the computer
consistently responsive to programs by making better use of the computer's RAM.
Page 17 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Gantt Chart
Page 18 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Definition of a Microprocessor
Microprocessor is a digital device on a chip which can fetch instructions from a memory,
decode and execute them i.e. performs certain arithmetic and logical operations, accept data from
input device, and send results to output devices (Kaushik, 2015).
Introduction
Microprocessors contain both combinational logic and sequential digital logic and
operate on numbers and symbols represented in the binary numeral system. Structures of
microprocessors vary accordingly to the purposes it was designed for (Brain, 2000). The first
microprocessor, known as the Intel 4004 was created by Intel in 1971 containing 2300 transistors
and its instruction set contained only 45 instructions.
Page 19 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Generation of Computers
Page 20 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
1. Clock speed
The Microprocessor's job is to process instructions and execute them. The rate at which the
processor performs its task can be considered as the clock speed. The clock speed refers to the
frequency at which one core of a multi-core processor is running and is used as an indicator of the
processor's speed. Measured in mega Hertz (MHz) or giga Hertz (GHz), it is a measure of the
number of instructions per unit time which can be carried out by the processor. The higher the
clock speed, the more instructions can be carried out per unit time and therefore a higher
performance can be achieved.
Page 21 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
5. On-Board Cache
Cache memory is a temporary location to store information. Nowadays processors come with
an onboard cache which is internal RAM. Instead of continuously requesting data from the RAM,
the data on the on-board cache can be directly used by the CPU which impacts on the performance
as data can be reached faster.
6. Number of Transistors
Microprocessors consist of several transistors. The number of transistors available on the
microprocessor affects the performance of the CPU. By increasing the number of transistors, it
allows a technology known as pipelining. The execution of instruction overlaps in the pipelined
architecture.
Most modern processors have multiple instruction decoders with its very own pipeline that
lets multiple instruction streams, where one instruction is completed at each clock cycle with a lot
of transistors used in the microprocessors (Brain, 2000). The increase in the number of transistors
are directly linked to Moore’s Law.
Page 22 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Moore’s Law
Over the years, the design of microprocessors has not stopped changing since there’s a
demand for increasingly performant computers. Therefore, better microprocessors must be
developed to support higher performance. The Founder of Intel, Gordon E. Moore, came up with
a prediction, known as Moore’s Law, which is the observation that the number of transistors in a
dense integrated circuit doubles approximately every two years. Figure 4 & 5 in Appendix B, are
graphs of number of transistors against years, confirm Moore’s law.
Intel over the years, through investments, has made Moore’s law a reality while combining
meeting highest possible standards and meeting user requirements. In Figure 5, the evolution of
microprocessors can be seen.
Page 23 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Embedded systems have typical functions such as storage, processing, and communication.
Microprocessors are used in such systems as they are an efficient way to implement digital
systems. The microprocessors are designed using the RISC architecture which minimizes the
number of instruction and reduce the complexity of the mobile processor. Embedded systems also
make use of microcontrollers rather than using separate microprocessors.
Page 24 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Limitation
1. The major disadvantage of the Microprocessor is that it gets over-heated.
2. It has limitations on the size of data.
3. Based on the research undertaken, there is no specification on the size of microprocessor
Extension
1. Deeper research on the microprocessors can be done in order to get more information and
know the possible solutions to the current problems faced with microprocessors.
Page 25 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Conclusion
The microprocessor plays an important role as it acts as the brain and operates the processes in
computers. So, the performance of the microprocessor itself becomes the main priority for the user.
There are some major trends affecting the microprocessor performance, which are clock speed, number
of cores, instruction set architecture, instruction per clock, on-board cache and number of transistors.
The main function of the microprocessor in different devices is the same, that of carrying out the
processors. But different devices’ microprocessors will vary in term of design depending on the use of
the device.
Page 26 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Appendix B
Figures, Data Charts, etc.
Page 27 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Figure 5 Graph of Moore's law with intel's microprocessors evolution (Processors, n.d.)
Page 28 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Figure 8: Power8 Processor architecture featuring the most powerful and scalable performance
for data center servers by IBM (Mujtaba, 2013)
Page 29 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
What is microprocessor?
A microprocessor is an Integrated Circuit (IC) which has only the Central Processing Unit (CPU)
inside it.
1. Number of Cores
2. Clock Speed
5. On-Board Cache
6. Number of transistors
A microprocessor is an Integrated Circuit (IC) which has only the Central Processing Unit (CPU)
inside it. They lack Random Access Memory (RAM), Read Only Memory (ROM), and other
peripherals on the chip. On the other hand, a microcontroller possesses a CPU along with RAM,
ROM, and other peripherals on the same chip and is also termed as a mini computer.
Page 30 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Gantt Chart
Page 31 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Limitations
1. Word Limit
The word limit which is only of 3500 words, acts as a barrier to delve more into the subject.
Therefore, the research had to be summarized.
2. Limited Information
Information on the memory management in Windows 7 is limited. It is difficult to find
information which can be supported.
Extensions
1. In depth study
A more in depth research can be done by researchers on the topics so that more substantiated
information can be given. Increasing the word limit will help to give more details on the
subject.
Page 32 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
References
Page 33 of 34
CT049-3-1-OS UC1F1609IT Lubnaa Abdur Rahman(TP04166)
Page 34 of 34