Thư viện tài liệu trực tuyến miễn phí dành cho các bạn học sinh, sinh viên
A race condition occurs when the resulting value of a variable depends on the execution order of two or more threads. Ex: c = c + 1 Machine level: load c add 1 store c If c initially 0: With 2 threads, can get 1 or 2 With n threads, can get 1, 2, ., n
41 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1017 | Lượt tải: 0
Places components in a line as long as they fit, then starts the next line. Uses “best judgement” in spacing components. Centers by default. Lets each component assume its natural (preferred) size. Often used for placing buttons on panels.
32 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 906 | Lượt tải: 0
Apart from the benefits of reuse, CBSE is based on sound software engineering design principles: Components are independent so do not interfere with each other; Component implementations are hidden; Communication is through well-defined interfaces; Component platforms are shared and reduce development costs.
55 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1154 | Lượt tải: 0
GUI applications: Model-View-Controller design Embedded applications: cell phones car engines airplanes
29 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 954 | Lượt tải: 0
A graphics adapter in your computer is a raster device. VRAM (video RAM) contains the information about the colors of all pixels. The screen displays the contents of VRAM. To draw a shape, you need to set the exactly right set of pixels to the required colors. The number of pixels in the raster vertically and horizontally is called the device r...
21 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1437 | Lượt tải: 0
Application system reuse The whole of an application system may be reused either by incorporating it without change into other systems (COTS reuse) or by developing application families. Component reuse Components of an application from sub-systems to single objects may be reused. Covered in Chapter 17. Object and function reuse Software compo...
52 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1014 | Lượt tải: 0
Program state can be modeled as a list of pairs. E.g., [[x,1], [y,5]] Function to retrieve the value of a variable from the state: get(Var, [[Var, Val] | _], Val). get(Var, [_ | Rest], Val) :- get(Var, Rest, Val). E.g., ?- get(y, [[x, 5], [y, 3], [z, 1]], V). V = 3
22 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1130 | Lượt tải: 0
Prolog programs are made from terms, which can be: Variables Constants Structures Variables begin with a capital letter, like Bob. Constants are either integers, like 24, or atoms, like the, zebra, ‘Bob’, and ‘.’. Structures are predicates with arguments, like: n(zebra), speaks(Y, English), and np(X, Y) The arity of a structure is its numb...
20 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 929 | Lượt tải: 0
A file can be treated as an input or output stream. In reality file streams are buffered for efficiency: it is not practical to read or write one character at a time from or to mass storage. It is common to treat text files as streams.
21 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1059 | Lượt tải: 0
Testing software for reliability rather than fault detection. Measuring the number of errors allows the reliability of the software to be predicted. Note that, for statistical reasons, more errors than are allowed for in the reliability specification must be induced. An acceptable level of reliability should be specified and the software tested ...
47 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1082 | Lượt tải: 0