Uploaded by Ikramur Rahman

Lecture 14-15 Introductory Course for Engineers

advertisement
Computer is composed of 2 components:


Hardware: physical equipment
Software: collection of programs that allows the hardware to do its job
OS – controls access to hardware by users
Application programs – use the comp. HW to solve user’s problems
OS:



Interface between the hardware of a computer and the user
Program or set of programs facilitating the execution of other programs
Acts as general manger supervising the activity of each component in the computer system
Design goals:
-
Efficient use of hardware
Ease of use of resources
Bootstrap Process:
Monoprogramming:
-
Majority memory capacity dedicated to a single program
Only a small part needed to hold OS
When one program finishes running another one occupies memory
Multiprogramming:
-
More than one program is in memory simultaneously
Executed concurrently with the CPU switching rapidly between the programs
import sys
def main():
filename = sys.argv[1]
try:
result_msg = read_file(filename)
except FileNotFoundError:
print(f"error: The file '{filename}' could not be found")
else:
name_input = str(input("Enter a name to search for:"))
for name, message in result_msg:
if name == name_input:
display_entry(name, message)
Download