Académique Documents
Professionnel Documents
Culture Documents
Paranaque Branch
OS 1 and OS 2
Comparative Paper on Operating Systems
ICT 216 – 2nd SemesterAY2018-2019
Submitted to:
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.]
[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
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]
Development history
Beta was leaked onto the Internet via BitTorrent. According to [30]
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]
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.
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
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.
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.
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.
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:
A resource that is released by a different thread than the one that acquired it
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.
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 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.