TEST 1 - Unit 1 & 2 Flashcards

1
Q

What is Operating System?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Definition of OS
(Functions/Characteristics/Roles)

A
  1. OS is a resource allocator
    - it manages all resources
    - decides between conflicting requests for efficient and fair resource use
  2. OS is a control program
    - control program executions to prevent errors and improper use of the computer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the GOALS of OS?

A
  • make computer system convenient to use
  • execute programs & make solving user problems easier
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the computer system components?

A
  • hardware
  • operating system
  • application programs
  • users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain each computer system components and provide examples.

A
  1. HARDWARE provides basic computing resources.
    - CPU, memory, I/O devices
  2. OS controls and coordinates use of hardware among various applications and users
    - Linux, macOS, Microsoft Windows
  3. APPLICATION PROGRAMS are software applications that perform specific tasks or functions for users.
    - compilers, video games, database systems
  4. USERS are Users are individuals or entities who interact with the computer system to perform tasks and utilize software.
    - people, machines, other computers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is “kernel”?

A

A computer program that runs at all times

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the two types of boot processes?

A
  1. Hard (cold) boot
    - powering on the computer when it’s completely turned off
  2. Soft (warm) boot
    - restart while the computer is still powered but unresponsive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 4 steps in Boot Process?

A
  1. Startup BIOS runs POST and assigns resources
  2. ROM BIOS startup program searches and loads an OS
  3. OS configures the system and completes its own loading
  4. Application software is loaded and executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain Computer System Operations.

A
  • in a comp system, one or more CPUs and device controllers are interconnected through a common bus
  • this architecture allows them to
    -> access shared memory
    -> enabling the concurrent
    execution of CPUs and devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the 4 basic components of computer system?

A
  1. Processor
  2. Main Memory
  3. I/O Modules
  4. System Bus
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are INTERRUPTS?

A

Events that pause the normal sequence sequence of proessor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why do Interrupts exist?

A
  • I/O devices are slower than the processor.
  • they allow the processor to continue other tasks while waiting for I/O operations to finish
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the 4 classes of interrupts?

A
  1. Program
    - generated when something goes wrong during instruction execution or accessing memory you’re not supposed to
  2. Timer
    - generated by a timer within processor
    - allows OS to perform certain functions on a regular basis
  3. I/O
    - generated by an I/O controller
    - signaling they have completed or require attention
  4. Hardware Failure
    - generated by a failure such as power failure or memory parity failure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Common Fucntions of Interrupts

A
  1. Transfer Control
    - interrupts transfer control to specific interrupt service routines through an interrupt vector
  2. Address Preservation
    - interrupt architecture must save the address of the interrupted instruction
  3. Interrupt Management
    - new interrupts are disabled while another interrupt is being processed to prevent lost interrupt
  4. Traps
    - a software-generated interrupt caused either by and error or a user request
  5. OS is interrupt driven
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Interrupt Handling?

A

the process of managing interruptions in a computer’s normal operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain about Interrupt Handling.

A
  1. CPU stops its current tasks when interrupted and immediately transfers execution to a fixed location
  2. OS saves the CPU’s state
  3. It identifies the type of interrupt occurred
  4. Separate segments of code are used to respond appropriately to each type of interrupt
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Explain Interrupt Cycle

A

Processor checks for interrupt;

  • If no interrupts fetch, next instruction of the program is executed
  • If an interrupt is pending, suspend execution of the current program and execute interrupt handling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are the 2 types of I/O Structure and their difference(s)?

A

Synchronous and Asynchronous

In synchronous I/O, control returns to user program only upon I/O completion while in Asynchronous IO, control returns to user program without waiting for I/O completion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is Uniprogramming?

A

processor must wait for I/O instruction to complete before preceding

(1 program at a time)

20
Q

What is Multiprogramming?

A

when one job needs to wait for I/O, the processor can switch to the other job

(allows multiple programs to be loaded into the computer’s memory at the same time)

21
Q

What’s the importance of Multiprogramming?

A

it’s needed for efficiency

  • single user cant keep CPU and I/O devices busy all the time
  • MP organizes jobs so CPU always has one to execute
  • a subset of total jobs in system is kept in memory
  • one job selected and run via job scheduling
  • when it has to wait, OS switches to another job
22
Q

What is Job Scheduling?

A

to choose which job is the priority/more important

23
Q

What is Time Sharing?

A

a logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing

