All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer sciences
operating system
Questions and Answers of
Operating System
It is stated in the text that a paging partition will perform better than a paging file. Why is this so?
Give two examples of the advantages of relative path names over absolute ones.
The following locking calls are made by a collection of processes. For each call, tell what happens. If a process fails to get a lock, it blocks. (a) A wants a shared lock on bytes 0 through 10. (b)
Consider the locked file of Fig. 10-26(c). Suppose that a process tries to lock bytes 10 and 11 and blocks. Then, before C releases its lock, yet another process tries to lock bytes 10 and 11, and
Explain under what situations a process may request a shared lock or an exclusive lock. What problem may a process requesting an exclusive lock suffer from?
Some tape drives hav e numbered blocks and the ability to overwrite a particular block in place without disturbing the blocks in front of or behind it. Could such a device hold a mounted Linux file
In Fig. 10-24, both Fred and Lisa have access to the file x in their respective directories after linking. Is this access completely symmetrical in the sense that anything one of them can do with it
As we have seen, absolute path names are looked up starting at the root directory and relative path names are looked up starting at the working directory. Suggest an efficient way to implement both
When the file /usr/ast/work/f is opened, several disk accesses are needed to read i-node and directory blocks. Calculate the number of disk accesses required under the assumption that the i-node for
A Linux i-node has 12 disk addresses for data blocks, as well as the addresses of single, double, and triple indirect blocks. If each of these holds 256 disk addresses, what is the size of the
When an i-node is read in from the disk during the process of opening a file, it is put into an i-node table in memory. This table has some fields that are not present on the disk. One of them is a
On multi-CPU platforms, Linux maintains a runqueue for each CPU. Is this a good idea? Explain your answer?
Pdflush threads can be awakened periodically to write back to disk very old pages- older than 30 sec. Why is this necessary?
Based on the information presented in this chapter, if a Linux ext2 file system were to be put on a 1.44-MB floppy disk, what is the maximum amount of user file data that could be stored on the disk?
In view of all the trouble that students can cause if they get to be superuser, why does this concept exist in the first place?
A professor shares files with his students by placing them in a publicly accessible directory on the Computer Science department's Linux system. One day he realizes that a file placed there the
Linux supports a system call fsuid. Unlike setuid, which grants the user all the rights of the effective id associated with a program he is running, fsuid grants the user who is running the program
On a Linux system, go to /proc/#### directory, where #### is a decimal number corresponding to a process currently running in the system. Answer the following along with an explanation: (a) What is
If you are writing an Android activity to display a Web page in a browser, how would you implement its activity-state saving to minimize the amount of saved state without losing anything important?
If you are writing networking code on Android that uses a socket to download a file, what should you consider doing that is different than on a standard Linux system?
If you are designing something like Android's zygote process for a system that will have multiple threads running in each process forked from it, would you prefer to start those threads in zygote or
Write a Linux pipeline that prints the eighth line of file z on standard output.
Imagine you use Android's Binder IPC to send an object to another process. You later receive an object from a call into your process, and find that what you have received is the same object as
Consider an Android system that, immediately after starting, follows these steps: 1. The home (or launcher) application is started. 2. The email application starts syncing its mailbox in the
Give one advantage and one disadvantage of the registry vs. having individual .ini files.
The Win32 API call WaitForMultipleObjects allows a thread to block on a set of synchronization objects whose handles are passed as parameters. As soon as any one of them is signaled, the calling
When initializing a global variable in a multithreaded program, a common programming error is to allow a race condition where the variable can be initialized twice. Why could this be a problem?
Name three reasons why a desktop process might be terminated. What additional reason might cause a process running a modern application to be terminated?
Modern applications must save their state to disk every time the user switches away from the application. This seems inefficient, as users may switch back to an application many times and the
As described in Sec. 11.4, there is a special handle table used to allocate IDs for processes and threads. The algorithms for handle tables normally allocate the first available handle (maintaining
Windows uses a facility called Autoboost to temporarily raise the priority of a thread that holds the resource that is required by a higher-priority thread. How do you think this works?
In Windows it is easy to implement a facility where threads running in the kernel can temporarily attach to the address space of a different process. Why is this so much harder to implement in user
A mouse can have one, two, or three buttons. All three types are in use. Does the HAL hide this difference from the rest of the operating system? Why or why not?
Even when there is plenty of free memory available, and the memory manager does not need to trim working sets, the paging system can still frequently be writing to disk. Why?
Windows swaps the processes for modern applications rather than reducing their working set and paging them. Why would this be more efficient?
Why does the self-map used to access the physical pages of the page directory and page tables for a process always occupy the same 8 MB of kernel virtual addresses (on the x86)?
If a region of virtual address space is reserved but not committed, do you think a VAD is created for it? Defend your answer.
Which of the transitions shown in Fig. 11-34 are policy decisions, as opposed to required moves forced by system events (e.g., a process exiting and freeing its pages)?
Suppose that a page is shared and in two working sets at once. If it is evicted from one of the working sets, where does it go in Fig. 11-34? What happens when it is evicted from the second working
When a process unmaps a clean stack page, it makes the transition (5) in Fig. 11-34. Where does a dirty stack page go when unmapped? Why is there no transition to the modified list when a dirty stack
Suppose that a dispatcher object representing some type of exclusive lock (like a mutex) is marked to use a notification event instead of a synchronization event to announce that the lock has been
To support POSIX, the native NtCreateProcess API supports duplicating a process in order to support fork. In UNIX fork is shortly followed by an exec most of the time. One example where this was used
A file has the following mapping. Give the MFT run entries.
Consider the MFT record of Fig. 11-41. Suppose that the file grew and a 10th block was assigned to the end of the file. The number of this block is 66. What would the MFT record look like now?
The mitigation strategy for improving security despite the continuing presence of vulnerabilities has been very successful. Modern attacks are very sophisticated, often requiring the presence of
An extension model used by many programs (Web browsers, Office, COM servers) involves hosting DLLs to hook and extend their underlying functionality. Is this a reasonable model for an RPC-based
When running on a NUMA machine, whenever the Windows memory manager needs to allocate a physical page to handle a page fault it attempts to use a page from the NUMA node for the current thread's
Give a couple of examples where an application might be able to recover easily from a backup based on a volume shadow copy rather the state of the disk after a system crash.
In Sec. 11.10, providing new memory to the process heap was mentioned as one of the scenarios that require a supply of zeroed pages in order to satisfy security requirements. Give one or more other
In Sec. 11.3.3 we described the problems caused by multithreaded applications closing handles in one thread while still using them in another. One possibility for fixing this would be to insert a
Windows contains a hypervisor which allows multiple operating systems to run simultaneously. This is available on clients, but is far more important in cloud computing. When a security update is
Many components of the executive (Fig. 11-11) call other components of the executive. Give three examples of one component calling another one, but use (six) different components in all.
Win32 does not have signals. If they were to be introduced, they could be per process, per thread, both, or neither. Make a proposal and explain why it is a good idea.
An alternative to using DLLs is to statically link each program with precisely those library procedures it actually calls, no more and no less. If this scheme were to be introduced, would it make
The discussion of Windows User-Mode Scheduling mentioned that user-mode and kernel- mode threads had different stacks. What are some reasons why separate stacks are needed?
Windows uses 2-MB large pages because it improves the effectiveness of the TLB, which can have a profound impact on performance. Why is this? Why are 2-MB large pages not used all the time?
Moore's Law describes a phenomenon of exponential growth similar to the population growth of an animal species introduced into a new environment with abundant food and no natural enemies. In nature,
In Fig. 12-5, a flag, found, is used to tell whether the PID was located. Would it b possible to forget about found and just test p at the end of the loop to see whether it got to the end or not?
In Fig. 12-6, the differences between the x86 and the UltraSPARC are hidden by conditional compilation. Could the same approach be used to hide the difference between x86 machines with an IDE disk as
Can reentrant procedures have private static global variables? Discuss your answer.
The macro of Fig. 12-7(b) is clearly much more efficient than the procedure of Fig. 12-7(a). One disadvantage, however, is that it is hard to read. Are there any other disadvantages? If so, what are
Suppose that we need a way of computing whether the number of bits in a 32-bit word is odd or even. Devise an algorithm for performing this computation as fast as possible. You may use up to 256 KB
One disadvantage of GIF is that the image must include the color palette, which increases the file size. What is the minimum image size for which an 8-bit-wide color palette breaks even? Now repeat
In the text we showed how caching path names can result in a significant speedup when looking up path names. Another technique that is sometimes used is having a daemon program that opens all the
Even if a remote file has not been removed since a hint was recorded, it may have been changed since the last time it was referenced. What other information might it be useful to record?
Consider a system that hoards references to remote files as hints, for example as (name, remote-host, remote-name). It is possible that a remote file will quietly be removed and then replaced. The
In the text it is stated that locality can often be exploited to improve performance. But consider a case where a program reads input from one source and continuously outputs to two or more files.
Using Brooks' figure of 1000 lines of code per programmer per year, make an estimate of the amount of money it took to produce Windows 8. Assume that a programmer costs $100,000 per year (including
As memory gets cheaper and cheaper, one could imagine a computer with a big battery- backed-up RAM instead of a hard disk. At current prices, how much would a low-end RAM-only PC cost? Assume that a
Name some features of a conventional operating system that are not needed in an embedded system used inside an appliance.
Hierarchical file names always start at the top of the tree. Consider, for example, the file name /usr/ast/books/mos2/chap-12 rather than chap-12/mos2/books/ast/usr. In contrast, DNS names start at
In a microkernel-based client-server system, the microkernel just does message passing and nothing else. Is it possible for user processes to nevertheless create and use semaphores? If so, how? If
Careful optimization can improve system-call performance. Consider the case in which one system call is made every 10 msec. The average time of a call is 2 msec. If the system calls can be speeded up
Operating systems often do naming at two different levels: external and internal. What are the differences between these names with respect to (a) Length? (b) Uniqueness? (c) Hierarchies?
One way to handle tables whose size is not known in advance is to make them fixed, but when one fills up, to replace it with a bigger one, copy the old entries over to the new one, then release the
1. Which the following statements about the base keyword is false? a.A constructor can use at most one base statement. b.A constructor cannot use both a base statement and a this
Write a Python program in which the user enters either 'A', 'B', or 'C'. If 'A' is entered, the program should display the word 'Apple'; if 'B' is entered, it displays 'Banana'; and if 'C' is
Identify all the errors in the following repetition statements. Some errors are syntactical while others are logical (e.g., infinite loops). a. for (int i = 10; i > 0; i++) { x = y; a = b; } b. int
What are the advantages of a virtualized data center over a classic data center?
Suppose m and r are integers. Write a Java expression for mr2 to obtain a floating point result.
The following algorithm is designed to print the beginning of what is known as the Fibonacci sequence. Identify the body of the loop. Where is the initialization step for the loop control? The
A Student object should validate its own data. The client runs this method, called validateData(), with a Student object, as follows: String result = student.validateData(); if (result ==
1.Suppose the MovedEventHandler delegate is defined by the statement delegate void MovedEventHandler(). Which of the following correctly declares the Moved event?a.public MovedEventHandler
Describe agility (for software projects) in your own words.
Write a program that reads in an investment amount, the annual interest rate, and the number of years, and displays the future investment value using the following formula: futureInvestmentValue =
Write a program that receives an ASCII code (an integer between 0 and 127) and displays its character. For example, if the user enters 97, the program displays the character a. Here is a sample
1.Which of the following is a valid delegate definition? a.private delegate float MyDelegate(float); b.private delegate MyDelegate(x); c.private delegate MyDelegate(float x); d.private delegate
Write a program that creates a Random object with seed 1000 and displays the first 50 random integers between 0 and 100 using the nextInt(100) method.
Write a program that displays all the prime numbers less than 120 in decreasing order. Use the StackOfIntegers class to store the prime numbers (e.g., 2, 3, 5,... ) and retrieve and display them in
Listing 2.6, ShowCurrentTime.java, gives a program that displays the current time in GMT. Revise the program so that it prompts the user to enter the time zone offset to GMT and displays the time in
1.What is the parameter in this method known as? public void displayAbsoluteValue(int value = 1) a.Modified b.Optional c.Named d.Default 2.When you create an abstract method, how do you use
1. In what way are general-purpose registers and main memory cells similar?2. In what way do general-purpose registers and main memory cells differ?
1. Which the following statements about the base keyword is false? a.A constructor can use at most one base statement. b.A constructor cannot use both a base statement and a this statement. c.The
(a) Write an if statement that increases pay by 3% if score is greater than 90. (b) Write an if statement that increases pay by 3% if score is greater than 90, otherwise increases pay by 1%.
1.To parse a string that might contain a currency value such as $1,234.56, you should pass the Parse or TryParse method which of the following values? a.NumberStyles.AllowCurrencySymbol
For each of the following Visual Basic code snippets, identify the syntax error.1. If intX > 100lblResult.Text = "Invalid Data"End If2. Dim str As String = "Hello"Dim intLength As IntegerintLength
1. Which object does the variable mySet inherit from? Int[] mySet = new int[5]; a.System.Collection b.System.Collection.List c.System.Array d.None, this is a value type. 2. Which type should
1.You are a developer at company xyx. You have been asked to improve the responsiveness of your WPF application. Which solution best fits the requirements? a.Use the BackgroundWorker class. b.Use
1.Which of the following methods is the best way to store an integer value typed by the user in a variable? a.ToString b.Convert c.ParseInt d.TryParse 2.The statement object obj = 72 is an
List four activities of a typical operating system.
Showing 600 - 700
of 1171
1
2
3
4
5
6
7
8
9
10
11
12