chapter 2 - os structure Flashcards

1
Q

System Calls are

A

programming interface to the services provided by the OS

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

System Calls are accessed

A

by programs via a high-level api

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

Methods of passing parameters to OS

A
  1. pass the parameters into the registers
  2. Store parameters in a block, table, or memory and the address of each block is passed into the register
  3. parameters are pushed onto the stack by a program and then popped off by the OS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Process Control is an OS service that

A
  • Creates, terminates, ends, and aborts processes
  • Loads and executes, gets and sets attributes
  • Allocates and frees memory, dumps and debugs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

File Managements is an OS service that

A
  • Create, delete, open, close, get and set file attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Device Management is an OS service that

A
  • request, release, reads, writes, and get/set device attributes
  • logically attaches and detaches devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Information Maintenance is an OS service that

A
  • get/set time or date, system data, process, file or device attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Communications is an OS service that

A
  • Create, and delete communication connection
  • Send, and receive messages if the message passing model to hostname or process name
  • shared-memory model create and gain access to memory regions
  • attach and detach remote devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Protection is an OS service that

A
  • controls access to resources
  • get and set permissions
  • allow and deny user access
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

User mode processes:

A

executes on behalf of the user

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

Kernel mode processes:

A

executes on behalf of the kernel

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

Mode bit:

A

a bit in the hardware to switch between modes

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

Transitioning between User/Kernel mode

A
  1. user code calls a system call
  2. OS checks that everything is in order and legal then switch
  3. OS executes system call which may contain multiple privileged instructions
  4. mode again set to user mode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does ‘su’ command perform

A

switch to super user account

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

what does ‘sudo’ do

A

run program on behalf of the superuser
(doesn’t necessarily switch to the kernel mode)

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

what does strace -c ls do

A

displays summary info on system calls invoked during the execution of the command ‘ls’

17
Q

Changing the mode bit of the CPU ___ can only be done by a privileged instruction

A

from user mode to kernel mode

18
Q

A supervisor (kernel call) is

A
  • a privileged instruction that automatically transfers execution control to a well-defined location within the OS kernel
  • the supervisor calls provide the interface between the OS kernel and the higher level software
19
Q

T/F: A system call is a kernel function

A

False

20
Q

MS-DOS

A
  • written to provide the most functionality in the least space
  • not divided into modules
  • its interfaces and levels of functionality are not well seperated
21
Q

Monolithic

A
  • no structure, entire kernel is in a single binary file
  • is high performance, with little overhead in the system call interface and fast communication
  • difficult to implement and maintain
22
Q

Layered Approach

A
  • The operating system is divided into a number of layers, each built on top of lower layers
  • the bottom layer is the hardware, and the highest is the UI
  • easy to develop, debug and update
  • less efficient, tricky to define layers