Test 1 revision

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/44

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

45 Terms

1
New cards

Operating System

  • A program that acts as an intermediary between the user of a computer and the computer hardware

  • Provides an environment in which a user can execute programs in a convenient and efficient manner

  • Performs no useful functions by itself.

2
New cards

Application Software

Allows the user to perform some intended task, function or activity and includes productivity tools

3
New cards

System Software

Provides an interface with hardware and serves as a platform for running programs and maintaining the efficiency of the system. Can be divided into operating systems and utility programs.

4
New cards

Resource

Anything that is needed for an executing program to run.

E.g.:

  • Memory

  • Space on disk

  • CPU

5
New cards

Resource Abstraction

  • The process of hiding the tasks needed to manage and use resources

  • Allows user programs to use resources via simpler commands.

6
New cards

Types of Resource Sharing

  • Space-multiplexed sharing

  • Time-multiplexed sharing

7
New cards

Space-multiplexed sharing

A method for sharing where the resource is divided into >= 2 distinct units, with each unit being allocated to different processes

8
New cards

Time-multiplexed sharing

A method of sharing where the entire resource is allocated to a process for a period of time, after which it is then allocated to another process and so on.

Preferred in cases where users interact with the computer at different points during the execution of the program.

9
New cards

Multiprogramming

  • A technique for sharing the CPU among runnable processes

  • Accomplishes CPU sharing automatically

10
New cards

OS Strategies

Used to provide OS services and refers to the general characteristics of the programmer’s abstract machine.

  • Batch processing

  • Timesharing

  • Personal computers and workstations

  • Others

    • Process control and real-time

    • Network

    • Distributed

    • Small computers

11
New cards

Batch Processing

  • Uses multiprogramming

  • Job prepared offline

  • Batch of jobs given to OS at one time

  • OS processes jobs one after the other

  • No human-computer interaction

  • OS optimizes resource utilization

Preferred when executing a collection of programs where humans do not interact with the program when it executes. It is important to maximize the utilization of the system’s resources.

12
New cards

Timesharing Systems

  • Uses multiprogramming

  • Support interactive computing model

  • Tends to propagate processes

  • Considerable attention to resource isolation

  • Tend to optimize response time

13
New cards

OS Services

  • Provides convenience

    • UI

    • Program execution

    • I/O operations

    • File-system manipulation

    • Communicationss

    • Error detection

  • Ensures efficient operations of the system

    • Resource allocation

    • Accounting

    • Protection and security

14
New cards

Functions of an OS

  • Device management

  • Process, thread and resource management

  • Memory management

  • File management

15
New cards

Device Management

  • Refers to the way generic devices and handled

  • Includes disk, tapes, terminals, printers, etc…

  • Special management approaches for processor and memory

  • Partitioning design simplifies adding and upgrading of devices

16
New cards

Process, Thread and Resource Management

  • Creates abstractions of processes, threads, and resources

  • Allocates processor resources equitably

  • Allocates and tracks abstract resources such as queues, semaphores, and messages

  • Cooperates with the memory manager to administer the primary memory

17
New cards

Memory Management

  • Administers and allocates primary memory

  • Enforces resource isolation

  • Enables sharing between processes

  • Provides virtual memory extensions

18
New cards

File Management

  • Creates abstractions of storage devices i.e. I/O operations

  • Range from byte stream files to indexed records

  • Local and Remote file systems

19
New cards

OS Requirements

  • Time/space-multiplexing

  • Exclusive use of a resource

  • Isolation

  • Managed sharing

20
New cards

Implementation mechanisms

  • Processor modes

  • Kernels

  • Method of invoking system service

21
New cards

Processor Modes

  • Distinguishes between trusted and untrusted software

  • Determines execution capability and accessible memory areas

  • 2 modes:

    • Supervisor

    • User

22
New cards

Supervisor Processor Mode

  • Can execute all instructions, including privileged/protected instructions.

    • I/O, Memory related instructions, Processor mode-change instructions

  • Can access all memory locations, including System and User space.

23
New cards

User Processor Mode

  • Can only execute non-privileged instructions

  • Can only access memory area used by application processes (User space)

24
New cards

Kernels

  • Part of the OS that is critical to correct operation

  • Implements the basic mechanisms that assure secure operation of the entire OS

  • Executes in supervisor mode

25
New cards

Program

File of instructions (Source file)

 High level programming language

 e.g. C, Java, Python

 Low level programming language

 e.g. assembly language (processor specific)

 Machine language (processor specific)

26
New cards

Von Neumann Architecture

Forms the basis for almost all modern computer systems.

 Most other specialized systems evolved from this

architecture.

 Has a fixed set of electronic parts, which can be

