Vous êtes sur la page 1sur 16

Polytechnic University of the Philippines

Paranaque Branch

OS 1 and OS 2
Comparative Paper on Operating Systems
ICT 216 – 2nd SemesterAY2018-2019

Submitted to:

Mrs. Joanna B. Emralino

Submitted by:

[Student 1]
[Student 2]
[Program]

[Date]
I. Introduction

[Discuss the overview of the chosen operating systems and the objectives of the
comparative paper.]

II. First Operating System

[Discuss the history, description, developer, scheduling algorithm


implementation, memory management, deadlock handling, process synchronization and
other vital information of the chosen operating system.]

III. Second Operating System

[Discuss the history, description, developer, scheduling algorithm


implementation, memory management, deadlock handling, process synchronization and
other vital information of the chosen operating system.]

IV. Comparative Matrix

[Based on the discussion above, create a table comparing the characteristics of the
operating systems.]

First OS Second OS
Scheduling Algorithm

Memory Management

Deadlock Handling

Process Synchronization

V. Analysis/Conclusion

[Write your observation and conclusion about the OS discussed.]

References: (Alphabetically arranged)

[Author(s)., Title, Edition. Publisher. Copyright]

Output paper should at least five pages, Times New Roman, 10-point, 1.5-spacing, with folder (black)
Windows 7 is a personal computer operating system that was
produced by Microsoft as part of the Windows NT family of
operating systems. It was released to manufacturing on July
22, 2009 and became generally available on October 22,
2009, less than three years after the release of its
[7]

predecessor, Windows Vista. Windows


7's server counterpart, Windows Server 2008 R2, was
released at the same time.

Windows 7 was primarily intended to be an incremental


upgrade to Microsoft Windows, intended to address Windows
Vista's poor critical reception while maintaining hardware
and software compatibility. Windows 7 continued
improvements on Windows Aero (the user interface introduced
in Windows Vista) with the addition of a
redesigned taskbar that allows applications to be "pinned" to it,
and new window management features. Other new features
were added to the operating system, including libraries, the
new file sharing system HomeGroup, and support
for multitouch input. A new "Action Center" interface was also
added to provide an overview of system security and
maintenance information, and tweaks were made to the User
Account Control system to make it less intrusive. Windows 7
also shipped with updated versions of several stock
applications, including Internet Explorer 8, Windows Media
Player, and Windows Media Center.
In contrast to Windows Vista, Windows 7 was generally
praised by critics, who considered the operating system to be
a major improvement over its predecessor due to its increased
performance, its more intuitive interface (with particular praise
devoted to the new taskbar), fewer User Account Control
popups, and other improvements made across the platform.
Windows 7 was a major success for Microsoft; even prior to its
official release, pre-order sales for 7 on the online
retailer Amazon.com had surpassed previous records. In just
six months, over 100 million copies had been sold worldwide,
increasing to over 630 million licenses by July 2012. As of
December 2018, 35.55% of computers running Windows are
running Windows 7. [8]

Development history

Originally, a version of Windows codenamed "Blackcomb" was


planned as the successor to Windows XP and Windows
Server 2003 in 2000. Major features were planned for
Blackcomb, including an emphasis on searching and querying
data and an advanced storage system named WinFS to
enable such scenarios. However, an interim, minor release,
codenamed "Longhorn," was announced for 2003, delaying
the development of Blackcomb. By the middle of 2003,
[9]
however, Longhorn had acquired some of the features
originally intended for Blackcomb. After three major malware
outbreaks — the Blaster, Nachi, and Sobig worms — exploited
flaws in Windows operating systems within a short time period
in August 2003, Microsoft changed its development priorities,
[10]

putting some of Longhorn's major development work on hold


while developing new service packs for Windows XP and
Windows Server 2003. Development of Longhorn (Windows
Vista) was also restarted, and thus delayed, in August 2004. A
number of features were cut from Longhorn. Blackcomb was
[11]

renamed Vienna in early 2006. [12]

When released, Windows Vista was criticized for its long


development time, performance issues, spotty compatibility
with existing hardware and software on launch, changes
affecting the compatibility of certain PC games, and unclear
assurances by Microsoft that certain computers shipping with
XP prior to launch would be "Vista Capable" (which led to a
class action lawsuit), among other critiques. As such, adoption
of Vista in comparison to XP remained somewhat low. [13][14][15]
In
July 2007, six months following the public release of Vista, it
was reported that the next version of Windows would then be
codenamed Windows 7, with plans for a final release within
three years. [16][17]
Bill Gates, in an interview with Newsweek,
suggested that Windows 7 would be more "user-
centric". Gates later said that Windows 7 would also focus on
[18]

