Operating Systems 2015F: Assignment 1: Difference between revisions

From Soma-notes
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''This assignment is not yet finalized.'''
Please submit your answers to the following on CULearn.  This assignment is due before class on September 23, 2015.
Please submit your answers to the following on CULearn.  This assignment is due before class on September 23, 2015.


Choose the *most* accurate definition for the following terms/concepts:
Choose the *most* accurate definition for the following terms/concepts:


# system calls
# system calls
  # function calls
# function calls
  # library calls
# library calls
# process
# process
# fork
# fork
# execve
# execve
# file
# file
  # filesystem
# filesystem
# signal
# signal
# library
# library
# kernel
# kernel
# environment variable
# environment variable
# shell variable
# shell variable
# zombie process
# zombie process


'''Definitions''':
'''Definitions''':
Line 28: Line 26:
   <li>The API used by a process to access outside resources (disk/user input/network)
   <li>The API used by a process to access outside resources (disk/user input/network)
   <li>A variable that can only be accessed within the current shell.
   <li>A variable that can only be accessed within the current shell.
   <li>A variable that can be accessed within the current process and in child processes (unless filtered)e
   <li>A variable that can be accessed within the current process and in child processes (unless filtered).
   <li>A variable that can be accessed globally by all processes.
   <li>A variable that can be accessed globally by all processes.
   <li>A process that has terminated but its parent has not retrieved its return value.
   <li>A process that has terminated but its parent has not retrieved its return value.
   <li>An indexed collection of object files that may be linked into a program.
   <li>An indexed collection of object files that may be linked into a program.
   <li>A system call that loads an executable into the current process and runs it (erasing the process's old code and data).
   <li>A system call that loads an executable into the current process and runs it (erasing the process's old code and data).
   <li>
   <li>A schedulable entity with its own CPU context that can share its memory with other schedulable entities.
   <li>A type of inter-process communication that is also used in UNIX to manage processes.  
   <li>A type of inter-process communication that is also used in UNIX to manage processes.  
   <li>
   <li>An invocation of code present inside of a process that was included when the program was compiled.
   <li>A system call that creates a new process, loads an executable, and runs it in the new process.
   <li>A system call that creates a new process, loads an executable, and runs it in the new process.
   <li>
   <li>An invocation of code present inside of a process that was loaded into the process at runtime.
   <li>
   <li>A system call to get the return value of a process that has terminated.
   <li>The main abstraction for running programs that gives each program its own memory and virtual CPU.
   <li>The main abstraction for running programs that gives each program its own memory and virtual CPU.
   <li>
   <li>A hierarchical collection of key/value pairs, where the values are streams of bytes of arbitrary length.
   <li>
   <li>A device for storing data.
   <li>
   <li>The first process that runs on a UNIX-like system.
</ol>
 
==Solutions==
 
<ol style="list-style-type:upper-alpha">
  <li>'''fork''': A system call that creates a new process by creating a logical copy of the current process.</li>
  <li>'''kernel''': The part of the operating system that runs in supervisor mode on the CPU and has the code that is run for all interrupts</li>
  <li>'''file''': A stream of bytes associated with a hierarchical name.</li>
  <li>'''system calls''': The API used by a process to access outside resources (disk/user input/network)
  <li>'''shell variables''': A variable that can only be accessed within the current shell.
  <li>'''environment variables''': A variable that can be accessed within the current process and in child processes (unless filtered).
  <li>'''(NONE)''': A variable that can be accessed globally by all processes.
  <li>'''zombie process''': A process that has terminated but its parent has not retrieved its return value.
  <li>'''library''': An indexed collection of object files that may be linked into a program.
  <li>'''execve''': A system call that loads an executable into the current process and runs it (erasing the process's old code and data).
  <li>'''(NONE - thread)''': A schedulable entity with its own CPU context that can share its memory with other schedulable entities.
  <li>'''signals''': A type of inter-process communication that is also used in UNIX to manage processes.
  <li>'''function call''': An invocation of code present inside of a process that was included when the program was compiled.
  <li>'''(NONE - CreateProcess on Windows)''': A system call that creates a new process, loads an executable, and runs it in the new process.
  <li>'''library call''': An invocation of code present inside of a process that was loaded into the process at runtime.
  <li>'''(NONE - wait)''': A system call to get the return value of a process that has terminated.
  <li>'''process''': The main abstraction for running programs that gives each program its own memory and virtual CPU.
  <li>'''filesystem''': A hierarchical collection of key/value pairs, where the values are streams of bytes of arbitrary length.
  <li>'''(NONE - disk?)''': A device for storing data.
  <li>'''(NONE - init)''': The first process that runs on a UNIX-like system.
</ol>
</ol>

Latest revision as of 19:15, 3 October 2015

Please submit your answers to the following on CULearn. This assignment is due before class on September 23, 2015.

Choose the *most* accurate definition for the following terms/concepts:

  1. system calls
  2. function calls
  3. library calls
  4. process
  5. fork
  6. execve
  7. file
  8. filesystem
  9. signal
  10. library
  11. kernel
  12. environment variable
  13. shell variable
  14. zombie process

Definitions:

  1. A system call that creates a new process by creating a logical copy of the current process.
  2. The part of the operating system that runs in supervisor mode on the CPU and has the code that is run for all interrupts
  3. A stream of bytes associated with a hierarchical name.
  4. The API used by a process to access outside resources (disk/user input/network)
  5. A variable that can only be accessed within the current shell.
  6. A variable that can be accessed within the current process and in child processes (unless filtered).
  7. A variable that can be accessed globally by all processes.
  8. A process that has terminated but its parent has not retrieved its return value.
  9. An indexed collection of object files that may be linked into a program.
  10. A system call that loads an executable into the current process and runs it (erasing the process's old code and data).
  11. A schedulable entity with its own CPU context that can share its memory with other schedulable entities.
  12. A type of inter-process communication that is also used in UNIX to manage processes.
  13. An invocation of code present inside of a process that was included when the program was compiled.
  14. A system call that creates a new process, loads an executable, and runs it in the new process.
  15. An invocation of code present inside of a process that was loaded into the process at runtime.
  16. A system call to get the return value of a process that has terminated.
  17. The main abstraction for running programs that gives each program its own memory and virtual CPU.
  18. A hierarchical collection of key/value pairs, where the values are streams of bytes of arbitrary length.
  19. A device for storing data.
  20. The first process that runs on a UNIX-like system.

Solutions

  1. fork: A system call that creates a new process by creating a logical copy of the current process.
  2. kernel: The part of the operating system that runs in supervisor mode on the CPU and has the code that is run for all interrupts
  3. file: A stream of bytes associated with a hierarchical name.
  4. system calls: The API used by a process to access outside resources (disk/user input/network)
  5. shell variables: A variable that can only be accessed within the current shell.
  6. environment variables: A variable that can be accessed within the current process and in child processes (unless filtered).
  7. (NONE): A variable that can be accessed globally by all processes.
  8. zombie process: A process that has terminated but its parent has not retrieved its return value.
  9. library: An indexed collection of object files that may be linked into a program.
  10. execve: A system call that loads an executable into the current process and runs it (erasing the process's old code and data).
  11. (NONE - thread): A schedulable entity with its own CPU context that can share its memory with other schedulable entities.
  12. signals: A type of inter-process communication that is also used in UNIX to manage processes.
  13. function call: An invocation of code present inside of a process that was included when the program was compiled.
  14. (NONE - CreateProcess on Windows): A system call that creates a new process, loads an executable, and runs it in the new process.
  15. library call: An invocation of code present inside of a process that was loaded into the process at runtime.
  16. (NONE - wait): A system call to get the return value of a process that has terminated.
  17. process: The main abstraction for running programs that gives each program its own memory and virtual CPU.
  18. filesystem: A hierarchical collection of key/value pairs, where the values are streams of bytes of arbitrary length.
  19. (NONE - disk?): A device for storing data.
  20. (NONE - init): The first process that runs on a UNIX-like system.