manipulated to perform various tasks determined by a

variable program.

 Consists of the following parts:

 A central processing unit (CPU)

 A primary memory unit

 A collection of I/O Devices

 Buses to interconnect the components

<p>Forms the basis for almost all modern computer systems.</p><p> Most other specialized systems evolved from this</p><p>architecture.</p><p> Has a fixed set of electronic parts, which can be</p><p>manipulated to perform various tasks determined by a</p><p>variable program.</p><p> Consists of the following parts:</p><p> A central processing unit (CPU)</p><p> A primary memory unit</p><p> A collection of I/O Devices</p><p> Buses to interconnect the components</p>
27
New cards

Central Processing Unit

  • The brain of the computer

  • Made up of

    • Arithmetical-Logical Unit

    • Control Unit

28
New cards

ALU

  • Can be thought of as a very fast calculator.

  • Can perform various arithmetic and logical operations

  • Typically has 32 to 64 registers

  • Comprises of

    • Functional Unit

      • Performs operations

    • Registers

29
New cards

Control Unit

Causes a sequence of instructions stored in the

memory to be retrieved and executed.

 Comprises

 Fetch Unit – Fetches an instruction from memory.

 Decode Unit – Decode an instruction.

 Execute Unit – Signal ALU to execute instruction.

 Instruction Register (IR) - Contains a copy of the

current instruction.

 Program Counter register (PC) - Contains the memory

address of the next instruction the unit is to load.

 Works based on fetch-execute cycle

30
New cards

Control Unit Operation

When the computer is powered up, the control

unit begins to execute the fetch-execute cycle

until the computer is shut down.

 Fetch phase

 Instruction retrieved from memory at location specified by Program Counter (PC)

 Loaded into Instruction Register (IR)

 PC is incremented

 Execute phase

 ALU operation

 Cause memory data reference, I/O operation

31
New cards

Primary Memory Unit

  • Stores both programs and data while they are being operated on by the CPU

  • Interface between CPU and memory consists of 3 registers:

    • Memory address register MAR

      • Stores address of data to be read from or written to

    • Memory data register MDR

      • Stores data that is read or to be written

    • Command register CMD

      • Stores the command to be executed

  • Stores programs and data in binary format

  • Often referred to as random access memory (RAM)

32
New cards

I/O Devices

 Each device operation is controlled by a device

controller

 Device controller connects device to the

computer’s address and data bus

 Provides an interface which the OS (Device

manager) can use to manipulate device

 Interfaces varies among controllers

 OS provides abstraction to hide differences from

programmer

33
New cards

Device-Controller-Software Relationship

<p></p>
34
New cards

Device Controller Interface

 Device may need constant attention/monitoring

during operation

 Device controller does this with mainly hardware

algorithms

 Software interface (device driver) provided by

controller allows OS to operate and synchronize

its behavior with the device operation

 Device controller include the following as part of

the interface

 Data registers

 Command registers

 Status flags with includes done, busy and error code

35
New cards

Polling/Interrupt

Notifies the CPU when I/O is done

36
New cards

Polling

  • Device implements the status of the device as a flag

  • If the I/O is not done, the CPU executes a busy-wait command to wait for the I/O to end, but the CPU is effectively waiting and doing nothing.

  • Wastes precious processor cycles

37
New cards

Interrupt

  • When device I/O is done, the device sets a flag to signal the end of IO

    • The CPU on its fetch cycle, would detect the flag and proceed to execute a set of routines to service the IO.

38
New cards

Direct Memory Access (DMA)

  • Able to read/write data from/to memory without CPU intervention

  • Functions like a mini CPU, which is able to perform the tasks that the CPU would otherwise have to perform

  • Can work in parallel with the CPU to significantly increase the machine’s I/O performance.

39
New cards

Device manager

  • Manages the collection of device drivers, which works devices

  • Enables the OS to provides a standard set of system calls to application programs, which use the devices.

40
New cards

Device Status Table

  • Used by the Device Manager to keep track of the status of the various devices

  • Consists of information of:

    • Device ID

    • Device Status

    • Queue of processes waiting for the device

41
New cards

Buffering

  • A temporary memory-based storage area that stores the data from an I/O operation

42
New cards

Types of Buffering

  • Input

  • Output

  • Hardware

  • Double

  • Circular

43
New cards

Randomly Accessed Storage Devices

  • Allows a driver to access block of data in the device in any order.

  • Non-volatile memory also falls into this category

44
New cards

Role of the Operating System

  • Allows other programs/software to be run, and handles system processes/services

45
New cards

3 main registers

  • Memory Address Register (MAR)

  • Memory Data Register (MDR)

  • Command Register (CR)