performance improvements. Steven Sinofskylater expanded


[19]
on this point, explaining in the Engineering Windows 7 blog
that the company was using a variety of new tracing tools to
measure the performance of many areas of the operating
system on an ongoing basis, to help locate inefficient code
paths and to help prevent performance regressions. Senior [20]

Vice President Bill Veghte stated that Windows Vista users


migrating to Windows 7 would not find the kind of device
compatibility issues they encountered migrating from Windows
XP. An estimated 1,000 developers worked on Windows 7.
[21]

These were broadly divided into "core operating system" and


"Windows client experience", in turn organized into 25 teams
of around 40 developers on average. [22]

In October 2008, it was announced that Windows 7 would


also be the official name of the operating system. [23][24]
There has
been some confusion over naming the product Windows
7, while versioning it as 6.1 to indicate its similar build to
[25]

Vista and increase compatibility with applications that only


check major version numbers, similar to Windows
2000 and Windows XP both having 5.x version numbers. The [26]

first external release to select Microsoft partners came in


January 2008 with Milestone 1, build 6519. Speaking about
[27]

Windows 7 on October 16, 2008, Microsoft CEO Steve


Ballmer confirmed compatibility between Windows Vista and
Windows 7, indicating that Windows 7 would be a refined
version of Windows Vista. [28]
At PDC 2008, Microsoft demonstrated Windows 7 with its
reworked taskbar. On December 27, 2008, the Windows 7
[29]

Beta was leaked onto the Internet via BitTorrent. According to [30]

a performance test by ZDNet, Windows 7 Beta beat both


[31]

Windows XP and Vista in several key areas, including boot


and shutdown time and working with files, such as loading
documents. Other areas did not beat XP, including PC Pro
benchmarks for typical office activities and video editing, which
remain identical to Vista and slower than XP. On January 7, [32]

2009, the x64 version of the Windows 7 Beta (build 7000) was
leaked onto the web, with some torrents being infected with
a trojan. [33][34]
At CES 2009, Microsoft CEO Steve
Ballmer announced the Windows 7 Beta, build 7000, had been
made available for download to MSDN and TechNet
subscribers in the format of an ISO image. [35]

The release candidate, build 7100, became available for


MSDN and TechNet subscribers, and Connect Program
participants on April 30, 2009. On May 5, 2009, it became
available to the general public, although it had also been
leaked onto the Internet via BitTorrent. The release candidate
[36]

was available in five languages and expired on June 1, 2010,


with shutdowns every two hours starting March 1,
2010. Microsoft stated that Windows 7 would be released to
[37]

the general public on October 22, 2009. Microsoft released


Windows 7 to MSDN and Technet subscribers on August 6,
2009, at 10:00 am PDT. Microsoft announced that Windows
[38]
7, along with Windows Server 2008 R2, was released to
manufacturing on July 22, 2009. Windows 7 RTM is build
7600.16385.090713-1255, which was compiled on July 13,
2009, and was declared the final RTM build after passing all
Microsoft's tests internally. [39]

Windows 7 is an operating system released by Microsoft on October 22, 2009. It follows the previous (sixth)
version of Windows, called Windows Vista.

Like previous versions of Windows, Windows 7 has a graphical user interface (GUI) that allows you to
interact with items on the screen using a keyboard and mouse. However, Windows 7 is also includes a
feature called "Windows Touch" that supports touchscreen input and multitouch functionality. For example,
you can right-click a file by touching it with one finger and tapping it with another. You can also zoom in on
an image by touching it with two fingers, then spreading your fingers apart. Windows 7 is bundled with
several touch-ready programs that are designed for touchscreen use.

Windows 7 also includes several new multimedia features. One example is "Play To," a program that allows
you to stream audio and video to different computers or devices within your house. The "HomeGroup"
feature makes it easy to share media files and other data between computers. It also makes it possible to
share printers on a home network. The "Remote Media Streaming" feature allows you to access the music,
video, and photo libraries on your computer from remote locations.