24
Q

What is the concept of Time Sharing?

A
  • use Multiprogramming to handle multiple interactive jobs
  • allows multiple users to share a single computer’s resources simultaneously by dividing CPU time into small slices.
25
Q

Features of Time Sharing.

A
  1. Response Time - should be <1 sec
  2. Process - each user has at least one program executing in memory
  3. CPU Scheduling - if several jobs ready to run at the same time
  4. Virtual Memory - allows execution of processes not completely in memory
26
Q

What are the issues in Time Sharing?

A
  1. User Behavior and Hacking
    users attempt to manipulate the system to get more CPU time
  2. Resources Utilization
    users often spent time in an idle state than actively using computer resources
  3. Complex Memory Hierarchy
27
Q

What is an example of Time-Sharing?

A

Compatible Time Sharing System (CTSS)

28
Q

PLACEHOLDAHHH

A

NEXT IS CHAPTER 2

29
Q

Definition of Process

A
  • a program in execution
  • an instance of a program running on a computer
30
Q

What are the elements of Process?

A
  1. Identifier - unique to the process
  2. State - running or not running
  3. Priority - relative to other processes
  4. Program counter - address of next instruction in the process
  5. Memory pointers - to program code
  6. Context Data - data in the registers while process is executing
  7. I/O status information - outstanding I/O requests
  8. Accounting information - amount of processor time used
31
Q

What are the the process state models used in OS?

A
  1. Two-State Process Model
  2. Five-State Process Model
32
Q

What is Two-State Process Model?

A

Process can be in one of 2 states;
- running
- not running

33
Q

Explain the 2 states.

A

Running
- process is actively executing and utilizing the PU

Not Running
- ready to execute but is waiting for I/O

34
Q

What is Five-State Process Model?

A
  • a more detailed representation of process state
  • is commonly used in modern multitasking OS
35
Q

Explain the 5 states.

A
  1. Run - currently executing

– not running –
2. Ready - prepared to execute

  1. Blocked - cant execute until some event occurs
  2. New - just created, not loaded into MM
  3. Exit - process has completed its executed and is being terminated
36
Q

What are the Five-State Model transitions? There are 9.

A
  1. NULL - NEW
    a new process is created for various reasons
  2. NEW – READY
    OS prepared to accept an additional process
  3. READY – RUNNING
    scheduled for execution
  4. RUNNING - EXIT
    the currently running process is terminated if it has signaled its completion
  5. RUNNING – READY
    its time quantum for execution has expired
  6. RUNNING – BLOCKED
    it requests some data that is not immediately available
  7. BLOCKED – READY
    the event was waiting for has occured
  8. READY – EXIT
  9. BLOCKED – EXIT
37
Q

What is Suspended Process?

A

Process that has been temporarily halted from execution.

  • processor is faster than I/O so all processors could be waiting for I/O
  • swap these processors to disk to free up more memory
  • blocked state becomes suspend state when swapped to disk
38
Q

2 new states in Suspended Processes

A
  1. Blocked/Suspend
  2. Ready/Suspend
39
Q

What are the reasons for Process Suspension?

A
  1. Swapping
    OS needs to release sufficient MM to bring in process that is ready to execute
  2. Other OS reasons
    OS may suspend a process that is suspected of causing problems
  3. Interactive User Request
    for purposes of debugging
40
Q

What is Multithreading?

A

distribution of instructions of a single process into multiple, concurrent execution paths

eg, Windows, Linux, Solaris

41
Q

2 Primary types of Multithreading

A
  1. User-Level Threads (ULTs)
  2. Kernel-Level Threads (KLTs)
42
Q

User-Level Threads (ULTs)

A
  • all thread management is done by the application
  • kernel is not aware of the existence of threads
43
Q

What does threads library contains of in ULTs?

A

contains codes to
- create and destroy threads
- pass messages and data between threads
- schedule thread execution
- save and restore thread context

44
Q

Kernel-Level Threads (KLTs)

A
  • kernel maintains context info for the process and the threads
  • scheduling is done on a thread basis

eg, Windows

45
Q

INCLUDE ADVAN DISADVAN OF ALL APPROACH ANDDD THREADS IN WORDS LATERRR

A

INCLUDE DIAGRAMS TOO

46
Q

Combined Approach

A
  • combine the approaches of ULTs and KLTs
  • thread creation done in the user space
  • bulk of scheduling and synchronization of threads within application