Operating Systems

Satisfactory Essays
Operating Systems
Assignment #5
Of
Chapter 4
Eighth Edition of Operating System Concepts by Avi Silberschatz
Peter Baer Galvin
&
Greg Gagne 2009

4.1 Provide two programming examples in which multithreading does not provide better performance than a single-threaded solution
Answer: (1) Any kind of sequential program is not a good candidate to be threaded. An example of this is a program that calculates an individual tax return. (2) Another example is a "shell" program such as the C-shell or Korn shell. Such a program must closely monitor its own working space such as open files, environment variables, and current working directory.

4.2 Describe the actions taken by a thread library to context switch between user-level threads.
Answer: Context switching between user threads is quite similar to switching between kernel threads, although it is dependent on the threads library and how it maps user threads to kernel threads. In general, context switching between user threads involves taking a user thread of its LWP and replacing it with another thread. This act typically involves saving and restoring the state of the registers.

4.3 Under what circumstances does a multithreaded solution using multiple kernel threads provide better performance than a single-threaded solution on a single-processor system?
Answer: When a kernel thread suffers a page fault, another kernel thread can be switched in to use the interleaving time in a useful manner.
A single-threaded process, on the other hand, will not be capable of performing useful work when a page fault takes place. Therefore, in scenarios where a program might suffer from frequent page faults or has to wait for other system events, a multi-threaded solution would perform better even on a single-processor system.
4.4 Which of the following components of program state are shared across threads in a multithreaded process?
a. Register values
b. Heap memory
c. Global variables
d. Stack memory

You May Also Find These Documents Helpful

  • Good Essays

    Operating Systems

    • 1649 Words
    • 7 Pages

    Operating system ABCs An operating system, or OS, is a software program that enables the computer hardware to communicate and operate with the computer software. Without a computer operating system, a computer would be useless. Operating system types As computers have progressed and developed so have the operating systems. Below is a basic list of the different operating systems and a few examples of operating systems that fall into each of the categories. Many computer operating systems will…

    • 1649 Words
    • 7 Pages
    Good Essays
  • Powerful Essays

    Operating Systems

    • 3076 Words
    • 13 Pages

    Operating System UNIT - 1 Roadmap • What is an Operating System? • • • • • • • • Operating System Objectives/Functions The Evolution of Operating Systems Major Achievements Structuring methods Design of API’s Interrupts Device Organization User/System state Transition What is an Operating System? • A program that acts as an intermediary between a user of a computer and the computer hardware. OR • A program that controls the execution of application programs. • Kernel – the one program…

    • 3076 Words
    • 13 Pages
    Powerful Essays
  • Good Essays

    operating system

    • 654 Words
    • 3 Pages

    OPERATING SYSTEM - FILE SYSTEM http://www.tutorialspoint.com/operating_system/os_file_system.htm Copyright © tutorialspoint.com File A file is a named collection of related information that is recorded on secondary storage such as magnetic disks, magnetic tapes and optical disks.In general, a file is a sequence of bits, bytes, lines or records whose meaning is defined by the files creator and user. File Structure File structure is a structure, which is according to a required format…

    • 654 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    operating system

    • 872 Words
    • 60 Pages

    UUM COLLEGE OF ARTS AND SCIENCES UNIVERSITI UTARA MALAYSIA No. Information on Course 1. Course Name : OPERATING SYSTEM 2. Course Code: STIK2044 3. Name(s) of Academic Staff: HATIM MOHAMAD TAHIR ROOM: SOC3070 OFF:928 5193 EMAIL: HATIM@UUM.EDU.MY FB: HATIM 4. Rationale for the inclusion…

    • 872 Words
    • 60 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Operating Systems

    • 1023 Words
    • 5 Pages

    Chapter 2 – Operating System Overview TRUE/FALSE QUESTIONS: 1) An OS should be constructed in such a way as to permit the effective development, testing, and introduction of new system functions without interfering with service. (True) 2) The OS masks the details of the hardware from the programmer and provides the programmer with a convenient interface for using the system. (True) 3) The ABI gives a program access to the hardware resources and services available in a system through the user…

    • 1023 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    Operating System

    • 55363 Words
    • 222 Pages

    publications and other professional conferences and journals. He is a coauthor of the textbook Database System Concepts. He has also written Op-Ed articles for the New York Times, the Boston Globe, and the Hartford Courant, among others. Peter Baer Galvin is the chief technologist for Corporate Technologies (www.cptech.com), a computer facility reseller and integrator. Before that, Mr. Galvin was the systems manager for Brown University's Computer Science Department. He is also Sun columnist for ;login:…

    • 55363 Words
    • 222 Pages
    Good Essays
  • Satisfactory Essays

    operating system

    • 778 Words
    • 5 Pages

    its lifetime. Operating system takes care of selecting the processes from these queues in some fashion. Selecting process is done by the the appropriate scheduler. Types of scheduling: Short - term (or) CPU Scheduler Medium – term Long – term (or) Job Scheduler Short – Term Scheduler: Short term scheduler selects the processes that are ready to execute and allocates CPU to one of them. Medium – Term Scheduler: Medium term scheduler is introduced by some operating systems such as time sharing…

    • 778 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    Operating System

    • 2292 Words
    • 10 Pages

    Authors: Damatac, Mara Olivia S. Gabriel, Ma. Gessa M. Lagiwid, Julie May C. Runez, Alfonso Tyrell Joseph B. Keywords: Mobile Apps IDE(Intergrated Development Environment) Cloud Sensors Introduction Programming is the process of developing logic codes to solve a particular problem. Programmed software and/or application are supposed to make the task easier for the user. It is used for developing applications found in our computing machines. It is used in almost all the technologies…

    • 2292 Words
    • 10 Pages
    Powerful Essays
  • Good Essays

    OPERATING SYSTEM

    • 2238 Words
    • 9 Pages

    INTRODUCTION Operating system (OS) is a set of programs that acts as an interface between user and computer hardware. It also manages the internal resources of a computer like control Unit, arithmetic logic unit, memory unit, I/O unit etc. simply we can say that operating system (OS) is a communication channel between the user and the computer machine. It is must for any computer system because the OS is only:  The one program that runs at all the times on the computer.  The program that…

    • 2238 Words
    • 9 Pages
    Good Essays
  • Good Essays

    Operating Systems

    • 1911 Words
    • 8 Pages

    Operating Systems Task 1 An operating system (OS) is a part of software which manages the operation of a computer. It controls the hardware and software of a computer, without it a computer would be useless. DOS Disk operating system (DOS) was released in 1981. It will load from a floppy disk each time a computer starts. DOS uses a command line interface. Command line interface can be difficult to use if you aren’t trained or experienced in using it. DOS is the predecessor to windows. DOS is…

    • 1911 Words
    • 8 Pages
    Good Essays