The search feature in Windows 7, called "Windows Search," allows you to see results of searches as soon
as you start typing in the search box. Windows Search categorizes the results by file type and displays text
snippets that indicate where the search phrase was found in each result. After the search results are
returned, it is possible to narrow the results by filtering them by date, file type, file size, and other
parameters. You can search local drives, external hard drives, and networked drives all using the standard
Windows Search interface.
Windows 7 is the Microsoft Windows operating system (OS) released commercially in October
2009 as the successor to Windows Vista.

Windows 7 is built on the Windows Vista kernel and was intended to be an update to the Vista OS.
It uses the same Aero user interface (UI) that debuted in Windows Vista. As a result, to many end
users, the biggest changes between Vista and Windows 7 were faster boot times, new UIs and the
addition of Internet Explorer (IE) 8. The OS is widely available in three retail editions: Windows 7
Home Premium, Professional and Ultimate. Starter, Home Basic and Enterprise editions are
available in some markets

In development, Windows 7 was known by the code names Blackcomb and Vienna.
Scheduling

Windows uses a round-robin technique with a multi-level feedback queue for priority scheduling
ever since NT, Though in Vista there were some smart heuristic improvements to ensure that some
processes, such as the disk defragmenter, are at a lower priority in order to not interfer with
foreground processes. To the best of my knowledge, Windows 7 uses the same scheduler as
Vista, though there may have been minor improvements.

Windows NT-based operating systems use a multilevel feedback queue. So, I feel that Windows 7
must also be using the same scheduling algorithm.

The scheduler was modified in Windows Vista with the inclusion of a priority scheduler and also to
use the cycle counter register of modern processors to keep track of exactly how many CPU cycles
a thread has executed.

On similar lines, there may be some improvements in Windows 7 too. But the algorithm may be the
same.

User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule
their own threads. An application can switch between UMS threads in user mode without involving
the system scheduler and regain control of the processor if a UMS thread blocks in the kernel.
UMS threads differ from fibers in that each UMS thread has its own thread context instead of
sharing the thread context of a single thread. The ability to switch between threads in user mode
makes UMS more efficient than thread pools for managing large numbers of short-duration work
items that require few system calls.

What is the Scheduling Algorithm used in Windows 7?

Windows 7 uses a Round-Robin scheduling technique with multi-level feedback queue for priority
scheduling. This has started ever since Windows NT.
Deadlock Detection

07/03/2017

5 minutes to read

Contributors

Eliot Graff Don Marshall Nathan Bazan

Deadlock Detection monitors the driver's use of resources which need to be locked -- spin locks,
mutexes, and fast mutexes. This Driver Verifier option will detect code logic that has the potential
to cause a deadlock at some future point.

The Deadlock Detection option of Driver Verifier, along with the !deadlock kernel debugger
extension, is an effective tool for making sure your code avoids poor use of these resources.

Deadlock Detection is supported only in Windows XP and later versions of Windows.

Causes of Deadlocks

A deadlock is caused when two or more threads come into conflict over some resource, in such a
way that no execution is possible.

The most common form of deadlock occurs when two or more threads wait for a resource that is
owned by the other thread. This is illustrated as follows:

Thread 1 Thread 2

Takes Lock A

Takes Lock B

Requests Lock B
Requests Lock A

If both sequences happen at the same time, Thread 1 will never get Lock B because it is owned by
Thread 2, and Thread 2 will never get Lock A because it is owned by Thread 1. At best this causes
the threads involved to halt, and at worst causes the system to stop responding.

Deadlocks are not limited to two threads and two resources. Three-way deadlocks between three
threads and three locks are common -- and even five-part or six-part deadlocks occur occasionally.
These deadlocks require a certain degree of "bad luck" since they rely on a number of things
happening simultaneously. However, the farther apart the lock acquisitions are, the more likely
these become.

Single-thread deadlocks can occur when a thread attempts to take a lock that it already owns.

The common denominator among all deadlocks is that lock hierarchy is not respected. Whenever it
is necessary to have more than one lock acquired at a time, each lock should have a clear
precedence. If A is taken before B at one point and B before C at another, the hierarchy is A-B-C.
This means that A must never be acquired after B or C, and B must not be acquired after C.

Lock hierarchy should be followed even when there is no possibility of a deadlock, since in the
process of maintaining the code it will be easy for a deadlock to be accidentally introduced.

Resources That Can Cause Deadlocks

The most unambiguous deadlocks are the result of owned resources. These include spin locks,
mutexes, fast mutexes, and ERESOURCEs.

