Operating Systems 2014F: Assignment 1: Difference between revisions
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Please submit the answers to the following questions via CULearn by midnight on Wednesday, September 10, 2014. There 10 points in 8 questions. | |||
Submit your answers as a single text file named "<username>-comp3000-assign1.txt" (where username is your MyCarletonOne username). The first four lines of this file should be "COMP 3000 Assignment 1", your name, student number, and the date of submission. You may wish to format your answers in [http://en.wikipedia.org/wiki/Markdown Markdown] to improve their appearance. | |||
'''No other formats will be accepted.''' Submitting in another format will likely result in your assignment not being graded and you receiving no marks for this assignment. In particular do not submit an MS Word or OpenOffice file as your answers document! | |||
Don't forget to include what outside resources you used to complete each of your answers, including other students, man pages, and web resources. You do not need to list help from the instructor, TA, or information found in the textbook. | |||
# Permissions on | # [1] Permissions on UNIX are grouped into three basic file operations. What are these file operations? | ||
# What does it mean to have execute permission on a directory? | # [1] What does it mean to have execute permission on a directory? | ||
# What are the 6 basic file permissions within Windows? | # [1] What are the 6 basic file permissions within Windows? | ||
# What is the difference between the write and modify file permission in Windows? | # [1] What is the difference between the write and modify file permission in Windows? | ||
# Because all files are stored in a directory, under UNIX permission to delete, rename, and move files is determined by the users access rights on the directory the file is contained in. | # [1] Because all files are stored in a directory, under UNIX permission to delete, rename, and move files is determined by the users access rights on the directory the file is contained in. Temporary directories such as /tmp have a special "t" permission. What is this permission for? | ||
# [1] What does the PATH environment variable do? PWD? | |||
# What does the PATH environment variable do? PWD? | # [1] What environment variable tells X applications where to find the X server which it should communicate with to display the output? | ||
# What environment variable tells X applications where to find the X server which it should communicate with to display the output? ( | # [3] To what degree does a modern web browser, such as Firefox or Chrome, look and act like an operating system? What about a scriptable application such as Microsoft Word? | ||
# | |||
==Solutions== | |||
# Read, Write, and Execute | |||
# With execute permission you can access the files in the directory (specifically, gain access to the referenced inodes). If you have read but no execute permissions you can get a listing of files but you can't access them; if you have execute but not read access you can access specific files but you cannot get a list of them. | |||
# Read, Write, Read & Execute, List Folder Contents, Modify, Full Control | |||
# Write permits only writing to a file, while modify allows the user to read, write, and delete a file. | |||
# The t permission is the "sticky" bit. If it is set for a directory, a file in the directory can be removed or renamed only if the user has write permission for the directory and owns the file or owns the directory. (The sticky bit originally was used to keep executables in swap so they would load faster; this makes no sense on modern systems so it normally does nothing for regular files.) | |||
# The PATH environment variable lists the directories that are searched for executables when the location of an executable is not specified. Thus when you type "ls" at the shell prompt, it normally runs /bin/ls because /bin is normally in PATH. PWD is the "present working directory"; the shell updates it with the current directory every time you change directories (e.g., using a cd command). | |||
# DISPLAY | |||
# Operating systems provide platforms for running programs. The two main responsibilities of operating systems are to manage the resources of the computer and to provide abstractions to make accessing those resources easier for a programmer. Both web browsers and scriptable applications provide platforms for running programs. They abstract resources by providing higher-level programming environments (e.g., JavaScript/HTML/CSS, VBA) They also manage resources, even providing ways to control which programs are allowed to run and to terminate the execution of programs running within them. The key difference between complex, programmable applications and operating systems is that applications must run on an operating system while operating systems only require computer hardware to run. Thus applications provide provide their OS-like services by building on top of the functionality the underlying operating system provides. |
Latest revision as of 19:08, 22 September 2014
Please submit the answers to the following questions via CULearn by midnight on Wednesday, September 10, 2014. There 10 points in 8 questions.
Submit your answers as a single text file named "<username>-comp3000-assign1.txt" (where username is your MyCarletonOne username). The first four lines of this file should be "COMP 3000 Assignment 1", your name, student number, and the date of submission. You may wish to format your answers in Markdown to improve their appearance.
No other formats will be accepted. Submitting in another format will likely result in your assignment not being graded and you receiving no marks for this assignment. In particular do not submit an MS Word or OpenOffice file as your answers document!
Don't forget to include what outside resources you used to complete each of your answers, including other students, man pages, and web resources. You do not need to list help from the instructor, TA, or information found in the textbook.
- [1] Permissions on UNIX are grouped into three basic file operations. What are these file operations?
- [1] What does it mean to have execute permission on a directory?
- [1] What are the 6 basic file permissions within Windows?
- [1] What is the difference between the write and modify file permission in Windows?
- [1] Because all files are stored in a directory, under UNIX permission to delete, rename, and move files is determined by the users access rights on the directory the file is contained in. Temporary directories such as /tmp have a special "t" permission. What is this permission for?
- [1] What does the PATH environment variable do? PWD?
- [1] What environment variable tells X applications where to find the X server which it should communicate with to display the output?
- [3] To what degree does a modern web browser, such as Firefox or Chrome, look and act like an operating system? What about a scriptable application such as Microsoft Word?
Solutions
- Read, Write, and Execute
- With execute permission you can access the files in the directory (specifically, gain access to the referenced inodes). If you have read but no execute permissions you can get a listing of files but you can't access them; if you have execute but not read access you can access specific files but you cannot get a list of them.
- Read, Write, Read & Execute, List Folder Contents, Modify, Full Control
- Write permits only writing to a file, while modify allows the user to read, write, and delete a file.
- The t permission is the "sticky" bit. If it is set for a directory, a file in the directory can be removed or renamed only if the user has write permission for the directory and owns the file or owns the directory. (The sticky bit originally was used to keep executables in swap so they would load faster; this makes no sense on modern systems so it normally does nothing for regular files.)
- The PATH environment variable lists the directories that are searched for executables when the location of an executable is not specified. Thus when you type "ls" at the shell prompt, it normally runs /bin/ls because /bin is normally in PATH. PWD is the "present working directory"; the shell updates it with the current directory every time you change directories (e.g., using a cd command).
- DISPLAY
- Operating systems provide platforms for running programs. The two main responsibilities of operating systems are to manage the resources of the computer and to provide abstractions to make accessing those resources easier for a programmer. Both web browsers and scriptable applications provide platforms for running programs. They abstract resources by providing higher-level programming environments (e.g., JavaScript/HTML/CSS, VBA) They also manage resources, even providing ways to control which programs are allowed to run and to terminate the execution of programs running within them. The key difference between complex, programmable applications and operating systems is that applications must run on an operating system while operating systems only require computer hardware to run. Thus applications provide provide their OS-like services by building on top of the functionality the underlying operating system provides.