100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS3721 Summary Chapter 1-12, 14 and 16-18 R50,00   Add to cart

Summary

COS3721 Summary Chapter 1-12, 14 and 16-18

1 review
 72 views  14 purchases

This summary has Chapters 1-12, 14 and 16-18. This reduced the pages from ~762 to 221. These notes are made for me to study for my exam, do my assignments and such so you can trust that this is for people who are want a reduced version of the book.

Last document update: 2 year ago

Preview 4 out of 221  pages

  • No
  • Chapter 1-12, 14, 16-18
  • March 31, 2022
  • March 31, 2022
  • 221
  • 2021/2022
  • Summary
book image

Book Title:

Author(s):

  • Edition:
  • ISBN:
  • Edition:
All documents for this subject (31)

1  review

review-writer-avatar

By: bronwyndrummer • 1 year ago

avatar-seller
LinkCroft
Operating Systems and Architecture
COS3721
Chapter 1: Introduction
An operating system is software that manages a computer’s hardware. It also provides a basis for
application programs and acts as an intermediary between the computer user and the computer
hardware. An amazing aspect of operating systems is how they vary in accomplishing these tasks in a
wide variety of computing environments. Operating systems are everywhere, from cars and home
appliances that include “Internet of Things” devices, to smart phones, personal computers, enterprise
computers, and cloud computing environments.

What Operating Systems Do
We begin our discussion by looking at the operating system’s role in the overall computer system. A
computer system can be divided roughly into four components: the hardware, the operating system, the
application programs, and a user




• The hardware
o the central processing unit (CPU), the memory, and the input/output (I/O) devices—
provides the basic computing resources for the system.
• The application programs
o such as word processors, spreadsheets, compilers, and web browsers—define the ways
in which these resources are used to solve users’ computing problems.
• The operating system
o controls the hardware and coordinates its use among the various application programs
for the various users.
o We can also view a computer system as consisting of hardware, software, and data. The
operating system provides the means for proper use of these resources in the operation
of the computer system. An operating system is similar to a government. Like a
government, it performs no useful function by itself. It simply provides an environment
within which other programs can do useful work.

,User View
The user’s view of the computer varies according to the interface being used. Many computer users sit
with a laptop or in front of a PC consisting of a monitor, keyboard, and mouse. Such a system is designed
for one user to monopolize its resources. The goal is to maximize the work (or play) that the user is
performing. In this case, the operating system is designed mostly for ease of use, with some attention
paid to performance and security and none paid to resource utilization—how various hardware and
software resources are shared.
The user interface for mobile computers generally features a touch screen, where the user interacts with
the system by pressing and swiping fingers across the screen rather than using a physical keyboard and
mouse. Many mobile devices also allow users to interact through a voice recognition interface, such as
Apple’s Siri.
Some computers have little or no user view. For example, embedded computers in home devices and
automobiles.

System View
From the computer’s point of view, the operating system is the program most intimately involved with the
hardware. In this context, we can view an operating system as a resource allocator. A computer system
has many resources that may be required to solve a problem: CPU time, memory space, storage space,
I/O devices, and so on. The operating system acts as the manager of these resources.
An operating system is a control program. A control program manages the execution of user programs
to prevent errors and improper use of the computer. It is especially concerned with the operation and
control of I/O devices.

Defining Operating Systems
By now, you can probably see that the term operating system covers many roles and functions. That is
the case, at least in part, because of the myriad designs and uses of computers. Computers are present
within toasters, cars, ships, spacecraft, homes, and businesses. They are the basis for game machines,
cable TV tuners, and industrial control systems.
Those early computers evolved into general-purpose, multifunction mainframes, and that’s when
operating systems were born. In the 1960s, Moore’s Law predicted that the number of transistors on an
integrated circuit would double every 18 months, and that prediction has held true. Computers gained in
functionality and shrank in size, leading to a vast number of uses and a vast number and variety of
operating systems.
A common definition, and the one that we usually follow, is that the operating system is the one program
running at all times on the computer—usually called the kernel. Along with the kernel, there are two other
types of programs: system programs, which are associated with the operating system but are not
necessarily part of the kernel, and application programs, which include all programs not associated with
the operation of the system.
Mobile operating systems often include not only a core kernel but also middleware—a set of software
frameworks that provide additional services to application developers.

,Computer-System Organization
A modern general-purpose computer system consists of one or more CPUs and a number of device
controllers connected through a common bus that provides access between components and shared
memory.




Typically, operating systems have a device driver for each device controller. This device driver
understands the device controller and provides the rest of the operating system with a uniform interface to
the device. The CPU and the device controllers can execute in parallel, competing for memory cycles. To
ensure orderly access to the shared memory, a memory controller synchronizes access to the memory.

Interrupts
To start an I/O operation, the device driver loads the appropriate registers in the device controller. The
device controller, in turn, examines the contents of these registers to determine what action to take. The
controller starts the transfer of data from the device to its local buffer. Once the transfer of data is
complete, the device controller informs the device driver that it has finished its operation. But how does
the controller inform the device driver that it has finished its operation? This is accomplished via an
interrupt.

Overview
Hardware may trigger an interrupt at any time by sending a signal to the CPU, usually by way of the
system bus. Interrupts are used for many other purposes as well and are a key part of how operating
systems and hardware interact.
When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a fixed
location. The fixed location usually contains the starting address where the service routine for the
interrupt is located. The interrupt service routine executes; on completion, the CPU resumes the
interrupted computation.

, Interrupts are an important part of a computer architecture. Each computer design has its own interrupt
mechanism, but several functions are common. The interrupt must transfer control to the appropriate
interrupt service routine. The straightforward method for managing this transfer would be to invoke a
generic routine to examine the interrupt information. The routine, in turn, would call the interrupt-specific
handler. However, interrupts must be handled quickly, as they occur very frequently. A table of pointers to
interrupt routines can be used instead to provide the necessary speed. The interrupt routine is called
indirectly through the table, with no intermediate routine needed. Generally, the table of pointers is stored
in low memory These locations hold the addresses of the interrupt service routines for the various
devices. This array, or interrupt vector, of addresses is then indexed by a unique number, given with the
interrupt request, to provide the address of the interrupt service routine for the interrupting device.
Operating systems as different as Windows and UNIX dispatch interrupts in this manner.
The interrupt architecture must also save the state information of whatever was interrupted, so that it can
restore this information after servicing the interrupt. If the interrupt routine needs to modify the processor
state—for instance, by modifying register values—it must explicitly save the current state and then restore
that state before returning. After the interrupt is serviced, the saved return address is loaded into the
program counter, and the interrupted computation resumes as though the interrupt had not occurred.

Implementation
The basic interrupt mechanism works as follows. The CPU hardware has a wire called the interrupt-
request line that the CPU senses after executing every instruction. When the CPU detects that a
controller has asserted a signal on the interrupt-request line, it reads the interrupt number and jumps to
the interrupt-handler routine by using that interrupt number as an index into the interrupt vector. It then
starts execution at the address associated with that index. The interrupt handler saves any state it will be
changing during its operation, determines the cause of the interrupt, performs the necessary processing,
performs a state restore, and executes a return_from_interrupt instruction to return the CPU to the
execution state prior to the interrupt. We say that the device controller raises an interrupt by asserting a
signal on the interrupt request line, the CPU catches the interrupt and dispatches it to the interrupt
handler, and the handler clears the interrupt by servicing the device.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller LinkCroft. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R50,00. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75759 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R50,00  14x  sold
  • (1)
  Buy now