-
POSIX
- Portable operating system industry standards
- standard for operating systems
-
Deadlock
something cannot move because something is in its way
-
_system()
passes command to the command interpreter which executes the string as an OS command
-
_execl()
what is it and how many args?
- Loads and executes new child processes
- 1st - exe filename
- 2nd - same as the first becoming argv[0]
- 3rd - same as first becoming argv[1]
-
_spawnl()
create and exe a new processs
-
createProcess()
- creates a new process and its primary thread.
- the new process runs in the security context of the calling process.
-
terminateProcess()
how many args and what are they?
- terminates the specified process and all of its threads
- hProcess[in] - the handle to the process to be terminated
- uExitCode[in] - the exit code to be used by the process and threads terminated as a result of this call
-
WaitForSingleObject()
- waits until the specified object is in the signaled state or the time-out interval elapses
- If this handle is closed while the wait is still pending , the function's beaviour is undefined
- DWORD
- WINAPI
-
WaitForMultipleObjects()
waits until 1 or all of the objects are in the singled state or the time-out interval elapses
-
sleep(5000)
- suspends the exe of the current thread until the time-out interval elapses
- 5 seconds
-
What is an OS
- To manage the resources
- allows all resources to access the hardware the same way
-
Real time OS
Example?
- multi-user, multi-tasking, embedded
- Unix
-
-
beginthreadex
- use if you are using c++ and launching thread
- must use reinterpret_cast<handle>()
-
Program
- List of instructions that perform a task
- Word = Application software -stuff we use
- Windows = System software - stuff the computer uses
- Backups = Utility software
- Havoc = Middleware -software that isn't used by itself
-
Process
- Program being executed
- Code that is running
- Requires processor
- Requirements for run
- Memory, state, call stack
- needs at least 1 thread
-
Thread
- inside a process
- one of many paths of execution
- one machine only
-
what is do threads share?
- global memory
- static variables
- heap(new)
-
what don't threads share?
- stack - local variables, function params
- HANDLE/IO
- CPU state
- exception
|
|