Resources that are signaled rather than acquired (such as events and LPC ports) tend to cause
much more ambiguous deadlocks. It is of course possible, and all too common, for code to misuse
these resources in such a way that two threads will end up waiting indefinitely for each other to
complete. However, since these resources are not actually owned by any one thread, it is not
possible to identify the delinquent thread with any degree of certainty.

The Deadlock Detection option of Driver Verifier looks for potential deadlocks involving spin locks,
mutexes, and fast mutexes. It does not monitor the use of ERESOURCEs, nor does it monitor the
use of nonowned resources.

Effects of Deadlock Detection

Driver Verifier's Deadlock Detection routines find lock hierarchy violations that are not necessarily
simultaneous. Most of the time, these violations identify code paths that will deadlock when given
the chance.

To find potential deadlocks, Driver Verifier builds a graph of resource acquisition order and checks
for loops. If you were to create a node for each resource, and draw an arrow any time one lock is
acquired before another, then path loops would represent lock hierarchy violations.

Driver Verifier will issue a bug check when one of these violations is discovered. This will happen
before any actual deadlocks occur.

Note Even if the conflicting code paths can never happen simultaneously, they should still be
rewritten if they involve lock hierarchy violations. Such code is a "deadlock waiting to happen" that
could cause real deadlocks if the code is rewritten slightly.

When Deadlock Detection finds a violation, it will issue bug check 0xC4. The first parameter of this
bug check will indicate the exact violation. Possible violations include:

Two or more threads involved in a lock hierarchy violation

A resource that is released out of sequence


A thread that tries to acquire the same resource twice (a self-deadlock)

A resource that is released without having been acquired first

A resource that is released by a different thread than the one that acquired it

A resource that is initialized more than once, or not initialized at all

A thread that is deleted while still owning resources

Starting in Windows 7, Driver Verifier can predict possible deadlocks. For example, trying to use
the same KSPIN_LOCK data structure both as a regular spin lock and as a stack queued spin lock.

See Bug Check 0xC4 (DRIVER_VERIFIER_DETECTED_VIOLATION) for a list of the bug check
parameters.

Monitoring Deadlock Detection

Once Deadlock Detection finds a violation, the !deadlock kernel debugger extension can be used
to investigate exactly what has occurred. It can display the lock hierarchy topology as well as the
call stacks for each thread at the time the locks were originally acquired.

For best results, the driver in question should be running on a checked build of Windows, since that
allows the kernel to obtain more complete run-time stack traces.

There is a detailed example of the !deadlock extension, as well as general information about
debugger extensions, in the documentation in the Debugging Tools for Windows package. See
Windows Debugging for details.
The history of Linux began in 1991 with the commencement of a personal project by Finnish
student Linus Torvalds to create a new free operating system kernel. Since then, the resulting
Linux kernel has been marked by constant growth throughout its history. Since the initial release of
its source code in 1991, it has grown from a small number of C files under a license prohibiting
commercial distribution to the 4.15 version in 2018 with more than 23.3 million lines of source code
without comments[1] under the GNU General Public License

1991: The Linux kernel is publicly announced on 25 August by the 21-year-old Finnish student
Linus Benedict Torvalds. 1992: The Linux kernel is relicensed under the GNU GPL. The first Linux
distributions are created. 1993: Over 100 developers work on the Linux kernel.

The Scheduling Algorithm

The Linux scheduler is defined in kernel/sched.c. The scheduler algorithm and supporting code
went through a large rewrite early in the 2.5 kernel development series. Consequently, the
scheduler code is entirely new and unlike the scheduler in previous kernels. The new scheduler
was designed to accomplish specific goals:

Implement fully O(1) scheduling. Every algorithm in the new scheduler completes in constant-time,
regardless of the number of running processes or any other input.

Implement perfect SMP scalability. Each processor has its own locking and individual runqueue.

Implement improved SMP affinity. Naturally attempt to group tasks to a specific CPU and continue
to run them there. Only migrate tasks from one CPU to another to resolve imbalances in runqueue
sizes.

Provide good interactive performance. Even during considerable system load, the system should
react and schedule interactive tasks immediately.

Provide fairness. No process should find itself starved of timeslice for any reasonable amount of
time. Likewise, no process should receive an unfairly high amount of timeslice.
Optimize for the common case of only 1-2 runnable processes, yet scale well to multiple
processors each with many processes.

Vous aimerez peut-être aussi