Exam 1 Review - Chapters 1 to 3, Computer Organization Review, Tutorials 1 and 2 Flashcards

1
Q

What is the simplest way to describe a computer?

A

HW + OS + Apps + Users

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

What is the user view like?

A

Single-user, at a terminal/mainframe, uses embedded systems

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

What is system view?

A

OS is a resource allocator, control program, the one program running at all times (AKA the kernel)

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

What is a bootstrap program?

A

A program loaded at power-up or reboot, stored in ROM/EPROM, AKA firmware, initializes all aspects of the OS

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

Can I/O devices and the CPU execute concurrently?

A

Yes, 1/+ CPUs, and device controllers, connect through a common bus providing access to shared memory

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

What do device drivers do?

A

Provides uniform interface between controller and the kernel

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

How does the OS discover the occurrence of an event?

A

Through polling (CPU constantly loops to see whether the device is ready) or interrupt (CPU works on other tasks until an interrupt is received)

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

What’s a HW interrupt?

A

A signal is sent to the CPU

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

What is a SW interrupt?

A

Known as trap/exception, includes SW errors, requests for an OS service, system call

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

What is the storage hierarchy based on?

A

Based on speed, cost, volatility

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

How is the storage hierarchy organized?

A

Magnetic tapes, optical disk, hard disk, SSD, main memory, cache, registers

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

What kind of systems exist concerning processors?

A

Single-processor (single general-purpose processor with one general-purpose CPU), multiprocessor (can be a multicore system), and clustered (Independent with shared common storage)

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

What kinds of multiprocessor systems exist?

A

Asymmetric (each processor assigned a specific task, batch processor controls the system) and symmetric (each processor performs all tasks)

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

What is a batch system?

A

Multiprogramming, users do not interact with the system, organizes jobs so CPU always has one to execute

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

What is time sharing?

A

Multitasking, users can interact with the system, each user has at least one program executing in memory, if processes don’t fit in memory, swapping moves them in and out to run

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

Describe dual mode operation

A

User (mode bit = 1) and kernel mode (0), allows OS to protect itself and other system components, kernel mode can only be entered by making system calls and is the only one that can execute certain machine instructions

17
Q

How is a system call implemented?

A

1) The user’s program makes an indirect system call
2) A number is associated with each system call
3) An entry of the index table points to the detailed implementation of the system call

18
Q

Describe message passing

A

Suitable for transferring smaller amounts of data (imagine an envelope containing just one letter) and has simpler implementation of communication

19
Q

Describe shared memory

A

Has a maximum transfer rate but has problems like synchronization and security (imagine sharing a PO box with a friend or even a stranger)

20
Q

Can an OS be perfect and meet all requirements?

A

No, there is no unique solution for meeting all requirements, must select own personal most important requirements

21
Q

Describe policy and mechanism in terms of principle

A

Policy is “what will be done?” and mechanism is “How will the policy be implemented?”; Policy is changeable without needing to rewrite code but mechanism is fixed

22
Q

What is a simple structure?

A

Provides most functionality in least space, no distinction between user and kernel modes, not divided into modules for MS-DOS layered structure; System programs and kernel separated for UNIX partially-layered structure

23
Q

What is a layered approach structure?

A

OS divided into layers, each built on top of lower layers. Very simple for constructing and debugging but each layer adds overhead to a system call

24
Q

What is a microkernel structure?

A

Removes all nonessential components from the kernel, and implement them as system applications instead, portable and very secure

25
Q

Describe the command interpreter

A

A form of emulation, usable as a program such as shell, command line uses argv (arguments vector) and argc (arguments counter)

26
Q

What is the difference between a process and a program?

A

A process is a program in execution, active, and a program is a passive entity stored in memory as an executable file

27
Q

Describe a process in terms of memory

A

Has multiple parts: stack (contains temporary data such as function parameters and local variables), heap (used for dynamic memory allocation), data (stores global and static variables), and text (compiled program code)

28
Q

Describe process states (new, ready, running, waiting, terminated)

A

New (process being created), ready (process waiting to be assigned to a processor), running (instructions being executed), waiting (process is waiting for some event to occur), terminated (process finished execution)

29
Q

What is a process control block (PCB)?

A

Stores process-specific information, contains: process state, process number, CPU registers and scheduling information, program counter, registers, memory limits, and list of open files

30
Q

Describe the different types of scheduling queues of processes (job, ready, device)

A

Job queue (set of all processes in the system), ready queue (set of all process residing in main memory, waiting), device queues (set of processes waiting for an I/O device)

31
Q

Difference between long-term (job) scheduler and short-term (CPU) scheduler?

A

Long-term selects which processes should be brought into the ready queue, infrequently invoked, while short-term selects which process should be executed next and allocates CPU, frequently invoked

32
Q

What is a context switch?

A

Loads saved state for a new process and saves states of an old process when CPU switches to another process. Is overhead, system does no useful work while switching

33
Q

What is a daemon?

A

A background process that normally runs indefinitely

34
Q

Describe multiprogramming

A

The number of processes that are in the memory, maximizes CPU use

35
Q

The difference between I/O-bound and CPU-bound processes

A

I/O-bound processes spends more time doing I/O and has many short CPU bursts while CPU-bound processes spends more time doing computations and has few long CPU bursts

36
Q

Why is a good process mix of I/O and CPU necessary?

A

To keep both CPU and devices fully utilized

37
Q

What are zombie processes?

A

A terminated process whose parent has not yet called wait()

38
Q

What are orphan processes?

A

An orphan process is a process whose parent process has finished/terminated, though it remains running itself