Unformatted text preview: emory to hold the most recently used instructions and data. The ﬁrst time a program reads a block of data, it leaves a copy in the cache. If the program needs to read the same data
a second time, it looks for the data in cache. A cache hit indicates the data is in cache; a cache miss
indicates the data is not in cache and must be read from conventional memory. In general, cache
memory has a noticeable effect on improving access to data, particularly when the cache is large.
2.1.4 How Programs Run Load and Execute Process
The following steps describe, in sequence, what happens when a computer user runs a program
at a command prompt:
• The operating system (OS) searches for the program’s ﬁlename in the current disk directory.
If it cannot ﬁnd the name there, it searches a predetermined list of directories (called paths)
for the ﬁlename. If the OS fails to ﬁnd the program ﬁlename, it issues an error message.
• If the program ﬁle is found, the OS retrieves basic information about the program’s ﬁle from
the disk directory, including the ﬁle size and its physical location on the disk drive.
• The OS determines the next available location in memory and loads the program ﬁle into
memory. It allocates a block of memory to the program and enters information about the
program’s size and location into a table (sometimes called a descriptor table). Additionally,
the OS may adjust the values of pointers within the program so they contain addresses of
• The OS begins execution of the program’s ﬁrst machine instruction. As soon as the program
begins running, it is called a process. The OS assigns the process an identiﬁcation number
(process ID), which is used to keep track of it while running.
• The process runs by itself. It is the OS’s job to track the execution of the process and to
respond to requests for system resources. Examples of resources are memory, disk ﬁles, and
• When the process ends, it is...
View Full Document
This note was uploaded on 11/29/2013 for the course CSE 451 taught by Professor Hussein during the Winter '13 term at Fatih Üniversitesi.
- Winter '13