chapter 2 - os structure Flashcards
System Calls are
programming interface to the services provided by the OS
System Calls are accessed
by programs via a high-level api
Methods of passing parameters to OS
- pass the parameters into the registers
- Store parameters in a block, table, or memory and the address of each block is passed into the register
- parameters are pushed onto the stack by a program and then popped off by the OS
Process Control is an OS service that
- Creates, terminates, ends, and aborts processes
- Loads and executes, gets and sets attributes
- Allocates and frees memory, dumps and debugs
File Managements is an OS service that
- Create, delete, open, close, get and set file attributes
Device Management is an OS service that
- request, release, reads, writes, and get/set device attributes
- logically attaches and detaches devices
Information Maintenance is an OS service that
- get/set time or date, system data, process, file or device attributes
Communications is an OS service that
- 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
Protection is an OS service that
- controls access to resources
- get and set permissions
- allow and deny user access
User mode processes:
executes on behalf of the user
Kernel mode processes:
executes on behalf of the kernel
Mode bit:
a bit in the hardware to switch between modes
Transitioning between User/Kernel mode
- user code calls a system call
- OS checks that everything is in order and legal then switch
- OS executes system call which may contain multiple privileged instructions
- mode again set to user mode
What does ‘su’ command perform
switch to super user account
what does ‘sudo’ do
run program on behalf of the superuser
(doesn’t necessarily switch to the kernel mode)