Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
com
Connect on Facebook :
http://www.facebook.com/pages/IgnouSolvedAssignmentscom/346544145433550
http://feedburner.google.com/fb/a/mailverify?uri=ignousolvedassignments_com
http://ignousolvedassignments.com/request-and-share-solved-assignments/
Weightage : 25%
Last Dates for Submission : 15th October, 2012 (For July 2012 Session)
This assignment has four questions. Answer all questions. Each question is of 20 marks. Rest 20
marks are for viva voce. You may use illustrations and diagrams to enhance the explanations.
Please go through the guidelines regarding assignments given in the Programme Guide.
a) Using the SJF method, compute the completion times of the above jobs, average turn
around time and average waiting time.
b) Using the SRTF (Shortest Remaining Time first) method, compute the completion times
of the above jobs, the average turn around time and the average waiting time. Note that
SRTF is SJF with preemption. (Hint: Completion time - arrival time = turnaround time).
c) Using the Round Robin method (with Quantum = 2), compute the completion times of the
above jobs and the average waiting time.
Question 2:
a. Explain the Banker’s problem. Consider the following snapshot of a system:
c. If a request from process P1 arrives for (0,4,2,0), can the request be granted
immediately?
Yes it can. This results in the value of Available being (1, 1, 0, 0).One ordering of
processes that can finish is P0, P2, P3, P1, and P4.
b. Consider the following page-reference string:
1, 2, 3, 4, 2, 1, 3, 4, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 4
How many page faults would occur for following replacement algorithms assuming one, two,
three, four, five, six or seven frames? Remember that all frames are initially empty, so your first
unique pages will all cost one fault each.
i. LRU replacement.
ii. FIFO replacement.
iii. Optimal replacement.
R21 R20 R19 R18 R17 R16 R15 R14 R13 R12 R11 R10 R9 R8 R7 R5 R5 R4 R3 R2 R1
4 3 2 1 2 3 6 7 3 2 1 2 6 4 3 1 2 4 3 2 1
1
Page out Page in When?
2
----- 1,2,3,4,5 R1 => R7
3
1 6 R8
4
2 1 R10
5
3 2 R11
6
4 3 R12
1
5 7 R13
2
Swapped in page
# of page faults using FIFO =5 (without replacement) + 5 (with replacement)=10
1
Why?
2 Page out Page in When?
(Notes)
3 6
----- 1,2,3,4,5 R1 => R7 There is free
4 3 frames
5 7 3 6 R8 5,1,2,4,3
4 3 R12 2,1,6,5,4
Swapped out page 5 7 R13 3,2,1,6,5
Swapped in page
1
Why?
2 Page out Page in When?
(Notes)
3
----- 1,2,3,4,5 R1 => R7 There is free
4 6 frames
5 7 4 6 R8 2,1,3,4 or 5
5 7 R13 6,3,2,1 ,5
Swapped out page
Swapped in page
# of page faults using OPTIMAL =5 (without replacement) + 2 (with replacement)=7
1 20 20 20
2 18 18 15
3 15 16 11
4 10 14 8
5 8 10 7
6 7 10 7
7 7 7 7
Under what circumstances do page faults occur? Describe the actions taken by the operating
system when a page fault occurs.
A page fault occurs when an access to a page that has not been brought into main memory takes
place.
- Describe the actions taken by the operating system when a page fault occurs.
The operating system verifies the memory access, aborting the program if it is invalid. If it is valid, a
free frame is located and I/O is requested to read the needed page into the free frame. Upon
completion of I/O, the process table and page table are updated and the instruction is restarted.
Q.3(a) The Linux kernel does not allow paging out of kernel memory. What effect does this
restriction have on the kernel’s design? What are two advantages and two disadvantages of this
design decision?
Answer: The primary impact of disallowing paging of kernel memory in Linux is that the non-
preemptability of the kernel is preserved. Any process taking a page fault, whether in kernel or in
user mode, risks being rescheduled while the required data is paged in from disk. Because the kernel
can rely on not being rescheduled during access to its primary data structures, locking requirements
to protect the integrity of those data structures are very greatly simplified. Although design
simplicity is a benefit in itself, it also provides an important performance advantage on uniprocessor
machines due to the fact that it is not necessary to do additional locking on most internal data
structures.
There are a number of disadvantages to the lack of pageable kernel memory, however. First of all, it
imposes constraints on the amount of memory that the kernel can use. It is unreasonable to keep
very large data structures in non-pageable memory, since that represents physical memory that
absolutely cannot be used for anything else. This has two impacts: first of all, the kernel must prune
back many of its internal data structures manually, instead of being able to rely on a single
virtualmemory mechanism to keep physical memory usage under control. Second, it makes it
infeasible to implement certain features that require large amounts of virtual memory in the kernel,
such as the /tmp-74 Chapter 21 The Linux System filesystem (a fast virtual-memory-based file
system found on some UNIX systems).
Note that the complexity of managing page faults while running kernel code is not an issue here. The
Linux kernel code is already able to deal with page faults: it needs to be able to deal with system
calls whose arguments reference user memory that may be paged out to disk.
Q.3(b) The Windows 2000 VM manager uses a two-stage process to allocate memory. Identify
several ways in which this approach is beneficial?
Answer: A process in Windows 2000 is limited to 2 gigabytes address space for data.The two-stage
process allows the access of much larger datasets, by reserving space in the processes address space
first and then committing the storage to a memory mapped file. An application could thus window
through a large database (by changing the com-mitted section) without exceeding process quotas or
utilizing a huge amount of physical memory.
Question 4:
a. Discuss in detail the Process management, Memory management, I/O management, File
management and Security and Protection in WINDOWS 7 Operating System. (20 Marks)
Answer : These are the pieces of the system we’ll be looking at:
Process Management
Secondary Management
Networking
Protection System
Command-Interpreter System
PROCESS MANAGEMENT
A process has resources (CPU time, files) and attributes that must be managed.
· Creation/termination
· Block/Unblock (suspension/resumption )
· Synchronization
· Communication
· Deadlock handling
· Debugging
FILE MANAGEMENT
A file is a collection of related information defined by its creator. Commonly, files represent
programs (both source and object forms) and data. The operating system is responsible for the
following activities in connections with filemanagement:
File creation and deletion.
I/O MANAGEMENT
· Drivers for each device - translate read/write requests into disk position commands.
· Disk scheduling
NETWORKING
Windows 7 operating system memory manager creates a virtual memory system comprising of
available physical memory (RAM) and a page file system on the hard disk (usually found in C drive).
Total virtual physical memory = Physical Memory (RAM) + a small portion on hard disk which is
treated similar to physical memory (page file).
1. Commit: Amount of virtual memory reserved by the operating system for the
process. This includes both amount of physical memory (RAM) being used and any page that
is saved in page file (HDD).
2. Working Set: Amount of physical memory currently in use by the process. This
memory component is consiste of 2 parts: Shareable & Private.
1. Shareable: Amount of physical memory in use by the process that can be
shared with other processes. By sharing memory we mean sharing those files, in fact
dll, which are required by multiple processes so that instead of loading them multiple
times for different processes , load one copy of the file in physical memory and
map it to the virtual address space of other processes that need access. Thus
sharing memory saves memory space as only one copy of the page/file is loaded.
2. Private: Amount of physical memory in use by the process that cannot be
used by other processes. This number provides a pretty accurate measure of the
amount of memory that a particular application need in order to run.
3. Hard Faults/ sec (not visible in above figure because might be not in use currently on
my system): The Hard Faults/sec column shows the average number of hard page faults per
second that have occurred in the last minute. If a process attempts to use more physical
memory than is currently available, the system must write, or page, some of the memory
contents (RAM) to disk (in the form of page file on Hard drive). If the process later needs and
accesses the memory contents that exist on the disk, it is called a Hard Fault i.e. this terms
denotes how much hard disk page file contents are being used/fetched.
Windows 7 memory management:
When you open and work with applications, the operating system’s memory manager monitors the
Working Set of each process and watches for requests for additional memory resources. As the
Working Set of a process grows, the memory manager balances the process’ demand for more
memory against requests from the kernel and other processes. If available address space becomes
scarce, the memory manager must scale back the size of the working set. This typically means
paging some of the memory contents to disk. Thus a portion of memory content of RAM is moved to
hard disk in the form of page file.
If an application requires the content of that page file (stored in HDD), it will read back and causes a
Hard Fault. While Hard Faults are a pretty normal occurrence, multiple Hard Faults typically require
additional time so that the system can read pages from the disk. When Hard Faults occur too
frequently, the resulting disk reads will decrease system responsiveness. If you have ever been
working on your system and suddenly everything seems to run in slow motion and then just
as suddenly comes back to regular speed, chances are good that your system is busily
swapping memory around so that it can continue working. As such, if you notice an excessive
number of Hard Faults related to a particular process on a regular basis, chances are your system
needs more physical memory.
*My system memory distribution with visual studio running and few chrome tabs open
As you use your system, the memory manager is at work in the background moving memory back
and forth between these lists in order to maintain a delicate balance between using physical memory
and the hard disk in order to allow your system to work efficiently and effectively.
Windows 7 the newest operating system from Microsoft, simplifies computer security, making it easier for you to
reduce the risk of damage caused by viruses, spyware and other malware. Windows 7 also features an improved
backup solution to help keep your information safe, and its improved parental controls help you protect your
family.
Read about the new and improved safety, security, and privacy features in Windows 7.
Windows Firewall can also help protect your computer from hackers and malicious software. With Windows 7, the
built-in firewall is more flexible and easier to use than before.
The Microsoft backup system is also improved for Windows 7. Backup and Restore creates copies of your most
important files, so you're always prepared for the worst. For more information, see Backup and restore: frequently
asked questions.
Windows 7 also includes Windows Defender, software that helps protect your computer from pop-up ads, slow
performance, and security threats caused by spyware and other unwanted software. For more information,
see Using Windows Defender.
Prevent your children from playing games you don't want them to play.
With the Parental Controls in Windows Media Center (available in Windows 7 Home Premium and above), you
can also block access to objectionable TV shows and movies.
As it did with Windows Vista, Microsoft developed Windows 7 according to the Security
Development Lifecycle (SDL). It built the new OS from the ground up to be a secure computing
environment and retained the key security features that helped protect Vista, such as Kernel
Patch Protection, Data Execution Prevention (DEP), Address Space Layout Randomization
(ASLR), and Mandatory Integrity Levels. These features provide a strong foundation to guard
against malicious software and other attacks. A few key elements are worth noting.
Enhanced UAC
You're probably familiar with UAC, or User Account Control. Introduced with Windows Vista, the
feature is meant to help enforce least-privileged access and to improve the total cost of
ownership by allowing organizations to deploy the operating system without granting
administrator access to users. Though Microsoft's primary intent with UAC was to force software
developers to use better coding practices and not expect access to sensitive areas of the
operating system, most people have perceived UAC as a security feature.
When users think of UAC, they typically associate it with the access-consent prompts it issues.
Though Microsoft has made significant progress since Vista's introduction in reducing the types
and number of events that trigger the UAC prompt (or that prevent standard users from executing
tasks entirely), UAC has still been the subject of a great deal of negative feedback for Vista.
Many Windows users configure the operating system to log them in without a user name and
password--but that's the computer equivalent of leaving the front door of your house wide open
with a neon sign flashing "Enter Here." I highly recommend that you assign all user accounts in
Windows 7 a relatively strong password or passphrase (that means your dog's name or your
favorite basketball team don't count).
Even passwords aren't all they're cracked up to be. Passwords are secure only until they're
cracked, and cracking a password is more a matter of when than if, assuming an attacker is
sufficiently dedicated. Experts recommend two-factor authentications--in other words, adding
another layer of protection on top of the password--for better security. Many computers, laptops
in particular, come equipped with built-in biometric security in the form of a fingerprint scanner.
With Windows 7, Microsoft provides much smoother integration between the operating system
and the fingerprint-scanning hardware.
Enroll fingers to register them for user authentication.Windows 7 has better
driver support and more reliable fingerprint reading across different hardware platforms.
Configuring and using a fingerprint reader with Windows 7 for logging in to the operating system,
as well as for authenticating users for other applications and Web sites, is easy. Click
on Biometric Devices in the Control Panel to access the console for enrolling and managing
fingerprint data and customizing biometric-security settings.
The Biometric Devices console will display any detected biometric devices. If the fingerprint
reader is not yet configured, the status will display 'Not Enrolled'. Click on that status to access
the console.
You can add scans of one finger or all ten. Adding multiple fingers allows you to continue using
the biometric security even if your primary finger is in a bandage, for instance, or if your hand is
in a cast. On screen, select the finger you want to add, and then place your finger on the
fingerprint reader (or slowly drag your finger across the reader, depending on the type of
hardware you have). You will have to scan each finger successfully at least three times to
register it in the database, similar to how you have to reenter a password to confirm that you
entered it correctly.
-----------------------------------------------------THE END----------------------------------------------------------------