Operating Systems Flashcards
What is an os?
- Particular system software that deals directly with hardware
- facilitates dev and use of programs in a common environment without worrying about the ugly HW part
What is multiprogramming?
-multiple programs run simultaneously by making use of CPU idle time
What is spooling?
- Data is sent to and stored in memory until program or computer requests it for extraction
- eg; in printer spooling, the docs that are sent to the printer are first stored in memory (printer spooler). Once printer is ready, it fetches the data from the spool and prints it
What is OS made of?
- process management
- memory management
- I/O control
- file management
What is a process?
- Execution of a program
- one program can have multiple processes
Where does the OS store processes?
- in the Process control block (pcb)
- each process is assigned a unique numeric ID (process ID)
What are the 4 types of interrupt?
- I/O = generated by device controller
- Timer = generated by internal clock
- Hardware = generated by hardware faults
- program = generated by program errors (division by 0)
What is DMA?
- direct memory access is the transfer between memory and I/O without passing through processor
- processor initialises transfer but is then suspended
- faster data transfer
- processor is noted by interrupt when transfer is completed
What are the 3 types of computer users?
- Programmer
- Operational
- End user
What are the four types of interfaces?
- System call
- command language
- Job control language (JCL)
- GUI
What are system calls?
- like functions
- difference is they do not belong and exist inside an application and are instead part of OS
How are system calls defined in Linux?
- defined at C functions
- one to one relationship
- eg; open, close and read files
How are system calls defined in windows?
- win 32 API
- calls are decoupled from system calls
What are command languages?
- designed to interact with OS via terminal
- used by operational users
What is the difference between UNIX and MS-DOS command languages?
- both use ‘command options arguments’ syntax
- in unix commands can be combined in shell script files
- windows uses batch files
- MS-DOS is a single user language therefore no commands for login, password, file perms etc
What is JCL?
- job control language is designed for control of batch jobs on large computer systems (mainframes)
- job is started by user and then proceeds with little or no intervention
- many things in common with shell scripts but designed for batch use
- pre-defined input without further interactions
What acronym can be used to describe basic features of GUI’s?
WIMP
Windows, icons, menus, pointers
What is the GUI model based off?
- X window system
- principle was transmission between display and computer using character-based messages
- based on client-server model
- client = app requiring GUI
- server = program providing those functionalities for specific hardware
How does the programmer view the GUI?
- provide many properties and tools at expense of more complex code
- use event-driven programming, where program must respond to user actions at every instant
How does the user view the GUI?
- Increased user-friendliness
- standardisation
Features of UNIX command interface?
- user commands
- very short
- type sensitive
- script files used to automate repetitive tasks (executed by typing sh then file name, each line is an instruction)
What is redirection?
- sending output to file or another device
- > overrides current content in file
- > > appends new file to existing one
- < takes input for program from existing file instead of keyboard
- <> is carried out by shell and can be used with any program
What are pipes?
- provide possibility to redirect output or input to selected files or devices
- connect output of one program to input of another
- removes need for temp files eg; ‘who | sort’
- possible to create pipeline where several programs simultaneously process same I/O stream
1) what is process loading?
2) what is swapping?
1) transfer of program to be executed from disk to memory
2) swap of two processes, one in memory and the other on the disk