MESSAGE
DATE | 2015-02-02 |
FROM | Ruben
|
SUBJECT | Subject: [LIU Comp Sci] Operating Systems Quiz
|
From owner-learn-outgoing-at-mrbrklyn.com Mon Feb 2 02:41:08 2015 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix) id 252B71612E0; Mon, 2 Feb 2015 02:41:08 -0500 (EST) Delivered-To: learn-outgoing-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 28) id 12D8A1612E2; Mon, 2 Feb 2015 02:41:08 -0500 (EST) Delivered-To: learn-at-nylxs.com Received: from mail-qa0-f51.google.com (mail-qa0-f51.google.com [209.85.216.51]) by mrbrklyn.com (Postfix) with ESMTP id 743341612E0 for ; Mon, 2 Feb 2015 02:41:06 -0500 (EST) Received: by mail-qa0-f51.google.com with SMTP id f12so27932963qad.10 for ; Sun, 01 Feb 2015 23:41:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=yImHdaXFI2cZCFFzPmoQv5pTo4JVESL68CPKfhv3Lew=; b=YlNnj9wNtDbWII4ocnX4orye5ENCta1FcNePz2H+mfQBC4lMFAy0Fvp5YwOxku4+aJ ARFK5O50BQasBt7oAmg/Oj+8259zANfbpHqAc0Q6tJAt/pCchMEzCVEXGhsxftfLC6Si 7v6ZGxoEJFpTx5mKpxsDWUAWluvn5Vw+Pp420eITVABvDYZa3XMaWCj6zKM8b25YgyKG URoEBXjv7V0Up39dEQ/nDPY5iO/RP1Aocta54GggnRETckvnrrq5ICzI/pvQ3aebW5j/ O4r2QCwgYLIx+NyiZhtkX+cwB5xyQklOgO0BebQGqtFLekv1iMrudOUCyDIFN+tN3sZ1 RkYQ== X-Gm-Message-State: ALoCoQmHpPi1PUD/WGx7L0qRKpBmziUbH/Z5Jgec8xjRLmIwolhbecNB90rR2qzlUpBzafw9XPZj X-Received: by 10.140.104.1 with SMTP id z1mr36874215qge.76.1422862864057; Sun, 01 Feb 2015 23:41:04 -0800 (PST) Received: from [10.0.0.19] ([96.57.23.82]) by mx.google.com with ESMTPSA id u16sm17593664qau.44.2015.02.01.23.41.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Feb 2015 23:41:03 -0800 (PST) Message-ID: <54CF2A0F.5020404-at-my.liu.edu> Date: Mon, 02 Feb 2015 02:41:03 -0500 From: Ruben User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: learn-at-nylxs.com Subject: [LIU Comp Sci] Operating Systems Quiz Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: owner-learn-at-mrbrklyn.com Precedence: bulk Reply-To: learn-at-mrbrklyn.com
Anyone want to do this with me, on by one: Maybe we can squeeze an A out of this class:
Practice Exercises
1: What are the three main purposes of an operating system?
I hate these questions that have more than one answer: Try this from the summary: An OS manages hardware, provides an environment for applications, and forms an interface for the human users.
2) We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to “waste” resources? Why is such a system not really wasteful?
In a cluster with a hot swap? It is not waste because one machine is monitoring for failures and it needs to be ready in case of a failure? Or maybe in SMP where processing is not shared equally between cores or CPUs. It is a waste but it is a tradoff in order to leverage the OS when it is running many processes under load.
I don't KNOW what answer they are fishing for here.
3) What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment?
He has to keep the response times within a narrow specification which largely means he is very dependent on the OS timer and interupt managment.
4) Keeping in mind the various definitions of operating system, consider whether the operating system should include applications such as web browsers and mail programs. Argue both that it should and that it should not, and support your answers.
It SHOULDN'T include email and browsers and I WILL NOT argue that it should because that would be a lie perpetrated by Microsoft to brainwash everyone, which as evidence from this question, was at least partly successful.
5) How does the distinction between kernel mode and user mode function as a rudimentary form of protection (security) system?
It prevents user applications from accidentally or purposely obstructing normal OS function but forcing a privileged bit in kernel level commands.
6) Which of the following instructions should be privileged? a. Set value of timer. Yes
b. Read the clock. No
c. Clear memory. Like clear a number of pages? Yes
d. Issue a trap instruction. No
e. Turn off interrupts. Yes
f. Modify entries in device-status table. Yes
g. Switch from user to kernel mode. Yes
h. Access I/O device. Yes
7) Some early computers protected the operating system by placing it in a memory partition that could not be modified by either the user job or the operating system itself. Describe two difficulties that you think could arise with such a scheme.
1) Hot Swapping would be impossible 2) You couldn't load and unload Kernel Modules (turn on and off the sound or the wifi)
8) Some CPUs provide for more than two modes of operation. What are two possible uses of these multiple modes?
Backward comparability and emulation, adapt to different speeds or bus sizes of hardware?
~~~~~~~~~~~~~~~~~~~~~~ That is all for now.
Timers could be used to compute the current time. Provide a short description of how this could be accomplished. Give two reasons why caches are useful. What problems do they solve? What problems do they cause? If a cache can be made as large as the device for which it is caching (for instance, a cache as large as a disk), why not make it that large and eliminate the device? Distinguish between the client–server and peer-to-peer models of distributed systems. Exercises 1.12 1.13 In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. a. What are two such problems? b. Can we ensure the same degree of security in a time-shared machine as in a dedicated machine? Explain your answer. The issue of resource utilization shows up in different forms in different types of operating systems. List what resources must be managed carefully in the following settings: a. Mainframe or minicomputer systems b. Workstations connected to servers c. Mobile computers Exercises 51 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 Under what circumstances would a user be better off using a time- sharing system than a PC or a single-user workstation? Describe the differences between symmetric and asymmetric multipro- cessing. What are three advantages and one disadvantage of multipro- cessor systems? How do clustered systems differ from multiprocessor systems? What is required for two machines belonging to a cluster to cooperate to provide a highly available service? Consider a computing cluster consisting of two nodes runningdatabase. Describe two ways in which the cluster software can manage access to the data on the disk. Discuss the benefits and disadvantages of each. How are network computers different from traditional personal com- puters? Describe some usage scenarios in which it is advantageous to use network computers. What is the purpose of interrupts? How does an interrupt differ fromtrap? Can traps be generated intentionally by a user program? If so, for what purpose? Direct memory access is used for high-speed I/O devices in order to avoid increasing the CPU’s execution load. a. How does the CPU interface with the device to coordinate the transfer? a a b. How does the CPU know when the memory operations are com- plete? c. The CPU is allowed to execute other programs while the DMA controller is transferring data. Does this process interfere with the execution of the user programs? If so, describe what forms of interference are caused. Some computer systems do not provide a privileged mode of operation in hardware. Is it possible to construct a secure operating system for these computer systems? Give arguments both that it is and that it is not possible. Many SMP systems have different levels of caches; one level is local to each processing core, and another level is shared among all processing cores. Why are caching systems designed this way? Consider an SMP system similar to the one shown in Figure 1.6. Illustrate with an example how data residing in memory could in fact have a different value in each of the local caches. Discuss, with examples, how the problem of maintaining coherence of cached data manifests itself in the following processing environments: a. Single-processor systems b. Multiprocessor systems c. Distributed systems 52 Chapter 1 Introduction 1.25 1.26 1.27 1.28 1.29 1.30 Describe a mechanism for enforcing memory protection in order to prevent a program from modifying the memory associated with other programs. Which network configuration— LAN or WAN —would best suit the following environments? a. A campus student union b. Several campus locations across a statewide university system c. A neighborhood Describe some of the challenges of designing operating systems for mobile devices compared with designing operating systems for tradi- tional PCs. What are some advantages of peer-to-peer systems over client-server systems? Describe some distributed applications that would be appropriate forpeer-to-peer system. Identify several advantages and several disadvantages of open-source operating systems. Include the types of people who would find each aspect to be an advantage or a disadvantage. a
|
|