• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/24

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

24 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)

Describe the following 3 states of a process: ready, running blocked.

Ready: runnable but OS has allocated CPU to another process.


Running: instructions are being executed by the CPU.


Blocked: The process is blocked while waiting for some event to happen.



New: The process is being created.


Terminated: The process has finished execution


Describe each possible transition that can occur.


Ignore the admitted and exit transition.

New: The process is being created.


Terminated: The process has finished execution.


???

Describe what is meant by a context switch & how the process control block (PCB) is used in this process.

A context switch happens when the OS has gained control from the currently running process.


PCB is updated from the process that is currently in the running state,


PCB is moved to the appropriate queue - reader or blocked.

The CPU scheduler is part of the OS. Give a brief description of the function of the scheduler.

The Scheduler selects from among the processes that are ready to execute & allocates the CPU to one of the ???

Explain what is meant by the following terms in the context of CPU scheduling:


Burst time, Quantum (in the context of Round Robin scheduling ), waiting time, turnaround time.

Burst time:


Burst time is how long the process needs before it will finish or move to a blocked state.


Quantum:


Quantum or quantum time is where each process gets a small unit of CPU time (quantum time ) usually 10-100 milliseconds.


Waiting time:


The amount of time a process has been waiting in the ready queue.


Turnaround time:


Amount of time to execute a particular process.

Describe how interrupts are used in performing I/O

• when device controller detects end of transfer it sends an interrupt to the CPU to signal completion.


• Interrupts provide a way of performing I/O whereby CPU is not tied up awaiting completion of I/O.

Describe each possible transition that can occur

Admitted:


Process starts, sent to CPU


Interrupt:


Sent when the device controller detects end of transfer, I/O completion


Exit:


Process has ended and terminates


I/O wait:


Process becomes blocked during I/O, waiting on user to enter data


I/O complete:


Process changes to ready after completion. (user finished with entry)


Scheduler / dispatcher:


Scheduler:


Decides which process is next from ready queue to be allocated to CPU


Dispatcher:


Gives control of CPU to the process selected by the scheduler

Describe what is meant by a context switch, and how it relates to process state transition

• Context switch is performed by dispatcher


• Happens when OS gains control back from the currently running process



1)Save context of processor inc. program counter & registers.


2)update PCB of the current running process & change state to ready/blocked.


3)Move PCB to queue


4)Update PCB of the next selected process and changes to running.


5)Update memory management data structures.


6) Restore & load context of selected process by loading previous values of program counter and register.

Three types of memory:


Main memory


• Secondary storage


• CPU registers


Order in terms of speed

1) CPU registers


2) Main memory


3) Secondary storage

Three types of memory:


Main memory


• Secondary storage


• CPU registers


Order in terms of speed

1) CPU registers


2) Main memory


3) Secondary storage

What is the function of the CPU registers?

CPU registers hold data such as instructions or addresses temporarily,


there are different types of CPU registers inc program counter and instruction register

Explain volatile?

Volatile memory is computer storage that only maintains data while the device is powered on

Explain volatile?

Volatile memory is computer storage that only maintains data while the device is powered on

Which of the above are volatile?

CPU registers and Main memory

Paging is one method that can be used to allocate memory.


Explain the following:


Page:


Frame:


Freeframe list:


Page-table:


Internal fragmentation:

Page:


Logical memory divided into blocks of the same size 29-213



Frame:


Physical memory divided fixed size blocks same as page


Free-frame:


The OS keeps a list of the frames which are available to be used- aka free frame list


Page-table:


OS examines process size in pages, each page needs a frame, if there’s enough free frames they are allocated to the new process, process loaded into these frames, frame nums put into page table for that process.



[Each process has its own page table which stores the frame numbers where the process’s pages are stored]


Internal fragmentation:


When the last page from the last program does not completely fill a frame internal fragmentation occurs

Waiting time?

The amount of time a process waits before it gets time on the CPU

Waiting time?

The amount of time a process waits before it gets time on the CPU

Respond time?

The amount of time from when a request was submitted until the first response is produced

Describe Contiguous allocation & what happens when a new process arrives to be executed.


Assume first-fit:

- A method of allocating memory efficiently, each process contained in a contiguous section of memory.


- When a new process arrives they go into the input queue, they are allocated memory by OS, when finished it is released and memory slot can be allocated

Explain the functions of an operating system?

The OS is responsible for tasks like file management, memory management, process management, handling input & output and managing the computers resources and hardware

Difference between kernel & user mode ?

Kernel: mode has unrestricted access to the underlying hardware. Reserved for lowest level, most trusted functions of the OS.


User: mode, no ability to directly access hardware or reference memory

Difference between kernel & user mode ?

Kernel: mode has unrestricted access to the underlying hardware. Reserved for lowest level, most trusted functions of the OS.


User: mode, no ability to directly access hardware or reference memory

Difference between a program & a process

Program:


Is a group of instructions.


Process:


Is the program in execution

Difference between a logical and physical address?

Logical:


Is generated by the CPU and is referred to as virtual address. A user program deals with the logical address and never actually sees the physical address.


The memory management unit (mmu) changes a logical to physical.


Physical address:


Is the address seen by the memory unit in the range R + max. The base value is the value of R.